[freeside-commits] freeside/httemplate/search
report_receivables.cgi, 1.34, 1.35 report_receivables.html, 1.3, 1.4
Ivan,,,
ivan at wavetail.420.am
Mon Feb 5 05:10:19 PST 2007
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail:/tmp/cvs-serv9576
Modified Files:
report_receivables.cgi report_receivables.html
Log Message:
add "over X days" option to receivables report
Index: report_receivables.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_receivables.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- report_receivables.html 3 Feb 2007 11:36:30 -0000 1.3
+++ report_receivables.html 5 Feb 2007 13:10:16 -0000 1.4
@@ -4,7 +4,12 @@
<TABLE>
- <% include( '/elements/tr-select-agent.html' ) %>
+ <% include( '/elements/tr-select-agent.html' ) %>
+
+ <TR>
+ <TD ALIGN="right">Over </TD>
+ <TD><INPUT NAME="days" TYPE="text" SIZE=4 MAXLENGTH=3> days</TD>
+ </TR>
</TABLE>
Index: report_receivables.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_receivables.cgi,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- report_receivables.cgi 3 Feb 2007 11:36:30 -0000 1.34
+++ report_receivables.cgi 5 Feb 2007 13:10:16 -0000 1.35
@@ -83,10 +83,7 @@
)
%>
-<%init>
-
-die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
+<%once>
sub owed {
my($start, $end, %opt) = @_;
@@ -140,6 +137,12 @@
}
+</%once>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
+
my @ranges = (
[ 0, 30 ],
[ 30, 60 ],
@@ -165,7 +168,13 @@
( $select_count_pkgs AND $cancelled_sql ) AS cancelled_pkgs
END
-my $where = "where ". owed(0, 0, 'cust'=>1, 'noas'=>1). " > 0";
+my $days = 0;
+if ( $cgi->param('days') =~ /^\s*(\d+)\s*$/ ) {
+ $days = $1;
+}
+
+#my $where = "where ". owed(0, 0, 'cust'=>1, 'noas'=>1). " > 0";
+my $where = "where ". owed($days, 0, 'cust'=>1, 'noas'=>1). " > 0";
my $agentnum = '';
if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
More information about the freeside-commits
mailing list