X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Ffuture_autobill.html;h=2e723ec79d025d281cc8818e51b288800e73fb76;hb=a284ef4c8d9d43db336a77db4c34996344cd5717;hp=1f3862fbc27854a035f324e86422a4ef3b6e3469;hpb=9ea31f98372bc897fd0b4d7e63284eecabf27aa2;p=freeside.git
diff --git a/httemplate/search/future_autobill.html b/httemplate/search/future_autobill.html
index 1f3862fbc..2e723ec79 100644
--- a/httemplate/search/future_autobill.html
+++ b/httemplate/search/future_autobill.html
@@ -35,6 +35,36 @@ there will be 1,400 billing and payment cycles simulated
suppress_header => $job ? 1 : 0,
suppress_footer => $job ? 1 : 0,
&>
+% if ( %pmt_type_subtotal ) {
+
+
+
+ Summary
+ |
+
+% for my $pmt_type ( sort keys %pmt_type_subtotal ) {
+
+
+ <% sprintf '$%.2f', $pmt_type_subtotal{ $pmt_type } %>
+ |
+
+ <% $pmt_type |h %>
+ |
+
+% }
+% if ( keys %pmt_type_subtotal > 1 ) {
+% $pmt_type_subtotal{Total} += $_ for values %pmt_type_subtotal;
+
+
+ <% sprintf( '$%.2f', $pmt_type_subtotal{Total} ) %>
+ |
+
+ Total
+ |
+
+
+% }
+% }
<%init>
use DateTime;
@@ -121,8 +151,8 @@ there will be 1,400 billing and payment cycles simulated
order_by => " ORDER BY weight DESC ",
extra_sql =>
"AND (
- payby IN ('CHEK','DCHK','DCHEK')
- OR ( paydate > '".$target_dt->ymd."')
+ cust_payby.payby IN ('CHEK','DCHK','DCHEK')
+ OR ( cust_payby.paydate > '".$target_dt->ymd."')
)
AND " . $FS::CurrentUser::CurrentUser->agentnums_sql
. ($agentnum ? "AND cust_main.agentnum = $agentnum" : ''),
@@ -134,6 +164,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 +270,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