git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@139 97e9348a-65ac-dc4b-aefc-98561f571b83
26 lines
1.1 KiB
PHP
26 lines
1.1 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
// Define the table columns
|
|
$cols = array();
|
|
$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['Source'] = array('index' => 'MonetarySource.name', 'formatter' => 'name');
|
|
$cols['Comment'] = array('index' => 'LedgerEntry.comment', 'formatter' => 'comment');
|
|
$cols['Debit'] = array('index' => 'debit', 'formatter' => 'currency');
|
|
$cols['Credit'] = array('index' => 'credit', 'formatter' => 'currency');
|
|
//$cols['Total'] = array('index' => 'balance', 'formatter' => 'currency');
|
|
|
|
$jqGrid_options = array('jqGridColumns' => $cols,
|
|
'controller' => 'ledger_entries',
|
|
'caption' => isset($caption) ? $caption : null);
|
|
|
|
if (isset($ledger_id)) {
|
|
$jqGrid_options += array('custom_post_data' => array('ledger_id' => $ledger_id,
|
|
'account_type' => $account_type),
|
|
'limit' => 50);
|
|
}
|
|
|
|
echo $this->element('jqGrid', $jqGrid_options);
|
|
|