git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@826 97e9348a-65ac-dc4b-aefc-98561f571b83
21 lines
982 B
PHP
21 lines
982 B
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
// Define the table columns
|
|
$cols = array();
|
|
$cols['Date'] = array('index' => 'Transaction.stamp', 'formatter' => 'date');
|
|
$cols['Customer'] = array('index' => 'Customer.name', 'formatter' => 'longname');
|
|
$cols['Item'] = array('index' => 'Tender.name', 'formatter' => 'longname');
|
|
$cols['Type'] = array('index' => 'TenderType.name', 'formatter' => 'name');
|
|
$cols['Comment'] = array('index' => 'Tender.comment', 'formatter' => 'comment');
|
|
$cols['Amount'] = array('index' => 'LedgerEntry.amount', 'formatter' => 'currency');
|
|
$cols['Sub-Total'] = array('index' => 'subtotal-LedgerEntry.amount', 'formatter' => 'currency');
|
|
|
|
// Render the grid
|
|
$grid
|
|
->columns($cols)
|
|
->sortField('Date')
|
|
->defaultFields(array('Date', 'Name', 'Amount'))
|
|
->searchFields(array('Name', 'Type'))
|
|
->render($this, isset($config) ? $config : null,
|
|
array_diff(array_keys($cols), array('Comment', 'Sub-Total')));
|