[freeside-commits] freeside/httemplate/search report_tax.cgi, 1.23, 1.24

Ivan,,, ivan at wavetail.420.am
Wed Dec 21 20:22:43 PST 2005


Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail:/tmp/cvs-serv21674

Modified Files:
	report_tax.cgi 
Log Message:
fix some ambiguous var names causing " "my" variable $t masks earlier declaration in same scope" errors

Index: report_tax.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_tax.cgi,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- report_tax.cgi	22 Dec 2005 04:01:16 -0000	1.23
+++ report_tax.cgi	22 Dec 2005 04:22:41 -0000	1.24
@@ -91,10 +91,10 @@
 
   ## calculate customer-exemption for this region
 
-  my($t, $x_cust) = (0, 0);
+  my($taxable, $x_cust) = (0, 0);
   foreach my $e ( grep { $r->get($_.'tax') !~ /^Y/i }
                        qw( cust_bill_pkg.setup cust_bill_pkg.recur ) ) {
-    $t += scalar_sql($r, \@param, 
+    $taxable += scalar_sql($r, \@param, 
       "SELECT SUM($e) $fromwhere AND $nottax AND ( tax != 'Y' OR tax IS NULL )"
     );
 
@@ -123,17 +123,17 @@
   );
   if ( $x_monthly ) {
     warn $r->taxnum(). ": $x_monthly\n";
-    $t -= $x_monthly;
+    $taxable -= $x_monthly;
   }
 
   $exempt_monthly += $x_monthly;
   $regions{$label}->{'exempt_monthly'} += $x_monthly;
 
-  $taxable += $t;
-  $regions{$label}->{'taxable'} += $t;
+  $tot_taxable += $taxable;
+  $regions{$label}->{'taxable'} += $taxable;
 
-  $owed += $t * ($r->tax/100);
-  $regions{$label}->{'owed'} += $t * ($r->tax/100);
+  $owed += $taxable * ($r->tax/100);
+  $regions{$label}->{'owed'} += $taxable * ($r->tax/100);
 
   if ( defined($regions{$label}->{'rate'})
        && $regions{$label}->{'rate'} != $r->tax.'%' ) {
@@ -189,7 +189,7 @@
   'exempt_cust'    => $exempt_cust,
   'exempt_pkg'     => $exempt_pkg,
   'exempt_monthly' => $exempt_monthly,
-  'taxable'        => $taxable,
+  'taxable'        => $tot_taxable,
   'rate'           => '',
   'owed'           => $owed,
   'tax'            => $tax,



More information about the freeside-commits mailing list