1 package FS::part_event::Action::notice_to;
4 use base qw( FS::part_event::Action );
5 use FS::Record qw( qsearchs );
8 sub description { 'Email a notice to a specific address'; }
10 #sub eventtable_hashref {
19 'to' => { 'label' => 'Destination',
23 'msgnum' => { 'label' => 'Template',
24 'type' => 'select-table',
25 'table' => 'msg_template',
26 'name_col' => 'msgname',
32 sub default_weight { 56; } #?
35 my( $self, $object ) = @_;
37 my $cust_main = $self->cust_main($object);
39 my $msgnum = $self->option('msgnum');
41 my $msg_template = qsearchs('msg_template', { 'msgnum' => $msgnum } )
42 or die "Template $msgnum not found";
44 my $to = $self->option('to')
45 or die "Can't send notice without a destination address";
49 'cust_main' => $cust_main,