[freeside-commits] freeside/FS/FS/part_event/Action notice.pm, NONE, 1.1.2.2
Ivan,,,
ivan at wavetail.420.am
Tue Jul 13 04:09:58 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS/part_event/Action
In directory wavetail.420.am:/tmp/cvs-serv1704/FS/FS/part_event/Action
Added Files:
Tag: FREESIDE_1_9_BRANCH
notice.pm
Log Message:
notices, RT#8324
--- NEW FILE: notice.pm ---
package FS::part_event::Action::notice;
use strict;
use base qw( FS::part_event::Action );
use FS::Record qw( qsearchs );
use FS::msg_template;
sub description { 'Send a notice from a message template'; }
#sub eventtable_hashref {
# { 'cust_main' => 1,
# 'cust_bill' => 1,
# 'cust_pkg' => 1,
# };
#}
sub option_fields {
(
'msgnum' => { 'label' => 'Template' },
);
sub default_weight { 55; } #?
sub do_action {
my( $self, $object ) = @_;
my $cust_main = $self->cust_main($object);
my $msgnum = $self->option('msgnum');
my $msg_template = qsearchs('msg_template', { 'msgnum' => $msgnum } )
or die "Template $msgnum not found";
$msg_template->send(
'cust_main' => $cust_main,
'object' => $object,
);
}
1;
More information about the freeside-commits
mailing list