summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2007-10-04 23:40:51 +0000
committerivan <ivan>2007-10-04 23:40:51 +0000
commit8b33800764316232933f5996ac3fe9ea1793d944 (patch)
treedf054e534a33aee2ed70225f618c0a229ac22dcb /FS
parent49db59d3a1fad43b35295d89c71141b79c70c1de (diff)
hopefully fix once.pm properly...
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/part_event/Condition/once.pm21
1 files changed, 12 insertions, 9 deletions
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);