RT# 37817 - added a declaration to cust bill event actions that send out invoices
[freeside.git] / FS / FS / part_event.pm
index ded5715..ba5b6d6 100644 (file)
@@ -570,7 +570,7 @@ foreach my $INC ( @INC ) {
     }
     $actions{$mod} = {
       ( map { $_ => "FS::part_event::Action::$mod"->$_() }
-            qw( description eventtable_hashref default_weight deprecated )
+            qw( description eventtable_hashref default_weight deprecated will_send_invoice )
             #option_fields_hashref
       ),
       'option_fields' => [ "FS::part_event::Action::$mod"->option_fields() ],
@@ -604,6 +604,20 @@ sub all_actions {
        keys %actions
 }
 
+=item invoice_send_actions
+
+Returns a list of action names that send invoices
+
+=cut
+
+sub invoice_send_actions {
+  my ( $class ) = @_;
+
+  grep { $actions{$_}->{'will_send_invoice'} }
+       keys %actions
+
+}
+
 =item process_initialize 'eventpart' => EVENTPART
 
 Job queue wrapper for "initialize".  EVENTPART identifies the