[freeside-commits] freeside/httemplate/search report_receivables.html, 1.7, 1.8 report_receivables.cgi, 1.44, 1.45

Ivan,,, ivan at wavetail.420.am
Thu Apr 16 18:17:42 PDT 2009


Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv30035

Modified Files:
	report_receivables.html report_receivables.cgi 
Log Message:
add customer status to receivables report selection, hopefully help enet, RT#5187

Index: report_receivables.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_receivables.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- report_receivables.html	3 Dec 2008 23:29:28 -0000	1.7
+++ report_receivables.html	17 Apr 2009 01:17:40 -0000	1.8
@@ -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>

Index: report_receivables.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_receivables.cgi,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- report_receivables.cgi	31 Jul 2008 23:32:08 -0000	1.44
+++ report_receivables.cgi	17 Apr 2009 01:17:40 -0000	1.45
@@ -116,6 +116,15 @@
   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;
 



More information about the freeside-commits mailing list