diff --git a/site/controllers/accounts_controller.php b/site/controllers/accounts_controller.php index 6528bbf..c6e78be 100644 --- a/site/controllers/accounts_controller.php +++ b/site/controllers/accounts_controller.php @@ -57,22 +57,21 @@ class AccountsController extends AppController { $params['action'] = 'all'; } - function jqGridDataTables(&$params, &$model) { - return array - ('link' => - array(// Models - 'CurrentLedger' => array - (// Models - 'LedgerEntry' => array - ('conditions' => - array('OR' => - array('LedgerEntry.debit_ledger_id = CurrentLedger.id', - 'LedgerEntry.credit_ledger_id = CurrentLedger.id'), - ), - ), + function jqGridDataExtraTables(&$params, &$model, &$query) { + unset($query['contain']); + $query['link'] = + array(// Models + 'CurrentLedger' => array + (// Models + 'LedgerEntry' => array + ('conditions' => + array('OR' => + array('LedgerEntry.debit_ledger_id = CurrentLedger.id', + 'LedgerEntry.credit_ledger_id = CurrentLedger.id'), + ), ), ), - ); + ); } function jqGridDataFields(&$params, &$model) {