1 package FS::part_event::Action::cust_bill_send_if_newest;
4 use base qw( FS::part_event::Action );
7 'Send invoice (email/print/fax) with alternate template, if it is still the newest invoice (useful for late notices - set to 31 days or later)';
10 # XXX is this handled better by something against customers??
15 sub eventtable_hashref {
21 'if_newest_templatename' => { label => 'Template',
22 type => 'select-invoice_template',
32 my( $self, $cust_bill ) = @_;
34 #my $cust_main = $self->cust_main($cust_bill);
35 my $cust_main = $cust_bill->cust_main;
37 $cust_bill->send( $self->option('templatename') );