diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-07-06 13:14:26 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-07-06 13:14:26 -0700 |
commit | 3eed660cf0bd278fef3bbd34f1d66083b946d797 (patch) | |
tree | 14f616f2e90e0dd0fa965cb391c0a7c939f0e57b | |
parent | 8da6efb71ff599762d145904c613ae75d98b10dd (diff) |
fix "monthly recurring" display w/quantities, RT#36813
-rw-r--r-- | httemplate/view/cust_main/billing.html | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html index 6be9545ac..7027ebd87 100644 --- a/httemplate/view/cust_main/billing.html +++ b/httemplate/view/cust_main/billing.html @@ -57,9 +57,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 @@ -67,11 +69,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; % % } |