]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/IC.pm
kivitendo-test
[kivitendo-erp.git] / SL / IC.pm
index da83c33b8ed18fc9ef1593b8f849ef140f4c4982..2a9460745cac60b075bf1840fc3528b65758b792 100644 (file)
--- a/SL/IC.pm
+++ b/SL/IC.pm
@@ -736,7 +736,7 @@ sub retrieve_accounts {
 
   # transdate madness.
   my $transdate = "";
-  if (($form->{type} eq "invoice") or ($form->{type} eq "credit_note") or ($form->{script} eq 'ir.pl')) {
+  if ( (any {$form->{type} eq $_} qw(invoice credit_note invoice_for_advance_payment final_invoice)) or ($form->{script} eq 'ir.pl') ) {
     # use deliverydate for sales and purchase invoice, if it exists
     # also use deliverydate for credit notes
     $transdate = $form->{tax_point} || $form->{deliverydate} || $form->{invdate};