X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_future_autobill.html;h=28f589ee7d3536e031e471b2dac08a57d40e784a;hb=793956b8a0c19d7d39103e94235b0ca13f0f3e84;hp=ff2f85715389e8cb40dd950af29cbb1c1a60dab1;hpb=b89e874e8258288d15c98ed3799a9fede6515fd5;p=freeside.git diff --git a/httemplate/search/report_future_autobill.html b/httemplate/search/report_future_autobill.html index ff2f85715..28f589ee7 100644 --- a/httemplate/search/report_future_autobill.html +++ b/httemplate/search/report_future_autobill.html @@ -1,6 +1,9 @@ <%doc> -Display date selector for the future_autobill.html report +Display pre-report page for the Future Auto Bill Transactions report + +Report runs in the queue. Once the report is generated, user is +redirected to the report results. <% include('/elements/header.html', $report_title ) %> @@ -14,53 +17,57 @@ Display date selector for the future_autobill.html report % } else { -
- - <& /elements/tr-input-date-field.html, - { - name => 'target_date', - value => $target_date, - label => emt('Target billing date').': ', - required => 1 - } - &> - -
- -
- - - + + + <& /elements/tr-input-date-field.html, + { + name => 'target_date', + value => $target_date, + label => emt('Target billing date').': ', + required => 1 + } + &> + + <% include('/elements/tr-select-agent.html', + 'label' => 'For agent: ', + 'disable_empty' => 0, + ) + %> +
+
+ +
+ <% include( '/elements/progress-init.html', + 'future_autobill', + [ qw( agentnum target_date ) ], + 'report_future_autobill-queued_job.html', + ) + %> + + + % } <% include('/elements/footer.html') %> <%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;