Anzhalungs-Rg.: is.pl: neuen, eigenenen Schlussrechnungs-Typ berücksichtigen
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Mon, 20 Dec 2021 10:48:52 +0000 (11:48 +0100)
committerJan Büren <jan@kivitendo.de>
Mon, 14 Feb 2022 12:54:08 +0000 (13:54 +0100)
bin/mozilla/is.pl

index e05f57c..c308c0b 100644 (file)
@@ -333,7 +333,7 @@ sub setup_is_action_bar {
   if ($form->{id} && $form->{type} eq "invoice_for_advance_payment") {
     my $invoice_obj = SL::DB::Invoice->load_cached($form->{id});
     my $lr          = $invoice_obj->linked_records(direction => 'to', to => ['Invoice']);
-    $has_final_invoice = any {'SL::DB::Invoice' eq ref $_ && "invoice" eq $_->invoice_type} @$lr;
+    $has_final_invoice = any {'SL::DB::Invoice' eq ref $_ && "final_invoice" eq $_->invoice_type} @$lr;
   }
 
   for my $bar ($::request->layout->get('actionbar')) {