projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 37817 - added a declaration to cust bill event actions that send out invoices
[freeside.git]
/
FS
/
FS
/
part_event
/
Condition
/
invoice_has_not_been_sent.pm
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
882762d
..
df78bf7
100644
(file)
--- 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) = @_;
sub condition {
my($self, $cust_bill, %opt) = @_;
+ 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',
'addl_from' => 'LEFT JOIN part_event USING ( eventpart )',
'hashref' => {
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",
'order_by' => " LIMIT 1",
+ 'extra_sql' => $extra_sql,
} );
return 0 if $event;
} );
return 0 if $event;