'Transaction.id', 'formatter' => 'id'); $cols['Entry'] = array('index' => 'LedgerEntry.id', 'formatter' => 'id'); $cols['Date'] = array('index' => 'Transaction.stamp', 'formatter' => 'date'); $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);