Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / FS / FS / part_event / Action / cust_bill_send_reminder.pm
1 package FS::part_event::Action::cust_bill_send_reminder;
2
3 use strict;
4 use base qw( FS::part_event::Action );
5
6 sub description { 'Send invoice (email/print/fax) reminder'; }
7
8 sub eventtable_hashref {
9   { 'cust_bill' => 1 };
10 }
11
12 sub option_fields {
13   (
14     'notice_name' => 'Reminder name',
15     #'notes'      => { 'label' => 'Reminder notes' }, 
16     #include standard notes?  no/prepend/append
17     'lpr'         => 'Optional alternate print command',
18   );
19 }
20
21 sub default_weight { 50; }
22
23 sub do_action {
24   my( $self, $cust_bill ) = @_;
25
26   #my $cust_main = $self->cust_main($cust_bill);
27   #my $cust_main = $cust_bill->cust_main;
28
29   $cust_bill->send({
30     'notice_name' => $self->option('notice_name'),
31     'lpr'         => $self->option('lpr'),
32   });
33 }
34
35 1;