projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4568c9f
)
fix some ambiguous var names causing " "my" variable $t masks earlier declaration...
author
ivan
<ivan>
Thu, 22 Dec 2005 04:22:41 +0000
(
04:22
+0000)
committer
ivan
<ivan>
Thu, 22 Dec 2005 04:22:41 +0000
(
04:22
+0000)
httemplate/search/report_tax.cgi
patch
|
blob
|
history
diff --git
a/httemplate/search/report_tax.cgi
b/httemplate/search/report_tax.cgi
index
4edd084
..
bf3fc74
100755
(executable)
--- 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
## calculate customer-exemption for this region
- my($t, $x_cust) = (0, 0);
+ my($t
axable
, $x_cust) = (0, 0);
foreach my $e ( grep { $r->get($_.'tax') !~ /^Y/i }
qw( cust_bill_pkg.setup cust_bill_pkg.recur ) ) {
foreach my $e ( grep { $r->get($_.'tax') !~ /^Y/i }
qw( cust_bill_pkg.setup cust_bill_pkg.recur ) ) {
- $t += scalar_sql($r, \@param,
+ $t
axable
+= scalar_sql($r, \@param,
"SELECT SUM($e) $fromwhere AND $nottax AND ( tax != 'Y' OR tax IS NULL )"
);
"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";
);
if ( $x_monthly ) {
warn $r->taxnum(). ": $x_monthly\n";
- $t -= $x_monthly;
+ $t
axable
-= $x_monthly;
}
$exempt_monthly += $x_monthly;
$regions{$label}->{'exempt_monthly'} += $x_monthly;
}
$exempt_monthly += $x_monthly;
$regions{$label}->{'exempt_monthly'} += $x_monthly;
- $t
axable += $t
;
- $regions{$label}->{'taxable'} += $t;
+ $t
ot_taxable += $taxable
;
+ $regions{$label}->{'taxable'} += $t
axable
;
- $owed += $t * ($r->tax/100);
- $regions{$label}->{'owed'} += $t * ($r->tax/100);
+ $owed += $t
axable
* ($r->tax/100);
+ $regions{$label}->{'owed'} += $t
axable
* ($r->tax/100);
if ( defined($regions{$label}->{'rate'})
&& $regions{$label}->{'rate'} != $r->tax.'%' ) {
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,
'exempt_cust' => $exempt_cust,
'exempt_pkg' => $exempt_pkg,
'exempt_monthly' => $exempt_monthly,
- 'taxable' => $taxable,
+ 'taxable' => $t
ot_t
axable,
'rate' => '',
'owed' => $owed,
'tax' => $tax,
'rate' => '',
'owed' => $owed,
'tax' => $tax,