summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--httemplate/elements/select-cust_pkg-status.html2
-rw-r--r--httemplate/search/cust_bill_pkg_referral.html11
-rw-r--r--httemplate/search/report_cust_bill_pkg_referral.html6
3 files changed, 17 insertions, 2 deletions
diff --git a/httemplate/elements/select-cust_pkg-status.html b/httemplate/elements/select-cust_pkg-status.html
index ec37eaf67..2114c07a1 100644
--- a/httemplate/elements/select-cust_pkg-status.html
+++ b/httemplate/elements/select-cust_pkg-status.html
@@ -3,7 +3,9 @@
<% $onchange %>
>
+% if ( !$opt{'disable_empty'} ) {
<OPTION VALUE="">all
+% }
% foreach my $option ( @{ $opt{'statuses'} } ) {
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+)$/ ) {
diff --git a/httemplate/search/report_cust_bill_pkg_referral.html b/httemplate/search/report_cust_bill_pkg_referral.html
index 1fbb13d4f..ff2caa1fa 100644
--- a/httemplate/search/report_cust_bill_pkg_referral.html
+++ b/httemplate/search/report_cust_bill_pkg_referral.html
@@ -12,6 +12,12 @@
'empty_label' => 'all',
&>
+<& /elements/tr-select-cust_pkg-status.html,
+ 'label' => 'Package status',
+ 'multiple' => 1,
+ 'disable_empty' => 1,
+&>
+
<& /elements/tr-select-pkg_class.html,
'pre_options' => [ '' => 'all', '0' => '(empty class)' ],
'disable_empty' => 1,