From a0d3ac645659b1a33df00e2d73d2931c3400f773 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 23 Jun 2014 15:03:19 +0200 Subject: [PATCH] =?utf8?q?Auftragsmaske:=20JavaScript-Checks=20f=C3=BCr=20?= =?utf8?q?Speichern=20aktiver=20per.=20Rechnungen=20nach=20kivi.SalesPurch?= =?utf8?q?ase=20verschoben?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- js/edit_periodic_invoices_config.js | 4 ---- js/kivi.SalesPurchase.js | 7 +++++++ templates/webpages/oe/form_footer.html | 7 +++++-- 3 files changed, 12 insertions(+), 6 deletions(-) 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 %] + -- 2.20.1