From edef3cc1226f64506d2bbc92e2a3dc0507e77b81 Mon Sep 17 00:00:00 2001 From: Mitch Jackson Date: Thu, 20 Sep 2018 14:02:03 -0400 Subject: [PATCH] RT# 78547 Future autobill report - report totals --- httemplate/search/future_autobill.html | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) 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 ) { + + + + +% for my $pmt_type ( sort keys %pmt_type_subtotal ) { + + + + +% } +% $pmt_type_subtotal{Total} += $_ for values %pmt_type_subtotal; + + + + +
+ Summary +
+ <% sprintf '$%.2f', $pmt_type_subtotal{ $pmt_type } %> + + <% $pmt_type |h %> +
+ <% sprintf( '$%.2f', $pmt_type_subtotal{Total} ) %> + + Total +
+% } <%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 -- 2.11.0