summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2007-09-30 00:23:46 +0000
committerivan <ivan>2007-09-30 00:23:46 +0000
commit59c5af8de6c599ca58fef9db19c89f483e5ed897 (patch)
treef06d493e548931c6f82bcb320d9a098b85657ad8
parent674e425e634fd872c32c002e7bccae4897efd508 (diff)
this might fix agent-specific invoicing when migrated from 1.7?
-rw-r--r--FS/FS/cust_main.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index a36273be7..7ac8c6214 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -5793,7 +5793,7 @@ sub _agent_plandata {
LEFT JOIN part_event_option AS peo_agentnum
ON ( part_event.eventpart = peo_agentnum.eventpart
AND peo_agentnum.optionname = 'agentnum'
- AND peo_agentnum.optionvalue ~ '(^|,)agentnum(,|$)'
+ AND peo_agentnum.optionvalue ~ '(^|,)}. $agentnum. q{agentnum(,|$)'
)
LEFT JOIN part_event_option AS peo_cust_bill_age
ON ( part_event.eventpart = peo_cust_bill_age.eventpart
@@ -5803,6 +5803,7 @@ sub _agent_plandata {
#'hashref' => { 'optionname' => $option },
'hashref' => { 'part_event_option.optionname' => $option },
'extra_sql' => " AND event = 'cust_bill_send_agent' ".
+ " AND disabled != 'Y' ".
" AND peo_agentnum.optionname = 'agentnum' ".
" AND agentnum IS NULL OR agentnum = $agentnum ".
" ORDER BY