X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FAP.pm;h=39a68a44fd1a147777d10ed01d5460667e03b8db;hb=6c7da40171a0d3d9df81eb99599be4a16fa93c95;hp=245d1abb89254b83a8781d532724739f0e1a7560;hpb=024d2c2912122d35cc5d5a602e8464db86a16d1a;p=kivitendo-erp.git diff --git a/SL/AP.pm b/SL/AP.pm index 245d1abb8..39a68a44f 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -108,26 +108,14 @@ sub post_transaction { my ($tax, $diff); if ($form->{taxincluded} *= 1) { - if (!$form->{"korrektur_$i"}) { - $tax = - $form->{"amount_$i"} - - ($form->{"amount_$i"} / ($form->{"taxrate_$i"} + 1)); - } else { - $tax = $form->{"tax_$i"}; - } + $tax = $form->{"amount_$i"} - ($form->{"amount_$i"} / ($form->{"taxrate_$i"} + 1)); $amount = $form->{"amount_$i"} - $tax; $form->{"amount_$i"} = $form->round_amount($amount, 2); $diff += $amount - $form->{"amount_$i"}; $form->{"tax_$i"} = $form->round_amount($tax, 2); $form->{netamount} += $form->{"amount_$i"}; } 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->{"tax_$i"} = $form->{"amount_$i"} * $form->{"taxrate_$i"}; $form->{netamount} += $form->{"amount_$i"}; } $form->{total_tax} += $form->{"tax_$i"} * -1;