From: Jan Büren Date: Thu, 25 Mar 2021 07:47:01 +0000 (+0100) Subject: Rechnungen: Drucken und Buchen muss dieselbe Restriktion wie Buchen haben X-Git-Tag: kivitendo-mebil_0.1-0~9^2~418 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=3b955bea1639c5202f4fc26c2903a22c0b3d5db6;p=kivitendo-erp.git Rechnungen: Drucken und Buchen muss dieselbe Restriktion wie Buchen haben Ansonsten kommt der Anwender auf die Idee eine Gutschrift aus einer Storno-Rechnung zu erzeugen, doch noch Belege in abgeschlossenen Perioden zu ändern usw --- 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' ],