<% include( 'elements/cust_main_dayranges.html', #'title' => 'Prepaid Balance Aging Summary', #??? 'title' => 'Unapplied Payments Aging Summary', 'range_sub' => \&unapplied_payments, ) %> <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Financial reports'); <%once> sub unapplied_payments { my($start, $end, $cutoff) = @_; FS::cust_main->unapplied_payments_date_sql( $start, $end, 'cutoff' => $cutoff, ); }