X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FIC.pm;h=7fca30609a778941bab378bb4bd0e17e82c1b98a;hb=ddc3bbb167d3010b0058efa8f90936d15be76c2e;hp=97065043971c6e54e0257d4d6fa7348dcf95cd15;hpb=079b834a6728d41dd2c29acc6dbfb066a4707637;p=kivitendo-erp.git diff --git a/SL/IC.pm b/SL/IC.pm index 970650439..7fca30609 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -1783,6 +1783,8 @@ sub retrieve_accounts { } else { $transdate = $form->{deliverydate}; } + } elsif ($form->{type} eq "credit_note") { + $transdate = $form->{invdate}; } else { $transdate = $form->{transdate}; } @@ -1817,7 +1819,7 @@ sub retrieve_accounts { if (!$ref) { $dbh->disconnect(); - return $lxdebug->leave_sub(); + return $main::lxdebug->leave_sub(); } $ref->{"inventory_accno_id"} = undef unless ($ref->{"is_part"}); @@ -1851,7 +1853,7 @@ sub retrieve_accounts { $ref = $sth->fetchrow_hashref(); $sth->finish(); $dbh->disconnect(); - + unless ($ref) { $main::lxdebug->leave_sub(); return; @@ -1870,8 +1872,6 @@ sub retrieve_accounts { # " || taxaccounts_$index " . $form->{"taxaccounts_$index"} . # " || taxaccounts " . $form->{"taxaccounts"}); - $sth->finish(); - $main::lxdebug->leave_sub(); } 1;