From caa6c563bd570fc53f333589bc95bc7a570626d0 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 17 Apr 2009 01:17:40 +0000 Subject: [PATCH] add customer status to receivables report selection, hopefully help enet, RT#5187 --- httemplate/search/report_receivables.cgi | 9 +++++++++ httemplate/search/report_receivables.html | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/httemplate/search/report_receivables.cgi b/httemplate/search/report_receivables.cgi index 58d87fa53..c5ca45338 100755 --- a/httemplate/search/report_receivables.cgi +++ b/httemplate/search/report_receivables.cgi @@ -116,6 +116,15 @@ if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) { push @where, "agentnum = $agentnum"; } +#status (false laziness w/cust_main::search_sql + +#prospect active inactive suspended cancelled +if ( grep { $cgi->param('status') eq $_ } FS::cust_main->statuses() ) { + my $method = $cgi->param('status'). '_sql'; + #push @where, $class->$method(); + push @where, FS::cust_main->$method(); +} + #here is the agent virtualization push @where, $FS::CurrentUser::CurrentUser->agentnums_sql; diff --git a/httemplate/search/report_receivables.html b/httemplate/search/report_receivables.html index 19b1ee7cc..1ebe08cb8 100755 --- a/httemplate/search/report_receivables.html +++ b/httemplate/search/report_receivables.html @@ -11,6 +11,11 @@ <% include( '/elements/tr-select-agent.html', 'disable_empty'=>0 ) %> + + <% include( '/elements/tr-select-cust_main-status.html', + 'label' => 'Customer Status' + ) + %> Customers -- 2.11.0