From: ivan Date: Wed, 29 Oct 2008 22:24:15 +0000 (+0000) Subject: eek, fix agent_plandata from comping up with spurious hits X-Git-Tag: root_of_webpay_support~276 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=a20987ec5ea35450afbf311829e48e507099dad4 eek, fix agent_plandata from comping up with spurious hits --- diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index db70dacc6..3e767d9f0 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -7055,7 +7055,7 @@ sub _agent_plandata { " AND action = 'cust_bill_send_agent' ". " AND ( disabled IS NULL OR disabled != 'Y' ) ". " AND peo_agentnum.optionname = 'agentnum' ". - " AND agentnum IS NULL OR agentnum = $agentnum ". + " AND ( agentnum IS NULL OR agentnum = $agentnum ) ". " ORDER BY CASE WHEN peo_cust_bill_age.optionname != 'cust_bill_age' THEN -1