Files
pmgr/site/views/elements/tenders.ctp
abijah 13f97e5770 Changed the deposit to use a grouped double entry instead of individual ones for each tender deposited
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@414 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-07-29 10:10:11 +00:00

22 lines
1.0 KiB
PHP

<?php /* -*- mode:PHP -*- */
// Define the table columns
$cols = array();
//$cols['ID'] = array('index' => 'Tender.id', 'formatter' => 'id');
$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('Sub-Total')));