From abd45244e1ddf8a25aac7cbbcbe63cc592988d85 Mon Sep 17 00:00:00 2001 From: abijah Date: Mon, 15 Jun 2009 06:31:21 +0000 Subject: [PATCH] Changed account to split the table requests into two parts. git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@132 97e9348a-65ac-dc4b-aefc-98561f571b83 --- controllers/accounts_controller.php | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/controllers/accounts_controller.php b/controllers/accounts_controller.php index 6528bbf..c6e78be 100644 --- a/controllers/accounts_controller.php +++ b/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) {