1 package FS::part_event::Action::cust_bill_print_pdf;
4 use base qw( FS::part_event::Action );
6 sub description { 'Send invoice (spool PDF only)'; }
8 ## declaring that this action will send out an invoice
9 sub will_send_invoice { 1; }
11 sub eventtable_hashref {
17 'modenum' => { label => 'Invoice mode',
18 type => 'select-invoice_mode'
23 sub default_weight { 51; }
26 my( $self, $cust_bill ) = @_;
28 #my $cust_main = $self->cust_main($cust_bill);
29 #my $cust_main = $cust_bill->cust_main;
31 my $opt = { $self->options };
32 $opt->{'notice_name'} ||= 'Invoice';
34 $cust_bill->set('mode' => $self->option('modenum'));
35 $cust_bill->batch_invoice($opt);