X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fsearch%2Funapplied_cust_pay.html;h=73361c00b15000d9be6072ecdfe14e96e642c242;hb=7b125e587a4d1ee0aca692e23ea7897f671855ae;hp=8d064d174fc00be8de85825d3d57716dfd56fd2b;hpb=40a7b3dc653e099f7bd0bd762b649b04c4432db2;p=freeside.git diff --git a/httemplate/search/unapplied_cust_pay.html b/httemplate/search/unapplied_cust_pay.html index 8d064d174..73361c00b 100755 --- a/httemplate/search/unapplied_cust_pay.html +++ b/httemplate/search/unapplied_cust_pay.html @@ -13,13 +13,15 @@ die "access denied" <%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 );