Kreditorenbeleg reverse Charge 94 in Dialog-B mit korrektem Vz buchen
authorJan Büren <jan@kivitendo.de>
Tue, 15 Mar 2022 06:08:37 +0000 (07:08 +0100)
committerJan Büren <jan@kivitendo.de>
Fri, 25 Mar 2022 14:55:38 +0000 (15:55 +0100)
SL/AP.pm

index 6912c55..2e3bbd6 100644 (file)
--- a/SL/AP.pm
+++ b/SL/AP.pm
@@ -463,12 +463,12 @@ sub _reverse_charge {
           imported       => 0, # not imported
           taxincluded    => 0,
         )->add_chart_booking(
-          chart  => $tmptaxamount < 0 ? $credit : $debit,
-          credit => abs($tmptaxamount),
+          chart  => $tmptaxamount > 0 ? $debit : $credit,
+          debit  => abs($tmptaxamount),
           source => "Reverse Charge for " . $form->{invnumber},
         )->add_chart_booking(
-          chart  => $tmptaxamount < 0 ? $debit : $credit,
-          debit  => abs($tmptaxamount),
+          chart  => $tmptaxamount > 0 ? $credit : $debit,
+          credit => abs($tmptaxamount),
           source => "Reverse Charge for " . $form->{invnumber},
       )->post;
     # add a stable link from ap to gl