summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2007-10-04 23:52:53 +0000
committerivan <ivan>2007-10-04 23:52:53 +0000
commitdbbe3c4fb71fdc0177bbebac4d5ea5722745e9e0 (patch)
tree098ee9c3d5c1f827d22b199391de4b6708e8c5fb
parentd780e6f463091cd02532ea4750e9484cc26ce9a8 (diff)
such a dumb little thing, but i think that should really do it. whew
-rw-r--r--FS/FS/part_event/Condition/once.pm21
1 files changed, 10 insertions, 11 deletions
diff --git a/FS/FS/part_event/Condition/once.pm b/FS/FS/part_event/Condition/once.pm
index adab2432a..e814ec25c 100644
--- a/FS/FS/part_event/Condition/once.pm
+++ b/FS/FS/part_event/Condition/once.pm
@@ -22,17 +22,16 @@ sub condition {
my $tablenum = $object->$obj_pkey();
my @existing = qsearch( {
- 'table' => 'cust_event',
- 'hashref' => {
- 'eventpart' => $self->eventpart,
- 'tablenum' => $tablenum,
- #'status' => { op=>'NOT IN', value=>"('failed','new')" },
- 'status' => { op=>'!=', value=>'failed' },
- },
- 'addl_sql' => ( $opt{'cust_event'}->eventnum =~ /^(\d+)$/
- ? " AND eventnum != $1 "
- : ''
- ),
+ 'table' => 'cust_event',
+ 'hashref' => {
+ 'eventpart' => $self->eventpart,
+ 'tablenum' => $tablenum,
+ 'status' => { op=>'!=', value=>'failed' },
+ },
+ 'extra_sql' => ( $opt{'cust_event'}->eventnum =~ /^(\d+)$/
+ ? " AND eventnum != $1 "
+ : ''
+ ),
} );
! scalar(@existing);