sub condition {
my($self, $cust_bill, %opt) = @_;
- ## search actions for invoice send events.
- my $extra_sql = " AND (action LIKE 'cust_bill_send%' OR action LIKE 'cust_bill_email%')";
+ my $invoice_send_actions = join "', '", (FS::part_event::invoice_send_actions());
+ my $extra_sql = " AND action in ('".$invoice_send_actions."')";
my $event = qsearchs( {
'table' => 'cust_event',