X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_event%2FAction%2Fcust_bill_print_pdf.pm;h=38257b1d4e084aafca0786b7a39ed61dd95c1641;hb=HEAD;hp=6b37f389f89d5bf5d579f27dff2559a68556c9ec;hpb=982ded2d929bdcdfa72efa810273f3bc753bf036;p=freeside.git diff --git a/FS/FS/part_event/Action/cust_bill_print_pdf.pm b/FS/FS/part_event/Action/cust_bill_print_pdf.pm index 6b37f389f..38257b1d4 100644 --- a/FS/FS/part_event/Action/cust_bill_print_pdf.pm +++ b/FS/FS/part_event/Action/cust_bill_print_pdf.pm @@ -5,10 +5,21 @@ use base qw( FS::part_event::Action ); sub description { 'Send invoice (spool PDF only)'; } +## declaring that this action will send out an invoice +sub will_send_invoice { 1; } + sub eventtable_hashref { { 'cust_bill' => 1 }; } +sub option_fields { + ( + 'modenum' => { label => 'Invoice mode', + type => 'select-invoice_mode' + }, + ); +} + sub default_weight { 51; } sub do_action { @@ -20,6 +31,7 @@ sub do_action { my $opt = { $self->options }; $opt->{'notice_name'} ||= 'Invoice'; + $cust_bill->set('mode' => $self->option('modenum')); $cust_bill->batch_invoice($opt); }