From: ivan Date: Thu, 4 Oct 2007 23:52:53 +0000 (+0000) Subject: such a dumb little thing, but i think that should really do it. whew X-Git-Tag: TRIXBOX_2_6~295 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=dbbe3c4fb71fdc0177bbebac4d5ea5722745e9e0 such a dumb little thing, but i think that should really do it. whew --- 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);