git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@318 97e9348a-65ac-dc4b-aefc-98561f571b83
46 lines
2.2 KiB
PHP
46 lines
2.2 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
// Define the table columns
|
|
$cols = array();
|
|
|
|
$cols['REntry'] = array('index' => 'RLedgerEntry.id', 'formatter' => 'id');
|
|
$cols['RDate'] = array('index' => 'RTransaction.stamp', 'formatter' => 'date');
|
|
$cols['REffective'] = array('index' => 'RLedgerEntry.effective_date', 'formatter' => 'date');
|
|
$cols['RThrough'] = array('index' => 'RLedgerEntry.through_date', 'formatter' => 'date');
|
|
$cols['RAccount'] = array('index' => 'RAccount.name', 'formatter' => 'name');
|
|
|
|
//$cols['Transaction'] = array('index' => 'Transaction.id', 'formatter' => 'id');
|
|
$cols['Entry'] = array('index' => 'LedgerEntry.id', 'formatter' => 'id');
|
|
|
|
$cols['Date'] = array('index' => 'Transaction.stamp', 'formatter' => 'date');
|
|
|
|
$cols['Account'] = array('index' => 'DebitAccount.name', 'formatter' => 'name');
|
|
|
|
$cols['Customer'] = array('index' => 'Customer.name', 'formatter' => 'longname');
|
|
//$cols['Lease'] = array('index' => 'Lease.number', 'formatter' => 'id');
|
|
$cols['Unit'] = array('index' => 'Unit.name', 'formatter' => 'name');
|
|
|
|
//$cols['Source'] = array('index' => 'MonetarySource.name', 'formatter' => 'name');
|
|
//$cols['Comment'] = array('index' => 'LedgerEntry.comment', 'formatter' => 'comment', 'width'=>150);
|
|
|
|
$cols['RAmount'] = array('index' => 'RLedgerEntry.amount', 'formatter' => 'currency');
|
|
$cols['Amount'] = array('index' => 'LedgerEntry.amount', 'formatter' => 'currency');
|
|
$cols['Applied'] = array('index' => 'Reconciliation.amount', 'formatter' => 'currency');
|
|
|
|
$cols['Sub-Total'] = array('index' => 'subtotal', 'formatter' => 'currency', 'sortable' => false);
|
|
|
|
// This element is non-standard.
|
|
// Let grid know who the controller is
|
|
$grid->controller = 'ledger_entries';
|
|
|
|
$collected_account_id = $this->passedArgs[0];
|
|
$collected_not = (isset($this->passedArgs[1]) ? $this->passedArgs[1] : 0);
|
|
$grid->customData(compact('collected_account_id', 'collected_not'));
|
|
|
|
// Render the grid
|
|
$grid
|
|
->limit(500)
|
|
->columns($cols)
|
|
->sortField('Date')
|
|
->render($this, isset($config) ? $config : null);
|