1 package FS::part_event::Condition::has_pkg_class;
5 use base qw( FS::part_event::Condition );
6 use FS::Record qw( qsearch );
10 'Customer has uncancelled package with class';
13 sub eventtable_hashref {
23 'pkgclass' => { 'label' => 'Package Class',
24 'type' => 'select-pkg_class',
31 my( $self, $object ) = @_;
33 my $cust_main = $self->cust_main($object);
36 my $hashref = $self->option('pkgclass') || {};
37 grep $hashref->{ $_->part_pkg->classnum }, $cust_main->ncancelled_pkgs;