X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_pkg.pm;h=c3734b54e3c58a54b344b317f7f55e9be08c56bf;hb=cc647ae934abe5c9d9a5fc12f020adfc566349d9;hp=acc73dfda74606a804f8764a867e6956895d1836;hpb=8a0204b4a129a3c26dcca18ba401b2de26d22d2b;p=freeside.git diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index acc73dfda..c3734b54e 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -2388,10 +2388,7 @@ sub cust_pkg_discount { sub cust_pkg_discount_active { my $self = shift; - grep { my $d = $_->discount; - ! $d->months || $_->months_used < $d->months; # XXX also end date - } - $self->cust_pkg_discount; + grep { $_->status eq 'active' } $self->cust_pkg_discount; } =back