diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-07-14 21:11:02 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-07-14 21:11:02 -0700 |
commit | 1ad6427250c2a45d450bb5045e0dc4907c53b450 (patch) | |
tree | 79ef458b6ea86fd163ac323a2cf06f8ebc10f4e8 /httemplate | |
parent | cb17f80a628d5d0d50b740ad92a3fcfb3946e6ca (diff) |
fix 477 report part V, RT#18503
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/search/477partV.html | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/httemplate/search/477partV.html b/httemplate/search/477partV.html index 55ebc0be2..0987fea44 100755 --- a/httemplate/search/477partV.html +++ b/httemplate/search/477partV.html @@ -34,9 +34,11 @@ $search_hash{'classnum'} = [ $cgi->param('classnum') ]; $search_hash{report_option} = $cgi->param('partv_report_option') if $cgi->param('partv_report_option'); -my $sql_query = FS::cust_pkg->search( { %search_hash, 'fcc_line' => 1 }); -$sql_query->{select} = 'DISTINCT substr(zip,1,5) as zip'; -$sql_query->{order_by} = 'ORDER BY substr(zip,1,5)'; +my $sql_query = FS::cust_pkg->search( { %search_hash, + 'fcc_line' => 1, + 'select_zip5' => 1, + } + ); my $count_query = delete($sql_query->{'count_query'}); $count_query =~ s/COUNT\(\*\)/count(DISTINCT substr(zip,1,5))/; $count_query =~ s/ORDER BY [.\w]+//; |