X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main%2FPackages.pm;h=7090ce7654c281d9381f10acd27d27f4c3e83a21;hb=4171d4440a6bf042f342095f13439a5f9d27487d;hp=9e21dd2b04914e25bb34171379e4160cd2f9fb52;hpb=a181b24a0050bfca2ec220421f4cbc347533119f;p=freeside.git diff --git a/FS/FS/cust_main/Packages.pm b/FS/FS/cust_main/Packages.pm index 9e21dd2b0..7090ce765 100644 --- a/FS/FS/cust_main/Packages.pm +++ b/FS/FS/cust_main/Packages.pm @@ -155,7 +155,7 @@ sub order_pkg { } $cust_pkg->locationnum($opt->{'cust_location'}->locationnum); - } else { + } elsif ( ! $cust_pkg->locationnum ) { $cust_pkg->locationnum($self->ship_locationnum); @@ -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 );