From: levinse Date: Sun, 8 May 2011 20:09:05 +0000 (+0000) Subject: implement condition_sql for FS::part_event::Condition::cust_bill_hasnt_noauto, RT12714 X-Git-Tag: freeside_2_3_0~285 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=7f8e7141e23bfd78dad3fd9d70e35c953c66191b implement condition_sql for FS::part_event::Condition::cust_bill_hasnt_noauto, RT12714 --- 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