From: ivan Date: Fri, 17 Apr 2009 01:17:40 +0000 (+0000) Subject: add customer status to receivables report selection, hopefully help enet, RT#5187 X-Git-Tag: root_of_svc_elec_features~1266 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=caa6c563bd570fc53f333589bc95bc7a570626d0 add customer status to receivables report selection, hopefully help enet, RT#5187 --- 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