X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=FS%2FFS%2Fpart_event%2FCondition%2Fonce.pm;fp=FS%2FFS%2Fpart_event%2FCondition%2Fonce.pm;h=e814ec25c5fff9b10651110f014656e966d0d44c;hb=dbbe3c4fb71fdc0177bbebac4d5ea5722745e9e0;hp=adab2432aa158bb84d4ba9fd368265fc025c551e;hpb=d780e6f463091cd02532ea4750e9484cc26ce9a8;p=freeside.git 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);