[freeside-commits] freeside/httemplate/search report_receivables.html, 1.10, 1.10.2.1 report_receivables.cgi, 1.49, 1.49.2.1 report_unapplied_cust_pay.html, 1.3, 1.3.2.1 unapplied_cust_pay.html, 1.2, 1.2.2.1
Mark Wells
mark at wavetail.420.am
Wed Mar 31 00:41:44 PDT 2010
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv14824
Modified Files:
Tag: FREESIDE_1_9_BRANCH
report_receivables.html report_receivables.cgi
report_unapplied_cust_pay.html unapplied_cust_pay.html
Log Message:
RT#7266: aging reports as of a past date
Index: report_receivables.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_receivables.html,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -w -d -r1.10 -r1.10.2.1
--- report_receivables.html 18 Jun 2009 01:17:09 -0000 1.10
+++ report_receivables.html 31 Mar 2010 07:41:42 -0000 1.10.2.1
@@ -24,6 +24,12 @@
<INPUT TYPE="radio" NAME="all_customers" VALUE="0" CHECKED onClick="if ( ! this.checked ) { document.OneTrueForm.days.disabled=true; document.OneTrueForm.days.style.backgroundColor = '#dddddd'; } else { document.OneTrueForm.days.disabled=false; document.OneTrueForm.days.style.backgroundColor = '#ffffff'; }">Customers with a balance over <INPUT NAME="days" TYPE="text" SIZE=4 MAXLENGTH=3 VALUE="0"> days old
</TD>
</TR>
+ <% include( '/elements/tr-input-date-field.html', {
+ 'name' => 'as_of',
+ 'value' => time,
+ 'label' => 'As of date ',
+ 'format' => FS::Conf->new->config('date_format') || '%m/%d/%Y',
+ } ) %>
</TABLE>
Index: unapplied_cust_pay.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/unapplied_cust_pay.html,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -w -d -r1.2 -r1.2.2.1
--- unapplied_cust_pay.html 9 Jul 2009 21:05:54 -0000 1.2
+++ unapplied_cust_pay.html 31 Mar 2010 07:41:42 -0000 1.2.2.1
@@ -13,13 +13,15 @@
<%once>
sub unapplied_payments {
- my($start, $end, %opt) = @_;
+ my($start, $end, $offset) = @_;
#handle start and end ranges (86400 = 24h * 60m * 60s)
my $str2time = str2time_sql;
my $closing = str2time_sql_closing;
- $start = $start ? "( $str2time now() $closing - ".($start * 86400). ' )' : '';
- $end = $end ? "( $str2time now() $closing - ".($end * 86400). ' )' : '';
+ $start = "( $str2time now() $closing - ".($start + $offset) * 86400 . ' )';
+ $end = $end ?
+ "( $str2time now() $closing - ".($end + $offset) * 86400 . ' )'
+ : '';
FS::cust_main->unapplied_payments_date_sql( $start, $end );
Index: report_receivables.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_receivables.cgi,v
retrieving revision 1.49
retrieving revision 1.49.2.1
diff -u -w -d -r1.49 -r1.49.2.1
--- report_receivables.cgi 9 Jul 2009 20:18:17 -0000 1.49
+++ report_receivables.cgi 31 Mar 2010 07:41:42 -0000 1.49.2.1
@@ -28,13 +28,18 @@
# )
sub balance {
- my($start, $end) = @_; #, %opt ?
-
+ my($start, $end, $offset) = @_; #, %opt ?
#handle start and end ranges (86400 = 24h * 60m * 60s)
my $str2time = str2time_sql;
my $closing = str2time_sql_closing;
- $start = $start ? "( $str2time now() $closing - ".($start * 86400). ' )' : '';
- $end = $end ? "( $str2time now() $closing - ".($end * 86400). ' )' : '';
+
+ # $end == 0 means "+infinity", while $start == 0 really means 0
+ # so we should always include a start condition
+ $start = "( $str2time now() $closing - ". ($start + $offset) * 86400 . ' )';
+ # but only include an end condition if $end != 0
+ $end = $end ?
+ "( $str2time now() $closing - ". ($end + $offset) * 86400 . ' )'
+ : '';
#$opt{'unapplied_date'} = 1;
Index: report_unapplied_cust_pay.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_unapplied_cust_pay.html,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -w -d -r1.3 -r1.3.2.1
--- report_unapplied_cust_pay.html 13 Jul 2009 07:10:45 -0000 1.3
+++ report_unapplied_cust_pay.html 31 Mar 2010 07:41:42 -0000 1.3.2.1
@@ -25,6 +25,12 @@
<INPUT TYPE="radio" NAME="all_customers" VALUE="0" CHECKED onClick="if ( ! this.checked ) { document.OneTrueForm.days.disabled=true; document.OneTrueForm.days.style.backgroundColor = '#dddddd'; } else { document.OneTrueForm.days.disabled=false; document.OneTrueForm.days.style.backgroundColor = '#ffffff'; }">Customers with unapplied payments over <INPUT NAME="days" TYPE="text" SIZE=4 MAXLENGTH=3 VALUE="0"> days old
</TD>
</TR>
+ <% include( '/elements/tr-input-date-field.html', {
+ 'name' => 'as_of',
+ 'value' => time,
+ 'label' => 'As of date ',
+ 'format' => FS::Conf->new->config('date_format') || '%m/%d/%Y',
+ } ) %>
</TABLE>
More information about the freeside-commits
mailing list