diff options
Diffstat (limited to 'httemplate/search/report_tax.cgi')
-rwxr-xr-x | httemplate/search/report_tax.cgi | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/httemplate/search/report_tax.cgi b/httemplate/search/report_tax.cgi index bb9c8f433..eddb3da00 100755 --- a/httemplate/search/report_tax.cgi +++ b/httemplate/search/report_tax.cgi @@ -444,7 +444,20 @@ my %base_regions = (); foreach my $r ( qsearch( 'cust_main_county', {}, - "DISTINCT ON ( country, state, county, CASE WHEN taxname IS NULL THEN '' ELSE taxname END ) *", + "DISTINCT + country, + state, + county, + CASE WHEN taxname IS NULL THEN '' ELSE taxname END AS taxname,". + + #a little bit unsure of this part... test? + #ah, it looks like it winds up being irrelevant as ->{'tax'} + # from $regions is not displayed when show_taxclasses is on + ( $cgi->param('show_taxclasses') + ? " CASE WHEN taxclass IS NULL THEN '' ELSE taxclass END " + : " '' " + )." AS taxclass" + , $gotcust ) ) { |