summaryrefslogtreecommitdiff
path: root/httemplate/search/report_tax.cgi
diff options
context:
space:
mode:
authorivan <ivan>2008-07-07 23:47:16 +0000
committerivan <ivan>2008-07-07 23:47:16 +0000
commit943f2a2cdc918b37ed5b79e32d5fdbed8edc1918 (patch)
tree5983a42e8350401dcdc0a9f710b51fd94330c94b /httemplate/search/report_tax.cgi
parent31fa8cb66d7480c730b2aa7c3112a61c14c2ba6b (diff)
should be a proper fix for edge cases where you have taxclass and empty-taxclass rates for a region, whew
Diffstat (limited to 'httemplate/search/report_tax.cgi')
-rwxr-xr-xhttemplate/search/report_tax.cgi4
1 files changed, 2 insertions, 2 deletions
diff --git a/httemplate/search/report_tax.cgi b/httemplate/search/report_tax.cgi
index 62ba08702..a49c8506d 100755
--- a/httemplate/search/report_tax.cgi
+++ b/httemplate/search/report_tax.cgi
@@ -327,7 +327,7 @@ foreach my $r (qsearch('cust_main_county', {}, '', $gotcust) ) {
if ( scalar(@taxclasses) ) {
$mywhere .= ' AND '. join(' AND ', map ' taxclass != ? ', @taxclasses );
- push @param, @taxclasses;
+ push @param, map \$_, @taxclasses;
}
}
@@ -559,7 +559,7 @@ sub scalar_sql {
my( $r, $param, $sql ) = @_;
#warn "$sql\n";
my $sth = dbh->prepare($sql) or die dbh->errstr;
- $sth->execute( map $r->$_(), @$param )
+ $sth->execute( map { ref($_) ? ${$_} : $r->$_() } @$param )
or die "Unexpected error executing statement $sql: ". $sth->errstr;
$sth->fetchrow_arrayref->[0] || 0;
}