[freeside-commits] branch master updated. d6faa539e04d20a1b0dc6758ebe1248b6c801219

Ivan ivan at 420.am
Mon Jul 6 13:14:25 PDT 2015


The branch, master has been updated
       via  d6faa539e04d20a1b0dc6758ebe1248b6c801219 (commit)
      from  d1f83ecbaefdab8fbb3a05e87448f3351d9051b4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d6faa539e04d20a1b0dc6758ebe1248b6c801219
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Jul 6 13:14:22 2015 -0700

    fix "monthly recurring" display w/quantities, RT#36813

diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html
index 6be9545..7027ebd 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;
 %
 %     }
    

-----------------------------------------------------------------------

Summary of changes:
 httemplate/view/cust_main/billing.html |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list