1 package FS::part_event::Condition::has_pkgpart;
2 use base qw( FS::part_event::Condition );
6 sub description { 'Customer has uncancelled specific package(s)'; }
8 sub eventtable_hashref {
17 'if_pkgpart' => { 'label' => 'Only packages: ',
18 'type' => 'select-part_pkg',
25 my( $self, $object) = @_;
27 my $cust_main = $self->cust_main($object);
29 my $if_pkgpart = $self->option('if_pkgpart') || {};
30 grep $if_pkgpart->{ $_->pkgpart }, $cust_main->ncancelled_pkgs;