diff options
author | Mitch Jackson <mitch@freeside.biz> | 2018-09-11 03:33:33 -0400 |
---|---|---|
committer | Mitch Jackson <mitch@freeside.biz> | 2018-09-11 03:33:33 -0400 |
commit | b89e874e8258288d15c98ed3799a9fede6515fd5 (patch) | |
tree | 45d3edf1845a5956ee3ded43f5c5e41b3e6250a9 /httemplate/search/report_future_autobill.html | |
parent | 829aa888318799d2ff4871c92b0d457abda49714 (diff) |
RT# 78547 Upcoming Auto-Bill Transaction Report
Diffstat (limited to 'httemplate/search/report_future_autobill.html')
-rw-r--r-- | httemplate/search/report_future_autobill.html | 66 |
1 files changed, 45 insertions, 21 deletions
diff --git a/httemplate/search/report_future_autobill.html b/httemplate/search/report_future_autobill.html index 1a0c9f48a..ff2f85715 100644 --- a/httemplate/search/report_future_autobill.html +++ b/httemplate/search/report_future_autobill.html @@ -3,40 +3,64 @@ Display date selector for the future_autobill.html report </%doc> -<% include('/elements/header.html', 'Future Auto-Bill Transactions' ) %> +<% include('/elements/header.html', $report_title ) %> -<FORM ACTION="future_autobill.html" METHOD="GET"> -<TABLE> -<& /elements/tr-input-date-field.html, - { - name => 'target_date', - value => $target_date, - label => emt('Target billing date').': ', - required => 1 - } -&> +% if ( FS::TaxEngine->new->info->{batch} ) { -<& /elements/tr-checkbox.html, - 'label' => emt('Multiple billing dates (slow)').': ', - 'field' => 'multiple_billing_dates', - 'value' => '1', -&> + <div style="font-color: red"> + NOTE: This report is disabled due to tax engine configuration + </div> -</TABLE> +% } else { -<BR> -<INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>"> + <FORM ACTION="future_autobill.html" METHOD="GET"> + <TABLE> + <& /elements/tr-input-date-field.html, + { + name => 'target_date', + value => $target_date, + label => emt('Target billing date').': ', + required => 1 + } + &> -</FORM> + </TABLE> + + <BR> + + <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>"> + + </FORM> + +% } <% include('/elements/footer.html') %> <%init> +use FS::cust_payby; die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Financial reports'); -my $target_date = DateTime->from_epoch(epoch=>(time()+86400))->mdy('/'); +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, +); </%init> + |