summaryrefslogtreecommitdiff
path: root/httemplate/search
diff options
context:
space:
mode:
authorivan <ivan>2009-04-17 01:17:40 +0000
committerivan <ivan>2009-04-17 01:17:40 +0000
commitcaa6c563bd570fc53f333589bc95bc7a570626d0 (patch)
tree398eddaa35302627c2d440fc0043cc45731ff24c /httemplate/search
parent05e3975829f4f6497d1e0aba4aea4d119759c09b (diff)
add customer status to receivables report selection, hopefully help enet, RT#5187
Diffstat (limited to 'httemplate/search')
-rwxr-xr-xhttemplate/search/report_receivables.cgi9
-rwxr-xr-xhttemplate/search/report_receivables.html5
2 files changed, 14 insertions, 0 deletions
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 @@
</TR>
<% include( '/elements/tr-select-agent.html', 'disable_empty'=>0 ) %>
+
+ <% include( '/elements/tr-select-cust_main-status.html',
+ 'label' => 'Customer Status'
+ )
+ %>
<TR>
<TD ALIGN="right">Customers</TD>