Added Reseller Account View
This commit is contained in:
parent
c970081cc1
commit
14fd3ba24e
@ -14,6 +14,7 @@ class Controller_Reseller_Account extends Controller_Account {
|
||||
'ajaxlist'=>TRUE,
|
||||
'list'=>TRUE,
|
||||
'listlog'=>TRUE,
|
||||
'view'=>TRUE,
|
||||
);
|
||||
|
||||
/**
|
||||
@ -77,5 +78,60 @@ class Controller_Reseller_Account extends Controller_Account {
|
||||
)),
|
||||
));
|
||||
}
|
||||
|
||||
public function action_view() {
|
||||
$ao = ORM::factory('Account',$this->request->param('id'));
|
||||
if (! $ao->loaded() OR ! $ao->status)
|
||||
HTTP::redirect(URL::link('reseller','welcome'));
|
||||
|
||||
Block::factory()
|
||||
->title(sprintf('Active Service for Account: %s',$ao->accnum()))
|
||||
->title_icon('icon-info-sign')
|
||||
->span(6)
|
||||
->body(Table::factory()
|
||||
->data($ao->service->list_active())
|
||||
->jssort('service')
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'service_name()'=>'Service',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('user','service/view/')),
|
||||
))
|
||||
);
|
||||
|
||||
Block::factory()
|
||||
->title(sprintf('Invoices Due Account: %s (%s)',$ao->accnum(),$ao->invoice->list_due_total(TRUE)))
|
||||
->title_icon('icon-info-sign')
|
||||
->span(6)
|
||||
->body(Table::factory()
|
||||
->data($ao->invoice->list_due())
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'due_date'=>'Date Due',
|
||||
'total(TRUE)'=>'Invoice Total',
|
||||
'due(TRUE)'=>'Amount Due',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('user','invoice/view/')),
|
||||
))
|
||||
);
|
||||
|
||||
Block::factory()
|
||||
->title(sprintf('Services Expiring for Account: %s',$ao->accnum()))
|
||||
->title_icon('icon-info-sign')
|
||||
->span(6)
|
||||
->body(Table::factory()
|
||||
->data($ao->service->list_expiring())
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'service_name()'=>'Service',
|
||||
'expire(TRUE)'=>'Date',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('user','service/view/')),
|
||||
))
|
||||
);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -21,7 +21,7 @@ class Controller_User_Search extends Controller_Search {
|
||||
$result = array();
|
||||
|
||||
if (isset($_REQUEST['term']) AND trim($_REQUEST['term'])) {
|
||||
$result = Arr::merge($result,ORM::factory('Account')->list_autocomplete($_REQUEST['term'],'url','id',array('ACC %s: %s'=>array('id','name(TRUE)')),array(),array('urlprefix'=>'a/service/list/')));
|
||||
$result = Arr::merge($result,ORM::factory('Account')->list_autocomplete($_REQUEST['term'],'url','id',array('ACC %s: %s'=>array('id','name(TRUE)')),array(),array('urlprefix'=>'r/account/view/')));
|
||||
$result = Arr::merge($result,ORM::factory('Invoice')->list_autocomplete($_REQUEST['term'],'url','id',array('INV %s: %s'=>array('id','account->name(TRUE)')),array(),array('urlprefix'=>'u/invoice/view/')));
|
||||
$result = Arr::merge($result,ORM::factory('Service')->list_autocomplete($_REQUEST['term'],'url','id',array('SVC %s: %s'=>array('id','service_name()')),array(),array('urlprefix'=>'u/service/view/')));
|
||||
|
||||
|
@ -173,7 +173,7 @@ class Controller_Affiliate_Service extends Controller_TemplateDefault_Affiliate
|
||||
'title'=>_('ADSL Services'),
|
||||
'body'=>Table::display(
|
||||
$svs,
|
||||
NULL,
|
||||
50,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'name()'=>array('label'=>'Service'),
|
||||
|
Reference in New Issue
Block a user