'id_sequence', 'formatter' => 'id'); $cols['Account'] = array('index' => 'Account.name', 'formatter' => 'longname'); //$cols['Open Date'] = array('index' => 'PriorClose.stamp', 'formatter' => 'date'); $cols['Close Date'] = array('index' => 'Close.stamp', 'formatter' => 'date'); $cols['Comment'] = array('index' => 'Ledger.comment', 'formatter' => 'comment'); $cols['Entries'] = array('index' => 'entries', 'width' => '60', 'align' => 'right'); $cols['Debits'] = array('index' => 'debits', 'formatter' => 'currency'); $cols['Credits'] = array('index' => 'credits', 'formatter' => 'currency'); $cols['Balance'] = array('index' => 'balance', 'formatter' => 'currency'); // Set up search fields if requested by caller if (isset($searchfields)) $grid->searchFields(array('Account', 'Comment')); // Render the grid $grid ->columns($cols) ->sortField('ID', 'DESC') ->defaultFields(array('ID', 'Account')) ->render($this, isset($config) ? $config : null);