X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=js%2Fkivi.SalesPurchase.js;h=f6c163362dff13c4dc4c63abad43213dcd4bcbe3;hb=c3fa430edf27cefc8d45597e8784d0e847a72ff4;hp=bcae1145a59536a783a9f63ed899d568304e8e28;hpb=a0d3ac645659b1a33df00e2d73d2931c3400f773;p=kivitendo-erp.git diff --git a/js/kivi.SalesPurchase.js b/js/kivi.SalesPurchase.js index bcae1145a..f6c163362 100644 --- a/js/kivi.SalesPurchase.js +++ b/js/kivi.SalesPurchase.js @@ -53,6 +53,14 @@ namespace('kivi.SalesPurchase', function(ns) { return confirm(kivi.t8('This sales order has an active configuration for periodic invoices. If you save then all subsequently created invoices will contain those changes as well, but not those that have already been created. Do you want to continue?')); }; + this.check_transaction_description = function() { + if ($('#transaction_description').val() != '') + return true; + + alert(kivi.t8('A transaction description is required.')); + return false; + }; + this.on_submit_checks = function() { var $button = $(this); if (($button.data('check-transfer-qty') == 1) && !kivi.SalesPurchase.delivery_order_check_transfer_qty()) @@ -61,6 +69,9 @@ namespace('kivi.SalesPurchase', function(ns) { if (($button.data('warn-save-active-periodic-invoice') == 1) && !kivi.SalesPurchase.oe_warn_save_active_periodic_invoice()) return false; + if (($button.data('require-transaction-description') == 1) && !kivi.SalesPurchase.check_transaction_description()) + return false; + return true; };