summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-07-06 13:14:28 -0700
committerIvan Kohler <ivan@freeside.biz>2015-07-06 13:14:28 -0700
commit0ec4177b088852a185b88ce3e9941a3ecbc2cb59 (patch)
treea9a835747775dd0e8ff6836be98bdf5725832486 /httemplate
parent58b18f705e1be83a81c028f18908c1de2aae858e (diff)
fix "monthly recurring" display w/quantities, RT#36813
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/view/cust_main/billing.html12
1 files changed, 8 insertions, 4 deletions
diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html
index 656fa7fec..828fbd3c4 100644
--- a/httemplate/view/cust_main/billing.html
+++ b/httemplate/view/cust_main/billing.html
@@ -61,9 +61,11 @@
% || $cust_pkg->option('no_suspend_bill')
% );
%
+% my $pkg_amount = 0;
+%
% #add recurring amounts for this package and its billing add-ons
% foreach my $l_part_pkg ( $part_pkg->self_and_bill_linked ) {
-% $amount += $l_part_pkg->base_recur;
+% $pkg_amount += $l_part_pkg->base_recur;
% }
%
% #subtract amounts for any active discounts
@@ -71,11 +73,13 @@
% foreach my $cust_pkg_discount ( $cust_pkg->cust_pkg_discount_active ) {
% my $discount = $cust_pkg_discount->discount;
% #and only one of these for each
-% $amount -= $discount->amount;
-% $amount -= $amount * $discount->percent/100;
+% $pkg_amount -= $discount->amount;
+% $pkg_amount -= $amount * $discount->percent/100;
% }
%
-% $amount *= ( $cust_pkg->quantity || 1 );
+% $pkg_amount *= ( $cust_pkg->quantity || 1 );
+%
+% $amount += $pkg_amount;
%
% }