NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Remember payment terms
// @namespace https://openuserjs.org/users/TriXxieDK
// @version 0.1
// @description Pop up a confirmation box when trying to book an invoice if payment terms allow for credit
// @author TriXxieDK
// @match https://secure.e-conomic.com/*
// @grant none
// @license MIT
// ==/UserScript==
(function() {
'use strict';
if (typeof bogfoerFakWindow !== "function") return false;
$(function() {
var origbogfoerFakWindow = bogfoerFakWindow;
bogfoerFakWindow = function(str) {
if ($('div.invoice__head__col--customer__terms p').text().substr(0, 5) == 'Netto') {
if (!confirm('Sikker på kredit?')) return false;
}
return origbogfoerFakWindow(str);
}
});
})();