2013-10-10 02:44:53 +00:00
|
|
|
<?php defined('SYSPATH') or die('No direct access allowed.');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* lnApp Main home page
|
|
|
|
*
|
|
|
|
* @package OSB
|
|
|
|
* @category Controllers/User
|
|
|
|
* @author Deon George
|
|
|
|
* @copyright (c) 2009-2013 Open Source Billing
|
|
|
|
* @license http://dev.osbill.net/license.html
|
|
|
|
*/
|
|
|
|
class Controller_User_Welcome extends Controller_Welcome {
|
|
|
|
protected $auth_required = TRUE;
|
|
|
|
protected $secure_actions = array(
|
|
|
|
'index'=>TRUE,
|
|
|
|
);
|
|
|
|
|
|
|
|
public function action_index() {
|
2013-05-28 11:35:54 +00:00
|
|
|
Block::factory()
|
|
|
|
->title(sprintf('Active Service for Account: %s',$this->ao->accnum()))
|
|
|
|
->title_icon('icon-info-sign')
|
|
|
|
->span(6)
|
|
|
|
->body(Table::factory()
|
|
|
|
->data($this->ao->service->list_active())
|
2013-11-28 06:41:34 +00:00
|
|
|
->columns(array(
|
|
|
|
'id'=>'ID',
|
|
|
|
'service_name()'=>'Service',
|
|
|
|
))
|
|
|
|
->prepend(array(
|
|
|
|
'id'=>array('url'=>URL::link('user','service/view/')),
|
|
|
|
))
|
2013-05-28 11:35:54 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
Block::factory()
|
|
|
|
->title('Quick Shortcuts')
|
|
|
|
->title_icon('icon-bookmark')
|
|
|
|
->span(6)
|
|
|
|
->body(View::factory('welcome/user/shortcuts'));
|
|
|
|
|
|
|
|
Block::factory()
|
|
|
|
->title(sprintf('Invoices Due Account: %s (%s)',$this->ao->accnum(),$this->ao->invoice->list_due_total(TRUE)))
|
|
|
|
->title_icon('icon-info-sign')
|
|
|
|
->span(6)
|
|
|
|
->body(Table::factory()
|
|
|
|
->data($this->ao->invoice->list_due())
|
2013-11-28 06:41:34 +00:00
|
|
|
->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/')),
|
|
|
|
))
|
2013-05-28 11:35:54 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
Block::factory()
|
|
|
|
->title(sprintf('Services Expiring for Account: %s',$this->ao->accnum()))
|
|
|
|
->title_icon('icon-info-sign')
|
|
|
|
->span(6)
|
|
|
|
->body(Table::factory()
|
|
|
|
->data($this->ao->service->list_expiring())
|
2013-11-28 06:41:34 +00:00
|
|
|
->columns(array(
|
|
|
|
'id'=>'ID',
|
|
|
|
'service_name()'=>'Service',
|
|
|
|
'expire(TRUE)'=>'Date',
|
|
|
|
))
|
|
|
|
->prepend(array(
|
|
|
|
'id'=>array('url'=>URL::link('user','service/view/')),
|
|
|
|
))
|
2013-05-28 11:35:54 +00:00
|
|
|
);
|
2013-10-10 02:44:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|