[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [2147] branches/1.2/bin/aa.pl



Revision: 2147
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2147&view=rev
Author:   einhverfr
Date:     2008-05-15 19:24:25 -0700 (Thu, 15 May 2008)

Log Message:
-----------
Preventing double-adding of tax to AR/AP transaction screen.

Modified Paths:
--------------
    branches/1.2/bin/aa.pl

Modified: branches/1.2/bin/aa.pl
===================================================================
--- branches/1.2/bin/aa.pl	2008-05-14 21:52:10 UTC (rev 2146)
+++ branches/1.2/bin/aa.pl	2008-05-16 02:24:25 UTC (rev 2147)
@@ -54,8 +54,11 @@
     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 @@
     }
     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 update {
     my $display = shift;
-
+    $is_update = 1;
     if ( !$display ) {
 
         $form->{invtotal} = 0;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.