X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_bill_pkg_referral.html;h=77b486021113387c9acbbb091f43d1e5323c367e;hb=2cec1a0e7dfdb00a866a3c9a2947f61c1e9fbffd;hp=1bb6b9179d318a896629521bf31bc49f87328990;hpb=005424d0c899aa899f43f583a6c74deb13ea4be1;p=freeside.git diff --git a/httemplate/search/cust_bill_pkg_referral.html b/httemplate/search/cust_bill_pkg_referral.html index 1bb6b9179..77b486021 100644 --- a/httemplate/search/cust_bill_pkg_referral.html +++ b/httemplate/search/cust_bill_pkg_referral.html @@ -135,8 +135,25 @@ my @where = ( $agentnums_sql, "cust_bill._date <= $ending", ); -if ( $cgi->param('status') =~ /^([a-z]+)$/ ) { - push @where, FS::cust_pkg->cust_status_sql . " = '$1'"; +my @status_where; +foreach my $status ($cgi->param('status')) { + if ( $status =~ /^([- a-z]+)$/ ) { #"one-time charge" + push @status_where, "'$status'"; + } +} +if ( @status_where ) { + push @where, '('. FS::cust_pkg->status_sql. + ') 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).')'; } if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {