Changed account to split the table requests into two parts.

git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@132 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-06-15 06:31:21 +00:00
parent 39071b39fb
commit d859cb4dee

View File

@@ -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) {