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:
@@ -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')),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -12,5 +12,9 @@ class MonetarySource extends AppModel {
|
||||
'MonetaryType',
|
||||
);
|
||||
|
||||
var $hasMany = array(
|
||||
'LedgerEntry',
|
||||
);
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user