1 package FS::part_event::Action::suspend_if_pkgpart;
4 use base qw( FS::part_event::Action );
12 'if_pkgpart' => { 'label' => 'Suspend packages:',
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_if_pkgpart( {
33 'pkgparts' => [ split(/\s*,\s*/, $self->option('if_pkgpart') ) ],
34 'reason' => $self->option('reasonnum'),
37 die join(' / ', @err) if scalar(@err);