diff options
author | ivan <ivan> | 2008-07-07 23:47:15 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-07-07 23:47:15 +0000 |
commit | e4363a48eab0797d5349b00f2d9f5f02bd2672bc (patch) | |
tree | d2ff4b4eca93f97f694c0bd14eb0c83b6d427500 /httemplate/search | |
parent | 104972679d3122d6fcba9e137cb951d161d08a2e (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')
-rwxr-xr-x | httemplate/search/report_tax.cgi | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/httemplate/search/report_tax.cgi b/httemplate/search/report_tax.cgi index b029ec074..05c272349 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; } |