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
This commit is contained in:
abijah
2009-06-15 06:31:21 +00:00
parent e3b838d62a
commit abd45244e1

View File

@@ -57,22 +57,21 @@ class AccountsController extends AppController {
$params['action'] = 'all'; $params['action'] = 'all';
} }
function jqGridDataTables(&$params, &$model) { function jqGridDataExtraTables(&$params, &$model, &$query) {
return array unset($query['contain']);
('link' => $query['link'] =
array(// Models array(// Models
'CurrentLedger' => array 'CurrentLedger' => array
(// Models (// Models
'LedgerEntry' => array 'LedgerEntry' => array
('conditions' => ('conditions' =>
array('OR' => array('OR' =>
array('LedgerEntry.debit_ledger_id = CurrentLedger.id', array('LedgerEntry.debit_ledger_id = CurrentLedger.id',
'LedgerEntry.credit_ledger_id = CurrentLedger.id'), 'LedgerEntry.credit_ledger_id = CurrentLedger.id'),
), ),
),
), ),
), ),
); );
} }
function jqGridDataFields(&$params, &$model) { function jqGridDataFields(&$params, &$model) {