1 package FS::part_event::Action::suspend;
4 use base qw( FS::part_event::Action );
6 sub description { 'Suspend all of this customer\'s packages'; }
12 'type' => 'select-reason',
13 'reason_class' => 'S',
16 'label' => 'Continue recurring billing while suspended',
20 'skip_future_startdate' => {
21 'label' => "Don't suspend packages with a future start date",
28 sub default_weight { 10; }
31 my( $self, $cust_object ) = @_;
33 my $cust_main = $self->cust_main($cust_object);
35 my @err = $cust_main->suspend(
36 'skip_future_startdate' => $self->option('skip_future_startdate'),
37 'reason' => $self->option('reasonnum'),
38 'options' => { 'suspend_bill' => $self->option('suspend_bill')
42 die join(' / ', @err) if scalar(@err);