Some cleanup, setup improvements and other misc items
This commit is contained in:
@@ -24,10 +24,11 @@ class Controller_Reseller_Account extends Controller_Account {
|
||||
->title(_('Customer List'))
|
||||
->title_icon('icon-th-list')
|
||||
->body(Table::factory()
|
||||
->data(ORM::factory('Account')->where('id','IN',$this->ao->RTM->customers($this->ao->RTM))->find_all())
|
||||
->data(ORM::factory('Account')->where_authorised($this->ao,'id')->find_all())
|
||||
->jssort('customer')
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'status(TRUE)'=>'Active',
|
||||
'accnum()'=>'Num',
|
||||
'name(TRUE)'=>'Account',
|
||||
'email'=>'Email',
|
||||
@@ -48,7 +49,7 @@ class Controller_Reseller_Account extends Controller_Account {
|
||||
->title(_('Customer Login Activity'))
|
||||
->title_icon('icon-eye-open')
|
||||
->body(Table::factory()
|
||||
->data(ORM::factory('Account_Log')->where('account_id','IN',$this->ao->RTM->customers($this->ao->RTM))->find_all())
|
||||
->data(ORM::factory('Account_Log')->where_authorised($this->ao)->find_all())
|
||||
->page_items(25)
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* lnApp Main home page
|
||||
* OSB Reseller Main home page
|
||||
*
|
||||
* @package OSB
|
||||
* @category Controllers/Reseller
|
||||
@@ -11,15 +11,96 @@
|
||||
*/
|
||||
class Controller_Reseller_Welcome extends Controller_Welcome {
|
||||
protected $auth_required = TRUE;
|
||||
protected $secure_actions = array(
|
||||
public $secure_actions = array(
|
||||
'index'=>TRUE,
|
||||
);
|
||||
|
||||
public function action_index() {
|
||||
Block::add(array(
|
||||
'title'=>sprintf('%s: %s',$this->ao->accnum(),$this->ao->name(TRUE)),
|
||||
'body'=>View::factory('welcome/reseller'),
|
||||
));
|
||||
$t = time();
|
||||
|
||||
// Show outstanding invoices
|
||||
$o = ORM::factory('Invoice');
|
||||
|
||||
Block::factory()
|
||||
->title($this->ao->RTM->display('name'))
|
||||
->body('');
|
||||
|
||||
Block::factory()
|
||||
->title('Invoices Overdue - No Auto Billing')
|
||||
->title_icon('icon-info-sign')
|
||||
->span(6)
|
||||
->body(Table::factory()
|
||||
->data($o->list_overdue_billing($t))
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'due_date'=>'Due',
|
||||
'account->accnum()'=>'Num',
|
||||
'account->name()'=>'Account',
|
||||
'total(TRUE)'=>'Total',
|
||||
'due(TRUE)'=>'Due',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('user','invoice/view/')),
|
||||
))
|
||||
);
|
||||
|
||||
Block::factory()
|
||||
->title('Invoices Overdue - Auto Billing')
|
||||
->title_icon('icon-info-sign')
|
||||
->span(6)
|
||||
->body(Table::factory()
|
||||
->data($o->list_overdue_billing($t,TRUE))
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'due_date'=>'Due',
|
||||
'account->accnum()'=>'Num',
|
||||
'account->name()'=>'Account',
|
||||
'total(TRUE)'=>'Total',
|
||||
'due(TRUE)'=>'Due',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('user','invoice/view/')),
|
||||
))
|
||||
);
|
||||
|
||||
Block::factory()
|
||||
->title('Upcoming Invoices')
|
||||
->title_icon('icon-info-sign')
|
||||
->span(6)
|
||||
->body(Table::factory()
|
||||
->data($o->list_due())
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'due_date'=>'Due',
|
||||
'account->accnum()'=>'Num',
|
||||
'account->name()'=>'Account',
|
||||
'total(TRUE)'=>'Total',
|
||||
'due(TRUE)'=>'Due',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('user','invoice/view/')),
|
||||
))
|
||||
);
|
||||
|
||||
Block::factory()
|
||||
->title('Un-applied payments')
|
||||
->title_icon('icon-info-sign')
|
||||
->span(6)
|
||||
->body(Table::factory()
|
||||
->data(ORM::factory('Payment')->where_authorised()->list_unapplied())
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'date_payment'=>'Pay Date',
|
||||
'account->accnum()'=>'Num',
|
||||
'account->name()'=>'Account',
|
||||
'account->display("status")'=>'Active',
|
||||
'total(TRUE)'=>'Total',
|
||||
'balance(TRUE)'=>'Balance',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('reseller','payment/view/')),
|
||||
))
|
||||
);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user