diff options
author | Ivan Kohler <ivan@freeside.biz> | 2017-02-08 11:48:24 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2017-02-08 11:48:24 -0800 |
commit | 327db72830c235a53d9a8ff2eec15c07eeeeb3ca (patch) | |
tree | c79e0c6e55080e01830061d9eec61f9ea8d7d4ec /FS/FS/cust_main/Packages.pm | |
parent | d0e6e5ffa6a1fab7b291a941927b24e26e174a01 (diff) |
fix recurring display w/discounts, RT#41844
Diffstat (limited to 'FS/FS/cust_main/Packages.pm')
-rw-r--r-- | FS/FS/cust_main/Packages.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/FS/FS/cust_main/Packages.pm b/FS/FS/cust_main/Packages.pm index 4c79c7d..be7de85 100644 --- a/FS/FS/cust_main/Packages.pm +++ b/FS/FS/cust_main/Packages.pm @@ -618,6 +618,8 @@ this customer that are active (recurring). =cut +#recurring_pkgs? different from cust_pkg idea of "active" which has +# a setup vs not_yet_billed which doesn't sub active_pkgs { my $self = shift; grep { my $part_pkg = $_->part_pkg; @@ -633,6 +635,8 @@ are active (recurring). =cut +#ncancelled_recurring_pkgs? different from cust_pkg idea of "active" which has +# a setup vs not_yet_billed which doesn't sub ncancelled_active_pkgs { my $self = shift; grep { my $part_pkg = $_->part_pkg; @@ -887,7 +891,7 @@ sub display_recurring { 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 -= $pkg_amount * $discount->percent/100; } $pkg_amount *= ( $cust_pkg->quantity || 1 ); |