1 package FS::part_event::Action::suspend_unless_pkgpart;
4 use base qw( FS::part_event::Action );
7 'Suspend packages except';
12 'unless_pkgpart' => { 'label' => 'Suspend packages except:',
13 'type' => 'select-part_pkg',
16 'reasonnum' => { 'label' => 'Reason',
17 'type' => 'select-reason',
18 'reason_class' => 'S',
28 my( $self, $cust_object ) = @_;
30 my $cust_main = $self->cust_main($cust_object);
32 my @err = $cust_main->suspend_unless_pkgpart( {
33 'pkgparts' => [ split(/\s*,\s*/, $self->option('unless_pkgpart') ) ],
34 'reason' => $self->option('reasonnum'),
37 die join(' / ', @err) if scalar(@err);