diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-07-21 17:15:06 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-07-21 17:15:06 +0000 |
commit | cb3ed4ec17fbe42bad05f94946bc033678f09019 (patch) | |
tree | 55296194e73c67449ebc858d8a56d59d92fceeee /bin/pos.pl | |
parent | 33da5bb969ad49cef8f1d638ea72b094ca79f442 (diff) |
Correcting cumulative tax display issues, bug 1745757
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1434 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin/pos.pl')
-rw-r--r-- | bin/pos.pl | 22 |
1 files changed, 7 insertions, 15 deletions
@@ -399,7 +399,7 @@ sub form_header { } sub form_footer { - + _calc_taxes(); $form->{invtotal} = $form->{invsubtotal}; $form->{taxincluded} = ( $form->{taxincluded} ) ? "checked" : ""; @@ -419,25 +419,17 @@ sub form_footer { if ( !$form->{taxincluded} ) { - my @taxset = Tax::init_taxes( $form, $form->{taxaccounts} ); - foreach $taxobj (@taxset) { - $item = $taxobj->account; - $form->{invtotal} += $form->round_amount( - $form->{"${item}_rate"} * $form->{"${item}_base"}, 2); - $form->{"${item}_total"} = - $form->format_amount( \%myconfig, - $form->{"${item}_rate"} * $form->{"${item}_base"}, 2 ); - if ( $form->{"${item}_base"} ) { - $form->{"${item}_total"} = + foreach $item (keys %{$form->{taxes}}) { + my $taccno = $item; + $form->{invtotal} += $form->round_amount($form->{taxes}{$item}, 2); + $form->{"${taccno}_total"} = $form->format_amount( \%myconfig, - $form->round_amount( $taxobj->value, 2 ), 2 ); + $form->round_amount( $form->{taxes}{$item}, 2 ), 2 ); $tax .= qq| <tr> <th align=right>$form->{"${item}_description"}</th> <td align=right>$form->{"${item}_total"}</td> - </tr> -|; - } + </tr>|; } $form->{invsubtotal} = |