X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/b14e1fdd2128a73214a2c7f54fa6a4c951458d9d..c62ddafe32128a30ea9247568858d344ed6d5655:/SL/AP.pm diff --git a/SL/AP.pm b/SL/AP.pm index 3d7b84081..0d132293f 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -116,12 +116,14 @@ sub post_transaction { } else { if (!$form->{"korrektur_$i"}) { $form->{"tax_$i"} = $form->{"amount_$i"} * $form->{"taxrate_$i"}; + } else { + $tax = $form->{"tax_$i"}; } $form->{"tax_$i"} = $form->round_amount($form->{"tax_$i"} * $form->{exchangerate}, 2); $form->{netamount} += $form->{"amount_$i"}; } - $form->{total_tax} += $form->{"tax_$i"}; + $form->{total_tax} += $form->{"tax_$i"} * -1; } # adjust paidaccounts if there is no date in the last row