summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-05-16 02:24:25 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-05-16 02:24:25 +0000
commitec9b1c6f3c3e6f0eaf1f4f787a219c0db9a6406c (patch)
tree1bc3f0c1d70067045e968f8600ba1a5c94381e29
parent364c2bf3c0e76274dfaec45d9a5dd4343dd94194 (diff)
Preventing double-adding of tax to AR/AP transaction screen.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@2147 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-xbin/aa.pl7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/aa.pl b/bin/aa.pl
index 7820af02..3bdac046 100755
--- a/bin/aa.pl
+++ b/bin/aa.pl
@@ -54,8 +54,11 @@ if ( -f "bin/custom/$form->{login}_aa.pl" ) {
eval { require "bin/custom/$form->{login}_aa.pl"; };
}
+my $is_update;
+
1;
+
# end of main
# this is for our long dates
@@ -651,7 +654,7 @@ qq|<td><input name="description_$i" size="40" value="$form->{"description_$i"}">
}
foreach $item ( split / /, $form->{taxaccounts} ) {
- if($form->{"calctax_$item"}){
+ if($form->{"calctax_$item"} && $is_update){
$form->{invtotal} += $form->{"tax_$item"};
}
$form->{"calctax_$item"} =
@@ -893,7 +896,7 @@ sub form_footer {
sub update {
my $display = shift;
-
+ $is_update = 1;
if ( !$display ) {
$form->{invtotal} = 0;