Standardisation work, changed accnum() to refnum()
This commit is contained in:
@@ -25,23 +25,8 @@ class Controller_Reseller_Service extends Controller_Service {
|
||||
|
||||
Block::factory()
|
||||
->title('Customer Services')
|
||||
->title_icon('fa fa-list')
|
||||
->body(Table::factory()
|
||||
->jssort('services')
|
||||
->data(ORM::factory('Service')->where_authorised($this->ao)->find_all())
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'service_name()'=>'Service',
|
||||
'recur_schedule'=>'Billing',
|
||||
'price(TRUE,TRUE)'=>'Price',
|
||||
'status'=>'Active',
|
||||
'account->accnum()'=>'Cust ID',
|
||||
'account->name()'=>'Customer',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('user','service/view/')),
|
||||
))
|
||||
);
|
||||
->title_icon($this->icon)
|
||||
->body(View::factory('service/reseller/list')->set('o',ORM::factory('Service')->where_authorised($this->ao)->find_all()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -61,24 +46,8 @@ class Controller_Reseller_Service extends Controller_Service {
|
||||
if ($svs)
|
||||
Block::factory()
|
||||
->title('Services that should be auto-billed')
|
||||
->title_icon('icon-pencil')
|
||||
->body(Table::factory()
|
||||
->jssort('services')
|
||||
->data($svs)
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'service_name()'=>'Service',
|
||||
'recur_schedule'=>'Billing',
|
||||
'price(TRUE,TRUE)'=>'Price',
|
||||
'account->accnum()'=>'Cust ID',
|
||||
'account->name()'=>'Customer',
|
||||
'date_next_invoice'=>'Next Invoice',
|
||||
'due(TRUE)'=>'Due Invoices',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('user','service/view/')),
|
||||
))
|
||||
);
|
||||
->title_icon($this->icon)
|
||||
->body(View::factory('service/reseller/list')->set('o',$svs));
|
||||
|
||||
foreach (ORM::factory('Checkout')->find_all() as $co) {
|
||||
$svs = array();
|
||||
@@ -89,7 +58,7 @@ class Controller_Reseller_Service extends Controller_Service {
|
||||
if ($svs)
|
||||
Block::factory()
|
||||
->title($co->name)
|
||||
->title_icon('icon-repeat')
|
||||
->title_icon('fa fa-bank')
|
||||
->body(Table::factory()
|
||||
->jssort($co->id)
|
||||
->data($svs)
|
||||
@@ -98,7 +67,7 @@ class Controller_Reseller_Service extends Controller_Service {
|
||||
'service_name()'=>'Service',
|
||||
'recur_schedule'=>'Billing',
|
||||
'price(TRUE,TRUE)'=>'Price',
|
||||
'account->accnum()'=>'Cust ID',
|
||||
'account->refnum()'=>'Cust ID',
|
||||
'account->name()'=>'Customer',
|
||||
'date_next_invoice'=>'Next Invoice',
|
||||
'due(TRUE)'=>'Due Invoices',
|
||||
@@ -117,23 +86,8 @@ class Controller_Reseller_Service extends Controller_Service {
|
||||
public function action_listexpiring() {
|
||||
Block::factory()
|
||||
->title('Customer Services Expiring')
|
||||
->title_icon('icon-th-list')
|
||||
->body(Table::factory()
|
||||
->jssort('services')
|
||||
->data(ORM::factory('Service')->where_authorised($this->ao)->list_expiring())
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'expire(TRUE)'=>'Expiry',
|
||||
'service_name()'=>'Service',
|
||||
'recur_schedule'=>'Billing',
|
||||
'price(TRUE,TRUE)'=>'Price',
|
||||
'account->accnum()'=>'Cust ID',
|
||||
'account->name()'=>'Customer',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('user','service/view/')),
|
||||
))
|
||||
);
|
||||
->title_icon($this->icon)
|
||||
->body(View::factory('service/reseller/list')->set('o',ORM::factory('Service')->where_authorised($this->ao)->list_expiring()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,25 +96,8 @@ class Controller_Reseller_Service extends Controller_Service {
|
||||
public function action_listinvoicesoon() {
|
||||
Block::factory()
|
||||
->title('Customer Services soon to be Invoiced')
|
||||
->title_icon('icon-th-list')
|
||||
->body(Table::factory()
|
||||
->jssort('services')
|
||||
->data(ORM::factory('Service')->where_authorised($this->ao)->list_invoicesoon(ORM::factory('Invoice')->config('GEN_SOON_DAYS')+30))
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'expire(TRUE)'=>'Expiry',
|
||||
'service_name()'=>'Service',
|
||||
'recur_schedule'=>'Billing',
|
||||
'price(TRUE,TRUE)'=>'Price',
|
||||
'charges(TRUE,TRUE)'=>'Charges',
|
||||
'account->accnum()'=>'Cust ID',
|
||||
'account->name()'=>'Customer',
|
||||
'date_next_invoice'=>'Next Invoice',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('user','service/view/')),
|
||||
))
|
||||
);
|
||||
->title_icon($this->icon)
|
||||
->body(View::factory('service/reseller/list')->set('o',ORM::factory('Service')->where_authorised($this->ao)->list_invoicesoon(ORM::factory('Invoice')->config('GEN_SOON_DAYS')+30)));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@@ -40,22 +40,9 @@ class Controller_User_Service extends Controller_Service {
|
||||
$this->meta->title = 'Service List';
|
||||
|
||||
Block::factory()
|
||||
->title(sprintf('Services for Account: %s',$this->ao->accnum()))
|
||||
->title_icon('icon-th-list')
|
||||
->body(Table::factory()
|
||||
->jssort('services')
|
||||
->data($this->ao->service->find_all())
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'service_name()'=>'Service',
|
||||
'recur_schedule'=>'Billing',
|
||||
'price(TRUE,TRUE)'=>'Price',
|
||||
'status'=>'Active',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('user','service/view/')),
|
||||
))
|
||||
);
|
||||
->title(sprintf('Services for Account: %s',$this->ao->refnum()))
|
||||
->title_icon($this->icon)
|
||||
->body(View::factory('service/user/list')->set('o',$this->ao->service->find_all()));
|
||||
}
|
||||
|
||||
public function action_view() {
|
||||
|
Reference in New Issue
Block a user