summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2005-12-22 04:22:41 +0000
committerivan <ivan>2005-12-22 04:22:41 +0000
commite7438cef2fa745d473d7770bb0f6c37ff2dfd1e8 (patch)
tree9609c7d0c79f05d2c9fcee07b3db63e0dfec1ab9
parent4568c9f0003a24efdcd4a9ca0237af41ef79ab50 (diff)
fix some ambiguous var names causing " "my" variable $t masks earlier declaration in same scope" errors
-rwxr-xr-xhttemplate/search/report_tax.cgi16
1 files changed, 8 insertions, 8 deletions
diff --git a/httemplate/search/report_tax.cgi b/httemplate/search/report_tax.cgi
index 4edd084..bf3fc74 100755
--- a/httemplate/search/report_tax.cgi
+++ b/httemplate/search/report_tax.cgi
@@ -91,10 +91,10 @@ foreach my $r (qsearch('cust_main_county', {}, '', $gotcust) ) {
## 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 @@ foreach my $r (qsearch('cust_main_county', {}, '', $gotcust) ) {
);
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 @@ push @regions, {
'exempt_cust' => $exempt_cust,
'exempt_pkg' => $exempt_pkg,
'exempt_monthly' => $exempt_monthly,
- 'taxable' => $taxable,
+ 'taxable' => $tot_taxable,
'rate' => '',
'owed' => $owed,
'tax' => $tax,