Added more information to the tender grid, and a new query to return depositable types

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@409 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-29 02:41:50 +00:00
parent 95f43f07bf
commit 3a6964c4bf
3 changed files with 47 additions and 19 deletions

View File

@@ -2,15 +2,17 @@
// Define the table columns
$cols = array();
$cols['ID'] = array('index' => 'Tender.id', 'formatter' => 'id');
$cols['Name'] = array('index' => 'Tender.name', 'formatter' => 'longname');
$cols['Comment'] = array('index' => 'Tender.comment', 'formatter' => 'comment');
//$cols['ID'] = array('index' => 'Tender.id', 'formatter' => 'id');
$cols['Date'] = array('index' => 'Transaction.stamp', 'formatter' => 'date');
$cols['Name'] = array('index' => 'Tender.name', 'formatter' => 'longname');
$cols['Comment'] = array('index' => 'Tender.comment', 'formatter' => 'comment');
$cols['Amount'] = array('index' => 'LedgerEntry.amount', 'formatter' => 'currency');
// Render the grid
$grid
->columns($cols)
->sortField('ID')
->defaultFields(array('ID', 'Name'))
->searchFields(array('ID', 'Name'))
->sortField('Date')
->defaultFields(array('Date', 'Name', 'Amount'))
->searchFields(array('Name'))
->render($this, isset($config) ? $config : null,
array_diff(array_keys($cols), array()));