Added monetary source into the ledger entry lists. This may be more information than is needed on the listing, but I'll take it out later if so.

git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@139 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-06-15 21:52:38 +00:00
parent 365b2295af
commit 7ee461d993
3 changed files with 12 additions and 2 deletions

View File

@@ -29,8 +29,13 @@ class LedgerEntriesController extends AppController {
return array
('link' =>
array(// Models
'Transaction' => array('fields' =>
'Transaction' =>
array('fields' =>
array('Transaction.id', 'Transaction.stamp')),
'MonetarySource' =>
array('fields' =>
array('MonetarySource.id', 'MonetarySource.name')),
),
);
}

View File

@@ -12,5 +12,9 @@ class MonetarySource extends AppModel {
'MonetaryType',
);
var $hasMany = array(
'LedgerEntry',
);
}
?>

View File

@@ -5,6 +5,7 @@ $cols = array();
$cols['Transaction'] = array('index' => 'Transaction.id', 'formatter' => 'id');
$cols['Entry'] = array('index' => 'LedgerEntry.id', 'formatter' => 'id');
$cols['Date'] = array('index' => 'Transaction.stamp', 'formatter' => 'date');
$cols['Source'] = array('index' => 'MonetarySource.name', 'formatter' => 'name');
$cols['Comment'] = array('index' => 'LedgerEntry.comment', 'formatter' => 'comment');
$cols['Debit'] = array('index' => 'debit', 'formatter' => 'currency');
$cols['Credit'] = array('index' => 'credit', 'formatter' => 'currency');