X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_bill_pkg_referral.html;h=1289ff7ee0f487b65f2164e1c971c23c6c7882df;hb=c7286ce9036d71665c2bfed9de93f87309b72d35;hp=3cb434caa2ed4d03e0330661a8666072a5a80852;hpb=8c450aab9bae89373c2c1b35c85597bb52299de3;p=freeside.git diff --git a/httemplate/search/cust_bill_pkg_referral.html b/httemplate/search/cust_bill_pkg_referral.html index 3cb434caa..1289ff7ee 100644 --- a/httemplate/search/cust_bill_pkg_referral.html +++ b/httemplate/search/cust_bill_pkg_referral.html @@ -146,6 +146,21 @@ if ( @status_where ) { ') IN (' . join(',', @status_where) .')'; } +my @refnum; +foreach my $refnum ($cgi->param('refnum')) { + if ( $refnum =~ /^\d+$/ ) { + push @refnum, $refnum; + } +} +if ( @refnum ) { + push @where, 'cust_main.refnum IN ('.join(',', @refnum).')'; +} + +my @cust_classnums = grep /^\d+$/, $cgi->param('cust_classnum'); +if ( @cust_classnums ) { + push @where, 'cust_main.classnum IN ('.join(',', @cust_classnums).')'; +} + if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) { push @where, "cust_main.agentnum = $1"; }