GDPDU: Behandlung von steuerfreien Werten im Export
authorSven Schöling <s.schoeling@linet-services.de>
Wed, 28 Oct 2015 13:26:34 +0000 (14:26 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Fri, 28 Oct 2016 15:11:19 +0000 (17:11 +0200)
SL/GDPDU.pm

index 36ddebf..7172113 100644 (file)
@@ -412,7 +412,7 @@ sub do_datev_csv_export {
       debit_accname    => $soll->{accname},
       credit_accno     => $haben->{accno},
       credit_accname   => $haben->{accname},
-      tax              => abs($amount->{amount}) - abs($amount->{net_amount}),
+      tax              => defined $amount->{net_amount} ? abs($amount->{amount}) - abs($amount->{net_amount}) : 0,
       notes            => $haben->{notes},
       (map { ($_ => $tax->{$_})                    } qw(taxkey tax_accname tax_accno)),
       (map { ($_ => ($haben->{$_} // $soll->{$_})) } qw(acc_trans_id invnumber name vcnumber transdate)),