Very, very messy and broken. It does work somewhat, but I can see just what a mess it's going to be to carry it out, so I'm abandoning.

git-svn-id: file:///svn-source/pmgr/branches/reconcile_entry_to_receipt_20090629@187 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-06-30 00:59:09 +00:00
parent 4f0b5ffc28
commit c9ade62536
14 changed files with 423 additions and 269 deletions

View File

@@ -41,6 +41,43 @@ class TransactionsController extends AppController {
* to jqGrid.
*/
function jqGridDataSetup(&$params) {
parent::jqGridDataSetup($params);
}
function jqGridDataTables(&$params, &$model) {
$link = array();
if (isset($params['custom']['reconcile_ledger_entry_id'])) {
$ftype = $params['custom']['reconcile_type'];
//$ftype = $this->Transaction->LedgerEntry->DebitLedger->Account->fundamentalOpposite($ftype);
$link['ReconciledLedgerEntry'] =
array('fields' => array('Reconciliation.amount'),
'conditions' => array('Reconciliation.type' => $ftype)
);
}
return array('link' => $link);
}
function jqGridDataFields(&$params, &$model) {
return parent::jqGridDataFields($params, $model);
}
function jqGridDataConditions(&$params, &$model) {
$conditions = parent::jqGridDataConditions($params, $model);
if (isset($params['custom']['reconcile_ledger_entry_id'])) {
/* $ftype = $params['custom']['reconcile_type']; */
/* $ftype = $this->LedgerEntry->DebitLedger->Account->fundamentalOpposite($ftype); */
/* $conditions[] = array('Reconciliation.type' => $ftype); */
$conditions[] = array('Reconciliation.ledger_entry_id'
=> $params['custom']['reconcile_ledger_entry_id']);
}
return $conditions;
}
function jqGridRecordLinks(&$params, &$model, &$records, $links) {
$links['Transaction'] = array('id');
return parent::jqGridRecordLinks($params, $model, $records, $links);