[freeside-commits] freeside/httemplate/search report_receivables.cgi, 1.52, 1.53 unapplied_cust_pay.html, 1.4, 1.5
Mark Wells
mark at wavetail.420.am
Thu Jul 22 00:25:38 PDT 2010
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv15617/httemplate/search
Modified Files:
report_receivables.cgi unapplied_cust_pay.html
Log Message:
Fix weird behavior of aging report, RT#9234
Index: unapplied_cust_pay.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/unapplied_cust_pay.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -d -r1.4 -r1.5
--- unapplied_cust_pay.html 11 Jun 2010 21:17:48 -0000 1.4
+++ unapplied_cust_pay.html 22 Jul 2010 07:25:36 -0000 1.5
@@ -13,19 +13,11 @@
<%once>
sub unapplied_payments {
- my($start, $end, $offset) = @_;
-
- #handle start and end ranges (86400 = 24h * 60m * 60s)
- my $str2time = str2time_sql;
- my $closing = str2time_sql_closing;
- $start = "( $str2time now() $closing - ".($start + $offset) * 86400 . ' )';
- $end = $end ?
- "( $str2time now() $closing - ".($end + $offset) * 86400 . ' )'
- : '';
+ my($start, $end, $cutoff) = @_;
FS::cust_main->unapplied_payments_date_sql( $start, $end,
- 'cutoff' => "( $str2time now() $closing - ".$offset * 86400 . ')' );
-
+ 'cutoff' => $cutoff,
+ );
}
</%once>
Index: report_receivables.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_receivables.cgi,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -w -d -r1.52 -r1.53
--- report_receivables.cgi 20 May 2010 01:33:08 -0000 1.52
+++ report_receivables.cgi 22 Jul 2010 07:25:35 -0000 1.53
@@ -29,24 +29,12 @@
# )
sub balance {
- my($start, $end, $offset) = @_; #, %opt ?
- #handle start and end ranges (86400 = 24h * 60m * 60s)
- my $str2time = str2time_sql;
- my $closing = str2time_sql_closing;
-
- # $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;
-
- FS::cust_main->balance_date_sql( $start, $end, 'unapplied_date'=>1,
- 'cutoff' => "( $str2time now() $closing - ".$offset * 86400 . ')' );
+ my($start, $end, $cutoff) = @_; #, %opt ?
+ FS::cust_main->balance_date_sql( $start, $end,
+ 'cutoff' => $cutoff,
+ 'unapplied_date'=>1,
+ );
}
</%once>
More information about the freeside-commits
mailing list