From: Moritz Bunkus Date: Mon, 23 Jun 2014 13:03:19 +0000 (+0200) Subject: Auftragsmaske: JavaScript-Checks für Speichern aktiver per. Rechnungen nach kivi... X-Git-Tag: release-3.2.0beta~411^2~27 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=a0d3ac645659b1a33df00e2d73d2931c3400f773;p=kivitendo-erp.git Auftragsmaske: JavaScript-Checks für Speichern aktiver per. Rechnungen nach kivi.SalesPurchase verschoben --- diff --git a/js/edit_periodic_invoices_config.js b/js/edit_periodic_invoices_config.js index 44ebd1916..b969e1dde 100644 --- a/js/edit_periodic_invoices_config.js +++ b/js/edit_periodic_invoices_config.js @@ -14,7 +14,3 @@ function edit_periodic_invoices_config() { // alert(url); window.open(url, "_new_generic", parm); } - -function warn_save_active_periodic_invoice() { - 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?')); -} diff --git a/js/kivi.SalesPurchase.js b/js/kivi.SalesPurchase.js index dfd2a6abb..bcae1145a 100644 --- a/js/kivi.SalesPurchase.js +++ b/js/kivi.SalesPurchase.js @@ -49,11 +49,18 @@ namespace('kivi.SalesPurchase', function(ns) { return confirm(kivi.t8('There are still transfers not matching the qty of the delivery order. Stock operations can not be changed later. Do you really want to proceed?')); }; + this.oe_warn_save_active_periodic_invoice = function() { + 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.on_submit_checks = function() { var $button = $(this); if (($button.data('check-transfer-qty') == 1) && !kivi.SalesPurchase.delivery_order_check_transfer_qty()) return false; + if (($button.data('warn-save-active-periodic-invoice') == 1) && !kivi.SalesPurchase.oe_warn_save_active_periodic_invoice()) + return false; + return true; }; diff --git a/templates/webpages/oe/form_footer.html b/templates/webpages/oe/form_footer.html index 1896f7609..aa52392b6 100644 --- a/templates/webpages/oe/form_footer.html +++ b/templates/webpages/oe/form_footer.html @@ -131,8 +131,8 @@ - - + + [%- IF id %] @@ -183,3 +183,6 @@ [% END %] +