1 package FS::part_event::Action::cust_bill_print;
4 use base qw( FS::part_event::Action );
6 sub description { 'Send invoice (print only)'; }
8 sub eventtable_hashref {
14 'modenum' => { label => 'Invoice mode',
15 type => 'select-invoice_mode',
17 'skip_nopost' => { label => 'Skip customers without postal billing enabled',
24 sub default_weight { 51; }
27 my( $self, $cust_bill ) = @_;
29 #my $cust_main = $self->cust_main($cust_bill);
30 my $cust_main = $cust_bill->cust_main;
32 $cust_bill->set('mode' => $self->option('modenum'));
33 $cust_bill->print unless $self->option('skip_nopost')
34 && ! grep { $_ eq 'POST' } $cust_main->invoicing_list;