This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/modules/invoice/classes/Controller/Reseller/Invoice.php
2013-10-10 13:56:13 +11:00

41 lines
1.1 KiB
PHP

<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides Reseller Invoice viewing functions
*
* @package Invoice
* @category Controllers/Reseller
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Controller_Reseller_Invoice extends Controller_Invoice {
protected $secure_actions = array(
'list'=>TRUE,
);
public function action_list() {
Block::factory()
->title('Customer Invoices')
->title_icon('icon-th-list')
->body(Table::factory()
->jssort('invoices')
->data(ORM::factory('Invoice')->where('account_id','IN',$this->ao->RTM->customers($this->ao->RTM))->where_active()->find_all())
->page_items(25)
->columns(array(
'id'=>'ID',
'date_orig'=>'Date Created',
'due_date'=>'Date Due',
'total(TRUE)'=>'Total',
'due(TRUE)'=>'Due',
'account->accnum()'=>'Cust ID',
'account->name()'=>'Customer',
))
->prepend(array(
'id'=>array('url'=>URL::link('user','invoice/view/')),
))
);
}
}
?>