From bd39db7a960f64d6a19e714aa8d74ccab1fd04c5 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 1 Mar 2008 22:23:41 +0000 Subject: add payby selection to adv. customer search --- httemplate/search/cust_main.html | 11 +++++++++++ httemplate/search/report_cust_main.html | 11 +++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'httemplate/search') diff --git a/httemplate/search/cust_main.html b/httemplate/search/cust_main.html index 00fd1531a..5fb5ddad9 100755 --- a/httemplate/search/cust_main.html +++ b/httemplate/search/cust_main.html @@ -68,6 +68,17 @@ foreach my $field (qw( signupdate )) { } +### +# payby +### + +my @payby = grep /^([A-Z]{4})$/, $cgi->param('payby'); +if ( @payby ) { + push @where, '( '. join(' OR ', map "cust_main.payby = '$_'", @payby). ' )'; +} + +### + ## # amounts ## diff --git a/httemplate/search/report_cust_main.html b/httemplate/search/report_cust_main.html index 50bc67b3d..758c26923 100755 --- a/httemplate/search/report_cust_main.html +++ b/httemplate/search/report_cust_main.html @@ -29,9 +29,16 @@ % } + + <% include( '/elements/tr-select-payby.html', + 'payby_type' => 'cust', + 'multiple' => 1, + 'curr_value' => { map { $_ => 1 } FS::payby->cust_payby }, + ) + %> <% include( '/elements/tr-input-lessthan_greaterthan.html', - label => 'Current Balance', + label => 'Current balance', field => 'current_balance', ) %> @@ -69,7 +76,7 @@ die "access denied" <%once> my %label = ( - 'signupdate' => 'Signup Date', + 'signupdate' => 'Signup date', ); -- cgit v1.2.1