[freeside-commits] branch FREESIDE_3_BRANCH updated. 9f3d40d71b076c664b38c1cfa4b60c12d42c473a
Ivan
ivan at 420.am
Wed Feb 8 11:48:27 PST 2017
The branch, FREESIDE_3_BRANCH has been updated
via 9f3d40d71b076c664b38c1cfa4b60c12d42c473a (commit)
from 360ddc75126ea4b87dfd7a3b98fac47ed03f0fd4 (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 9f3d40d71b076c664b38c1cfa4b60c12d42c473a
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Feb 8 11:48:26 2017 -0800
fix recurring display w/discounts, RT#41844
diff --git a/FS/FS/cust_main/Packages.pm b/FS/FS/cust_main/Packages.pm
index 4201cf8..fec9fd3 100644
--- a/FS/FS/cust_main/Packages.pm
+++ b/FS/FS/cust_main/Packages.pm
@@ -593,6 +593,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;
@@ -608,6 +610,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;
@@ -807,7 +811,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 );
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_main/Packages.pm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list