From: ivan Date: Thu, 4 Oct 2007 23:40:51 +0000 (+0000) Subject: hopefully fix once.pm properly... X-Git-Tag: TRIXBOX_2_6~297 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=8b33800764316232933f5996ac3fe9ea1793d944 hopefully fix once.pm properly... --- diff --git a/FS/FS/part_event/Condition/once.pm b/FS/FS/part_event/Condition/once.pm index bb0fa22a5..adab2432a 100644 --- a/FS/FS/part_event/Condition/once.pm +++ b/FS/FS/part_event/Condition/once.pm @@ -21,15 +21,18 @@ sub condition { my $obj_pkey = $object->primary_key; my $tablenum = $object->$obj_pkey(); - my @existing = qsearch( 'cust_event', { - '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 " - : '' - ), + 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 " + : '' + ), } ); ! scalar(@existing);