-
-
- Electronic check <% $cust_main->payby eq 'CHEK' ? '(automatic)' : '(on-demand)' %>
- </TD>
-</TR>
-<TR>
- <TD ALIGN="right">ABA/Routing code</TD>
- <TD BGCOLOR="#ffffff"><% $aba %></TD>
-</TR>
-<TR>
- <TD ALIGN="right">Account number</TD>
- <TD BGCOLOR="#ffffff"><% 'x'x(length($account)-2). substr($account,(length($account)-2)) %></TD>
-</TR>
-<TR>
- <TD ALIGN="right">Account type</TD>
- <TD BGCOLOR="#ffffff"><% $cust_main->paytype %></TD>
-</TR>
-<TR>
- <TD ALIGN="right">Bank name</TD>
- <TD BGCOLOR="#ffffff"><% $cust_main->payname %></TD>
-</TR>
-% if ( $conf->exists('show_bankstate') ) {
-<TR>
- <TD ALIGN="right"><% $paystate_label %></TD>
- <TD BGCOLOR="#ffffff"><% $cust_main->paystate || ' ' %></TD>
-</TR>
-% }
-% } elsif ( $cust_main->payby eq 'LECB' ) {
-% $cust_main->payinfo =~ /^(\d{3})(\d{3})(\d{4})$/;
-% my $payinfo = "$1-$2-$3";
+% #add recurring amounts for this package and its billing add-ons
+% foreach my $l_part_pkg ( $part_pkg->self_and_bill_linked ) {
+% $pkg_amount += $l_part_pkg->base_recur($cust_pkg);
+% }
+%
+% #subtract amounts for any active discounts
+% #(there should only be one at the moment, otherwise this makes no sense)
+% foreach my $cust_pkg_discount ( $cust_pkg->cust_pkg_discount_active ) {
+% my $discount = $cust_pkg_discount->discount;
+% #and only one of these for each
+% $pkg_amount -= $discount->amount;
+% $pkg_amount -= $amount * $discount->percent/100;
+% }
+%
+% $pkg_amount *= ( $cust_pkg->quantity || 1 );