X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_future_autobill.html;h=ccde299e968818daf351c9c737494478f08e9cd4;hb=fe14c0ff8a609d9488c40e81eb25babfa691b34c;hp=ff2f85715389e8cb40dd950af29cbb1c1a60dab1;hpb=2f330afab567fda7679bfe24588598e3e5537467;p=freeside.git diff --git a/httemplate/search/report_future_autobill.html b/httemplate/search/report_future_autobill.html index ff2f85715..ccde299e9 100644 --- a/httemplate/search/report_future_autobill.html +++ b/httemplate/search/report_future_autobill.html @@ -25,6 +25,12 @@ Display date selector for the future_autobill.html report } &> + <% include('/elements/tr-select-agent.html', + 'label' => 'For agent: ', + 'disable_empty' => 0, + ) + %> +
@@ -39,28 +45,13 @@ Display date selector for the future_autobill.html report <%init> use FS::cust_payby; +use FS::CurrentUser; die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Financial reports'); my $target_date = DateTime->now->add(days => 1)->mdy('/'); - -# Dynamic report title -my $title_types = ''; -my $card_count = FS::cust_payby->count_autobill_cards; -my $check_count = FS::cust_payby->count_autobill_checks; -if ( $card_count && $check_count ) { - $title_types = 'Card and Check'; -} elsif ( $card_count ) { - $title_types = 'Card'; -} elsif ( $check_count ) { - $title_types = 'Check'; -} - -my $report_title = sprintf( - 'Upcoming Auto Bill %s Transactions', - $title_types, -); +my $report_title = FS::cust_payby->future_autobill_report_title;