From ec9b1c6f3c3e6f0eaf1f4f787a219c0db9a6406c Mon Sep 17 00:00:00 2001 From: einhverfr Date: Fri, 16 May 2008 02:24:25 +0000 Subject: 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 --- bin/aa.pl | 7 +++++-- 1 file 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| } 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; -- cgit v1.2.3