[freeside-commits] freeside/FS/FS/part_event/Action pkg_suspend.pm, NONE, 1.1
Ivan,,,
ivan at wavetail.420.am
Wed Feb 23 13:50:55 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/part_event/Action
In directory wavetail.420.am:/tmp/cvs-serv25728
Added Files:
pkg_suspend.pm
Log Message:
add package suspend
--- NEW FILE: pkg_suspend.pm ---
package FS::part_event::Action::pkg_suspend;
use strict;
use base qw( FS::part_event::Action );
sub description { 'Suspend this package'; }
sub eventtable_hashref {
{ 'cust_pkg' => 1 };
}
sub option_fields {
(
'reasonnum' => { 'label' => 'Reason',
'type' => 'select-reason',
'reason_class' => 'S',
},
);
}
sub default_weight { 20; }
sub do_action {
my( $self, $cust_pkg, $cust_event ) = @_;
my $error = $cust_pkg->suspend( 'reason' => $self->option('reasonnum') );
die $error if $error;
'';
}
1;
More information about the freeside-commits
mailing list