X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_main%2FPackages.pm;h=7090ce7654c281d9381f10acd27d27f4c3e83a21;hp=3f4792e1a7afe8da70633af6ef6d6c1c1769d5e0;hb=a6f90db7a81b1cee5749e42878188577fa5d99b5;hpb=ac8410cdb67639afeb84c84e975fffadf3e6cce1 diff --git a/FS/FS/cust_main/Packages.pm b/FS/FS/cust_main/Packages.pm index 3f4792e1a..7090ce765 100644 --- a/FS/FS/cust_main/Packages.pm +++ b/FS/FS/cust_main/Packages.pm @@ -602,6 +602,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; @@ -617,6 +619,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; @@ -871,7 +875,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 );