From 3b955bea1639c5202f4fc26c2903a22c0b3d5db6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Thu, 25 Mar 2021 08:47:01 +0100 Subject: [PATCH] Rechnungen: Drucken und Buchen muss dieselbe Restriktion wie Buchen haben MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Ansonsten kommt der Anwender auf die Idee eine Gutschrift aus einer Storno-Rechnung zu erzeugen, doch noch Belege in abgeschlossenen Perioden zu ändern usw --- bin/mozilla/is.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index e80dd3f8a..0e4f99ac8 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -397,9 +397,13 @@ sub setup_is_action_bar { action => [ t8('Print and Post'), call => [ 'kivi.SalesPurchase.show_print_dialog', $form->{id} ? 'print' : 'print_and_post' ], checks => [ 'kivi.validate_form' ], - disabled => !$may_edit_create ? t8('You must not print this invoice.') - : $form->{id} ? t8('This invoice has already been posted.') - : undef,, + disabled => !$may_edit_create ? t8('You must not change this invoice.') + : $form->{locked} ? t8('The billing period has already been locked.') + : $form->{storno} ? t8('A canceled invoice cannot be posted.') + : ($form->{id} && $change_never) ? t8('Changing invoices has been disabled in the configuration.') + : ($form->{id} && $change_on_same_day_only) ? t8('Invoices can only be changed on the day they are posted.') + : $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') + : undef, ], action => [ t8('E Mail'), call => [ 'kivi.SalesPurchase.show_email_dialog' ], -- 2.20.1