diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/arapprn.pl | 1 | ||||
-rwxr-xr-x | bin/ic.pl | 3 | ||||
-rwxr-xr-x | bin/io.pl | 5 | ||||
-rwxr-xr-x | bin/ir.pl | 3 | ||||
-rwxr-xr-x | bin/is.pl | 6 |
5 files changed, 9 insertions, 9 deletions
diff --git a/bin/arapprn.pl b/bin/arapprn.pl index 2b554980..b6bdda14 100755 --- a/bin/arapprn.pl +++ b/bin/arapprn.pl @@ -322,7 +322,6 @@ sub print_transaction { $form->{subtotal} += $form->parse_amount(\%myconfig, $form->{"amount_$i"}); } - foreach $accno (split / /, $form->{taxaccounts}) { if ($form->{"tax_$accno"}) { $form->format_string("${accno}_description"); @@ -2982,7 +2982,8 @@ sub save { $amount = $form->{"sellprice_$i"} * (1 - $form->{"discount_$i"} / 100) * $form->{"qty_$i"}; for (split / /, $form->{"taxaccounts_$i"}) { $form->{"${_}_base"} += $amount } if (!$form->{taxincluded}) { - my @taxlist= Tax::init_taxes($form, $form->{"taxaccounts_$i"}); + my @taxlist= Tax::init_taxes($form, $form->{"taxaccounts_$i"}, + $form->{taxaccounts}); $amount += Tax::calculate_taxes(\@taxlist, $form, $amount, 0); } @@ -508,7 +508,8 @@ sub item_selected { $amount = $form->{"sellprice_$i"} * (1 - $form->{"discount_$i"} / 100) * $form->{"qty_$i"}; for (split / /, $form->{"taxaccounts_$i"}) { $form->{"${_}_base"} += $amount } if (!$form->{taxincluded}) { - my @taxlist= Tax::init_taxes($form, $form->{"taxaccounts_$i"}); + my @taxlist= Tax::init_taxes($form, $form->{"taxaccounts_$i"}, + $form->{taxaccounts}); $amount += Tax::calculate_taxes(\@taxlist, $form, $amount, 0); } @@ -1222,7 +1223,6 @@ sub print { sub print_form { my ($old_form) = @_; - $inv = "inv"; $due = "due"; @@ -1370,7 +1370,6 @@ sub print_form { } else { IS->invoice_details(\%myconfig, \%$form); } - if (exists $form->{longformat}) { $form->{"${due}date"} = $duedate; for ("${inv}date", "${due}date", "shippingdate", "transdate") { $form->{$_} = $locale->date(\%myconfig, $form->{$_}, $form->{longformat}) } @@ -804,7 +804,8 @@ sub update { for (split / /, $form->{taxaccounts}) { $form->{"${_}_base"} = 0 } for (split / /, $form->{"taxaccounts_$i"}) { $form->{"${_}_base"} += $amount } if (!$form->{taxincluded}) { - my @taxes = Tax::init_taxes($form, $form->{"taxaccounts_$i"}); + my @taxes = Tax::init_taxes($form, $form->{"taxaccounts_$i"}, + $form->{"taxaccounts"}); $amount += (Tax::calculate_taxes(\@taxes, $form, $amount, 0)); } @@ -470,14 +470,13 @@ sub form_footer { } if (!$form->{taxincluded}) { - my @taxes = Tax::init_taxes($form, $form->{taxaccounts}); $form->{invtotal} += Tax::calculate_taxes(\@taxes, $form, $form->{invsubtotal}, 0); foreach $item (@taxes) { my $taccno = $item->account; $form->{"${taccno}_total"} = $form->format_amount(\%myconfig, - $item->value, 2); + $form->{"${taccno}_rate"} * $form->{"${taccno}_base"}, 2); $tax .= qq| <tr> <th align=right>$form->{"${taccno}_description"}</th> @@ -818,7 +817,8 @@ sub update { for (split / /, $form->{taxaccounts}) { $form->{"${_}_base"} = 0 } for (split / /, $form->{"taxaccounts_$i"}) { $form->{"${_}_base"} += $amount } if (!$form->{taxincluded}) { - my @taxes = Tax::init_taxes($form, $form->{"taxaccounts_$i"}); + my @taxes = Tax::init_taxes($form, $form->{"taxaccounts_$i"}, + $form->{taxaccounts}); $amount += Tax::calculate_taxes(\@taxes, $form, $amount, 0); } |