1 package FS::part_event::Condition::hasnt_pkgpart;
5 use base qw( FS::part_event::Condition );
7 sub description { 'Customer does not have uncancelled package of specified definitions'; }
9 sub eventtable_hashref {
18 'unless_pkgpart' => { 'label' => 'Packages: ',
19 'type' => 'select-part_pkg',
26 my( $self, $object ) = @_;
28 my $cust_main = $self->cust_main($object);
31 my $unless_pkgpart = $self->option('unless_pkgpart') || {};
32 ! grep $unless_pkgpart->{ $_->pkgpart }, $cust_main->ncancelled_pkgs;