RT# 37817 - added a declaration to cust bill event actions that send out invoices
[freeside.git] / FS / FS / part_event / Action / cust_bill_send_agent.pm
index bbb757b..fcd1613 100644 (file)
@@ -10,6 +10,9 @@ sub description {
 # this event is just cust_bill_send_alternate + an implicit (and inefficient)
 # 'agent' condition
 
+## declaring that this action will send out an invoice
+sub will_send_invoice { 1; }
+
 sub eventtable_hashref {
   { 'cust_bill' => 1 };
 }
@@ -45,8 +48,8 @@ sub do_action {
 
   $cust_bill->set('mode' => $self->option('modenum'));
   $cust_bill->send(
-    'template'      => $self->option('agent_templatename'),
-    'invoice_from'  => $self->option('agent_invoice_from'),
+    'template' => $self->option('agent_templatename'),
+    'from'     => $self->option('agent_invoice_from'),
   );
 }