summaryrefslogtreecommitdiff
path: root/httemplate/search/cust_bill.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/search/cust_bill.html')
-rwxr-xr-xhttemplate/search/cust_bill.html12
1 files changed, 10 insertions, 2 deletions
diff --git a/httemplate/search/cust_bill.html b/httemplate/search/cust_bill.html
index 1e9ee8d..cf6ce49 100755
--- a/httemplate/search/cust_bill.html
+++ b/httemplate/search/cust_bill.html
@@ -122,8 +122,16 @@ if ( $cgi->param('invnum') =~ /^\s*(FS-)?(\d+)\s*$/ ) {
$search{'newest_percust'} = 1;
$count_query = "SELECT COUNT(DISTINCT cust_bill.custnum), 'N/A', 'N/A'";
}
-
- my $extra_sql = ' WHERE '. FS::cust_bill->search_sql_where( \%search );
+
+ my $payby_sql = '';
+ $payby_sql = ' AND (' .
+ join(' OR ', map { "cust_main.payby = '$_'" } $cgi->param('payby') ) .
+ ')'
+ if $cgi->param('payby');
+
+ my $extra_sql = ' WHERE '.
+ FS::cust_bill->search_sql_where( \%search ).
+ $payby_sql;
unless ( $count_query ) {
$count_query = 'SELECT COUNT(*), '. join(', ',