Some cleanup, setup improvements and other misc items

This commit is contained in:
Deon George
2013-10-09 16:43:41 +11:00
parent 638d123739
commit c473bf6e7d
54 changed files with 477 additions and 3991 deletions

View File

@@ -25,7 +25,7 @@ class Controller_Reseller_Service extends Controller_Service {
->title_icon('icon-th-list')
->body(Table::factory()
->jssort('services')
->data(ORM::factory('Service')->where('account_id','IN',$this->ao->RTM->customers($this->ao->RTM))->find_all())
->data(ORM::factory('Service')->where_authorised($this->ao)->find_all())
->columns(array(
'id'=>'ID',
'service_name()'=>'Service',
@@ -49,7 +49,7 @@ class Controller_Reseller_Service extends Controller_Service {
// @todo This needs to be configurable
$go = ORM::factory('Group',array('name'=>'Personal'));
foreach (ORM::factory('Account')->where_active()->where('id','IN',$this->ao->RTM->customers($this->ao->RTM))->find_all() as $ao)
foreach (ORM::factory('Account')->where_active()->where_authoised($this->ao,'id')->find_all() as $ao)
if ($ao->has_any('group',array($go)))
foreach ($ao->service->list_active() as $so)
if (! $so->service_billing->checkout_id)