VK-Rechnung 'als bezahlt markieren' für den Typ final_invoice erlauben
[kivitendo-erp.git] / bin / mozilla / is.pl
index f024622..8384980 100644 (file)
@@ -385,7 +385,7 @@ sub setup_is_action_bar {
           disabled => !$may_edit_create ? t8('You must not change this invoice.')
                     : !$form->{id}      ? t8('This invoice has not been posted yet.')
                     :                     undef,
-          only_if  => $::instance_conf->get_is_show_mark_as_paid && $form->{type} ne "invoice_for_advance_payment",
+          only_if  => ($::instance_conf->get_is_show_mark_as_paid && $form->{type} ne "invoice_for_advance_payment") || $form->{type} eq 'final_invoice',
         ],
       ], # end of combobox "Post"
 
@@ -1048,6 +1048,8 @@ sub post {
     my @current_taxaccounts = (split(/ /, $form->{taxaccounts}));
     $form->error($locale->text('Cannot post invoice for advance payment with more than one tax'))
       if (scalar @current_taxaccounts > 1);
+    $form->error($locale->text('Cannot post invoice for advance payment with taxincluded'))
+      if ($form->{taxincluded});
   }
 
   for my $i (1 .. $form->{paidaccounts}) {