X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fsearch%2Funapplied_cust_pay.html;fp=httemplate%2Fsearch%2Funapplied_cust_pay.html;h=73361c00b15000d9be6072ecdfe14e96e642c242;hb=4ca83488cafd75e2612358672e0f416918d951cf;hp=8d064d174fc00be8de85825d3d57716dfd56fd2b;hpb=5f71517b3de709a86c89dbacc6247cd6e52f4c42;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 );