summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevinse <levinse>2011-05-08 20:09:05 +0000
committerlevinse <levinse>2011-05-08 20:09:05 +0000
commit7f8e7141e23bfd78dad3fd9d70e35c953c66191b (patch)
treecdd27e8fa552037129d7f3133d904ea3437100bc
parent8a4f7ef5401e2ae6c1c05269458084fe399361f8 (diff)
implement condition_sql for FS::part_event::Condition::cust_bill_hasnt_noauto, RT12714
-rw-r--r--FS/FS/Schema.pm4
-rw-r--r--FS/FS/part_event/Condition/cust_bill_hasnt_noauto.pm1
2 files changed, 2 insertions, 3 deletions
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index 430efd9e2..da0bea098 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -1452,7 +1452,7 @@ sub tables_hashref {
[ 'usernum' ], [ 'agent_pkgid' ],
['order_date'], [ 'start_date' ], ['setup'], ['bill'],
['last_bill'], ['susp'], ['adjourn'], ['cancel'],
- ['expire'], ['contract_end'], ['change_date'],
+ ['expire'], ['contract_end'], ['change_date'], ['no_auto'],
],
},
@@ -1631,7 +1631,7 @@ sub tables_hashref {
'primary_key' => 'pkgpart',
'unique' => [],
'index' => [ [ 'promo_code' ], [ 'disabled' ], [ 'classnum' ],
- [ 'agentnum' ],
+ [ 'agentnum' ], ['no_auto'],
],
},
diff --git a/FS/FS/part_event/Condition/cust_bill_hasnt_noauto.pm b/FS/FS/part_event/Condition/cust_bill_hasnt_noauto.pm
index bb0f3d04a..027625569 100644
--- a/FS/FS/part_event/Condition/cust_bill_hasnt_noauto.pm
+++ b/FS/FS/part_event/Condition/cust_bill_hasnt_noauto.pm
@@ -29,7 +29,6 @@ sub condition_sql {
# XXX: can be made faster with optimizations?
# -remove some/all sub-selects?
# -remove the two main separate selects?
- # -add indices on cust_pkg.no_auto and part_pkg.no_auto and others?
"0 = (select count(1) from cust_pkg
where cust_pkg.no_auto = 'Y' and cust_pkg.pkgnum in