X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_event%2FAction%2Fcust_bill_send_alternate.pm;h=ef8e4c041ddff82dd342bd3030d5a576dd9f1aa1;hp=cfd9264d808cb7bbea5e939de733439aa15de098;hb=39fe6499bd38e6e7c468f549b1d4919a7cf2c44d;hpb=40a7b3dc653e099f7bd0bd762b649b04c4432db2 diff --git a/FS/FS/part_event/Action/cust_bill_send_alternate.pm b/FS/FS/part_event/Action/cust_bill_send_alternate.pm index cfd9264d8..ef8e4c041 100644 --- a/FS/FS/part_event/Action/cust_bill_send_alternate.pm +++ b/FS/FS/part_event/Action/cust_bill_send_alternate.pm @@ -5,12 +5,17 @@ use base qw( FS::part_event::Action ); sub description { 'Send invoice (email/print/fax) with alternate template'; } +## 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' }, 'templatename' => { label => 'Template', type => 'select-invoice_template', }, @@ -25,7 +30,8 @@ sub do_action { #my $cust_main = $self->cust_main($cust_bill); my $cust_main = $cust_bill->cust_main; - $cust_bill->send( $self->option('templatename') ); + $cust_bill->set('mode' => $self->option('modenum')); + $cust_bill->send({'template' => $self->option('templatename')}); } 1;