summaryrefslogtreecommitdiff
path: root/FS/FS/cust_main/Packages.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-05-09 15:16:09 -0700
committerIvan Kohler <ivan@freeside.biz>2015-05-09 15:16:09 -0700
commit627d6da8386f7390025bd9647f01e94e6cab3f5a (patch)
treef7eae46c2b9574dc84d1b00515cbc7bc66c51401 /FS/FS/cust_main/Packages.pm
parent3ddc6dbf5dd2aaaed2bf6587e490e711d7494c57 (diff)
add packages to small_custview, RT#34237
Diffstat (limited to 'FS/FS/cust_main/Packages.pm')
-rw-r--r--FS/FS/cust_main/Packages.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/FS/FS/cust_main/Packages.pm b/FS/FS/cust_main/Packages.pm
index 19ee63aa4..bea4c0260 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<FS::cust_pkg>) 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