summaryrefslogtreecommitdiff
path: root/httemplate/search/cust_bill_pkg_referral.html
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2012-07-13 15:33:02 -0700
committerMark Wells <mark@freeside.biz>2012-07-13 15:33:02 -0700
commit15db7ad6e6ea2e57784368eec80e4aae54358f77 (patch)
treedcfd0ab0d1c76fdf1650cc934c78a2fb1cada6cc /httemplate/search/cust_bill_pkg_referral.html
parent0ad946f751d3a953c8a41eea1d30ad362ba38ace (diff)
sales by ad source report: filter by status, #17971
Diffstat (limited to 'httemplate/search/cust_bill_pkg_referral.html')
-rw-r--r--httemplate/search/cust_bill_pkg_referral.html11
1 files changed, 9 insertions, 2 deletions
diff --git a/httemplate/search/cust_bill_pkg_referral.html b/httemplate/search/cust_bill_pkg_referral.html
index 1bb6b9179..3cb434caa 100644
--- a/httemplate/search/cust_bill_pkg_referral.html
+++ b/httemplate/search/cust_bill_pkg_referral.html
@@ -135,8 +135,15 @@ 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) .')';
}
if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {