X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_pkg.cgi;h=297edee90b6622c8960e9d7086cb1640f7e3df3a;hb=b6dbe0f12dbbe4ea5209367f905f937789b5b607;hp=d48ba1916ddca93e666d66f3f21740786de0aa82;hpb=6c135249a792decae9f8f98eda5ee4077efcdb34;p=freeside.git
diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi
index d48ba1916..297edee90 100755
--- a/httemplate/search/cust_pkg.cgi
+++ b/httemplate/search/cust_pkg.cgi
@@ -150,18 +150,23 @@ for (qw( agentnum custnum magic status custom cust_fields pkgbatch )) {
}
#arrays
-for (qw( pkgpart classnum )) {
- $search_hash{$_} = [ $cgi->param($_) ];
+for my $param (qw( pkgpart classnum )) {
+ $search_hash{$param} = [ $cgi->param($param) ]
+ if grep { $_ eq $param } $cgi->param;
}
-for my $param ( qw(censustract) ) {
+#scalars that need to be passed if empty
+for my $param (qw( censustract censustract2 )) {
$search_hash{$param} = $cgi->param($param) || ''
- if ( grep { /$param/ } $cgi->param );
+ if grep { $_ eq $param } $cgi->param;
}
-my @report_option = $cgi->param('report_option')
- if $cgi->param('report_option');
-$search_hash{report_option} = join(',', @report_option) if @report_option;
+my $report_option = $cgi->param('report_option');
+$search_hash{report_option} = $report_option if $report_option;
+
+for my $param (grep /^report_option_any/, $cgi->param) {
+ $search_hash{$param} = $cgi->param($param);
+}
###
# parse dates
@@ -247,7 +252,7 @@ my $html_init = sub {
$text .= include( '/elements/email-link.html',
'search_hash' => \%search_hash,
'table' => 'cust_pkg',
- );
+ ). '
';
}
return $text;
};