[freeside-commits] freeside/httemplate/search report_cust_main.html, 1.4, 1.5 cust_main.html, 1.7, 1.8
Jeff Finucane,420,,
jeff at wavetail.420.am
Wed Dec 19 13:05:39 PST 2007
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail:/tmp/cvs-serv26657/httemplate/search
Modified Files:
report_cust_main.html cust_main.html
Log Message:
add options for balance over/under to advanced customer report
Index: report_cust_main.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_cust_main.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- report_cust_main.html 16 Dec 2007 21:01:45 -0000 1.4
+++ report_cust_main.html 19 Dec 2007 21:05:37 -0000 1.5
@@ -30,6 +30,12 @@
% }
+ <% include( '/elements/tr-input-lessthan_greaterthan.html',
+ label => 'Current Balance',
+ field => 'current_balance',
+ )
+ %>
+
<TR>
<TD ALIGN="right" VALIGN="center">Include cancelled packages</TD>
<TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
Index: cust_main.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cust_main.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- cust_main.html 16 Dec 2007 20:48:14 -0000 1.7
+++ cust_main.html 19 Dec 2007 21:05:37 -0000 1.8
@@ -69,6 +69,15 @@
}
##
+# amounts
+##
+
+my $balance_sql = FS::cust_main->balance_sql();
+
+push @where, map { s/current_balance/$balance_sql/; $_ }
+ FS::UI::Web::parse_lt_gt($cgi, 'current_balance');
+
+##
# setup queries, subs, etc. for the search
##
@@ -83,7 +92,11 @@
my $count_query = "SELECT COUNT(*) FROM cust_main $extra_sql";
-my $select = '*';
+my $select = join(', ',
+ 'cust_main.custnum',
+ FS::UI::Web::cust_sql_fields($cgi->param('cust_fields')),
+ );
+
my (@extra_headers) = ();
my (@extra_fields) = ();
More information about the freeside-commits
mailing list