summaryrefslogtreecommitdiff
path: root/httemplate/search/unapplied_cust_pay.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/search/unapplied_cust_pay.html')
-rwxr-xr-xhttemplate/search/unapplied_cust_pay.html15
1 files changed, 11 insertions, 4 deletions
diff --git a/httemplate/search/unapplied_cust_pay.html b/httemplate/search/unapplied_cust_pay.html
index e232291fe..73361c00b 100755
--- a/httemplate/search/unapplied_cust_pay.html
+++ b/httemplate/search/unapplied_cust_pay.html
@@ -13,11 +13,18 @@ die "access denied"
<%once>
sub unapplied_payments {
- my($start, $end, $cutoff) = @_;
+ 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 . ' )'
+ : '';
+
+ FS::cust_main->unapplied_payments_date_sql( $start, $end );
- FS::cust_main->unapplied_payments_date_sql( $start, $end,
- 'cutoff' => $cutoff,
- );
}
</%once>