- if ($form->{taxincluded} *= 1) {
- for $i (1 .. 1) {
- $tax =
- $form->{"amount_$i"} - ($form->{"amount_$i"} / ($form->{taxrate} + 1));
- if ($form->{taxcheck}) {
- $tax = $formtax * -1;
- }
- $amount = $form->{"amount_$i"} - $tax;
- $form->{"amount_$i"} = $form->round_amount($amount, 2);
- $diff += $amount - $form->{"amount_$i"};
- $form->{tax} = $form->round_amount($tax, 2);
- $form->{total_tax} = $form->{tax} * -1;
- }
- print(STDERR "Steuer $form->{tax}\n");
- print(STDERR "TotalSteuer $form->{total_tax}\n");
-
- # deduct taxes from amount
- # $form->{amount} -= $form->{total_tax};
- # deduct difference from amount_1
- # $form->{amount_1} += $form->round_amount($diff, 2);
- $form->{amount} = $form->{amount_1} * -1;
- }
-
- $form->{netamount} = $form->{amount};
-