'id_sequence', 'formatter' => 'id'); $cols['Name'] = array('index' => 'Ledger.name', 'formatter' => 'name'); $cols['Account'] = array('index' => 'Account.name', 'formatter' => 'longname'); $cols['Open Date'] = array('index' => 'PriorCloseTransaction.stamp', 'formatter' => 'date'); $cols['Close Date'] = array('index' => 'CloseTransaction.stamp', 'formatter' => 'date'); $cols['Comment'] = array('index' => 'Ledger.comment', 'formatter' => 'comment'); $cols['Entries'] = array('index' => 'entries', 'formatter' => 'number'); $cols['Debits'] = array('index' => 'debits', 'formatter' => 'currency'); $cols['Credits'] = array('index' => 'credits', 'formatter' => 'currency'); $cols['Balance'] = array('index' => 'balance', 'formatter' => 'currency'); // Render the grid $grid ->columns($cols) ->sortField('ID', 'ASC') ->defaultFields(array('ID', 'Name', 'Account')) ->searchFields(array('Account', 'Comment')) ->render($this, isset($config) ? $config : null, array_diff(array_keys($cols), array('Open Date', 'Comment')));