diff options
| author | Mitch Jackson <mitch@freeside.biz> | 2018-09-20 14:02:03 -0400 |
|---|---|---|
| committer | Mitch Jackson <mitch@freeside.biz> | 2018-09-20 14:05:33 -0400 |
| commit | edef3cc1226f64506d2bbc92e2a3dc0507e77b81 (patch) | |
| tree | 2ed1b4507ca785fcafcabd78409b6808c3ddaaf0 | |
| parent | 5aa5b25d6149129a676daadfa39c878a1f5823bf (diff) | |
RT# 78547 Future autobill report - report totals
| -rw-r--r-- | httemplate/search/future_autobill.html | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/httemplate/search/future_autobill.html b/httemplate/search/future_autobill.html index 3385dd880..8f59d71db 100644 --- a/httemplate/search/future_autobill.html +++ b/httemplate/search/future_autobill.html @@ -35,6 +35,34 @@ there will be 1,400 billing and payment cycles simulated suppress_header => $job ? 1 : 0, suppress_footer => $job ? 1 : 0, &> +% if ( %pmt_type_subtotal ) { + <table class="gridreport" style="margin-left: 2em;"> + <tr> + <th class="gridreport" colspan="2"> + Summary + </th> + </tr> +% for my $pmt_type ( sort keys %pmt_type_subtotal ) { + <tr class="gridreport"> + <td class="gridreport" style="text-align: right; margin-right: 1em;"> + <% sprintf '$%.2f', $pmt_type_subtotal{ $pmt_type } %> + </td> + <td class="gridreport"> + <% $pmt_type |h %> + </td> + </tr> +% } +% $pmt_type_subtotal{Total} += $_ for values %pmt_type_subtotal; + <tr class="gridreport" style="border-top: solid 1px #999;"> + <td class="gridreport" style="text-align: right; margin-right: 1em; border-top: solid 1px #666;"> + <% sprintf( '$%.2f', $pmt_type_subtotal{Total} ) %> + </td> + <td class="gridreport" style="border-top: solid 1px #666;"> + Total + </td> + </tr> + </table> +% } <%init> use DateTime; @@ -134,6 +162,7 @@ there will be 1,400 billing and payment cycles simulated my $fakebill_time = time(); my %abreport; my @rows; + my %pmt_type_subtotal; local $@; local $SIG{__DIE__}; @@ -239,6 +268,9 @@ there will be 1,400 billing and payment cycles simulated ] }; + $pmt_type_subtotal{ $cust_pay->paycardtype || $cust_pay-> payby } + += $cust_pay->paid; + } # /foreach payment # Roll back database at the end of each customer |
