X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2F477partV.html;h=2fd5119d1ebf0ae517db0067f17a689f8f2e0586;hb=f2e7b5d30a04b6f050e0a82afd8b95c81730bc0c;hp=a30a9bf775d746cb110e84157c4d5e03ee575989;hpb=cb27e3918663fa60f0e21d9fcbd1d2c0b5c7298e;p=freeside.git diff --git a/httemplate/search/477partV.html b/httemplate/search/477partV.html index a30a9bf77..2fd5119d1 100755 --- a/httemplate/search/477partV.html +++ b/httemplate/search/477partV.html @@ -10,7 +10,7 @@ 'no_field_elements' => 1, 'fields' => [ 'zip' ], 'url' => $opt{url} || '', - 'disable_download' => 1, + 'really_disable_download' => 1, ) %> @@ -27,19 +27,21 @@ my %search_hash = (); my @sql_query = (); my @count_query = (); -for ( qw(agentnum magic) ) { +for ( qw(agentnum magic state) ) { $search_hash{$_} = $cgi->param($_) if $cgi->param($_); } +$search_hash{'country'} = 'US'; $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]+//; -warn "\ncount_query:\n$count_query\n\nsql_query:\n".Dumper($sql_query)."\n\n";