X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main%2FPackages.pm;h=c147e551cf80b518b9d4e204ac9204ec5501018d;hb=43f8c4ca0668a417b86e1ef8d1c15b25097bc8a4;hp=d7a1e928a841a5c2aa853b2681791b766691196f;hpb=6da8d320d8792e6b70ec5cf1a40088f87f4762e5;p=freeside.git diff --git a/FS/FS/cust_main/Packages.pm b/FS/FS/cust_main/Packages.pm index d7a1e928a..c147e551c 100644 --- a/FS/FS/cust_main/Packages.pm +++ b/FS/FS/cust_main/Packages.pm @@ -574,6 +574,21 @@ sub active_pkgs { $self->unsuspended_pkgs; } +=item ncancelled_active_pkgs + +Returns all non-cancelled packages (see L) for this customer that +are active (recurring). + +=cut + +sub ncancelled_active_pkgs { + my $self = shift; + grep { my $part_pkg = $_->part_pkg; + $part_pkg->freq ne '' && $part_pkg->freq ne '0'; + } + $self->ncancelled_pkgs; +} + =item billing_pkgs Returns active packages, and also any suspended packages which are set to