diff options
| author | Christopher Burger <burgerc@freeside.biz> | 2019-01-04 11:41:34 -0500 |
|---|---|---|
| committer | Christopher Burger <burgerc@freeside.biz> | 2019-01-04 13:03:38 -0500 |
| commit | de6b4dea438d18333ee812aa3266461328505a95 (patch) | |
| tree | bcc5f5bbb8bf395533e76cefd3da3b57e21e9fba | |
| parent | 915c1adc738b5dcd8d8d28d3df6ae22ecf4fd5dc (diff) | |
RT# 37817 - Updated to set condition to check for invoice sending action
| -rw-r--r-- | FS/FS/part_event/Condition/invoice_has_not_been_sent.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/FS/FS/part_event/Condition/invoice_has_not_been_sent.pm b/FS/FS/part_event/Condition/invoice_has_not_been_sent.pm index 882762dfe..f80508a9a 100644 --- a/FS/FS/part_event/Condition/invoice_has_not_been_sent.pm +++ b/FS/FS/part_event/Condition/invoice_has_not_been_sent.pm @@ -21,15 +21,19 @@ sub eventtable_hashref { 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 $event = qsearchs( { 'table' => 'cust_event', 'addl_from' => 'LEFT JOIN part_event USING ( eventpart )', 'hashref' => { - 'tablenum' => $cust_bill->{Hash}->{invnum}, - 'eventtable' => 'cust_bill', - 'status' => 'done', - }, + 'tablenum' => $cust_bill->{Hash}->{invnum}, + 'eventtable' => 'cust_bill', + 'status' => 'done', + }, 'order_by' => " LIMIT 1", + 'extra_sql' => $extra_sql, } ); return 0 if $event; |
