Captured some thoughts, some experiments on how to tie statement entry to ledger entry. It's not at all clear we want to go down this (or any other) path at the moment. This checkin will probably go nowhere, as I'm going to see if we can make do with the current implementation.
git-svn-id: file:///svn-source/pmgr/branches/statement_ledger_entry_tie_20090802@468 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -118,7 +118,7 @@ class Transaction extends AppModel {
|
||||
// REVISIT <AP>: 20090802
|
||||
// Completely un-implemented. Just copied from addReceipt
|
||||
// and search-replace receipt with waiver.
|
||||
return ('error' => true);
|
||||
return array('error' => true);
|
||||
|
||||
// Establish the transaction as a waiver
|
||||
$waiver =& $data['Transaction'];
|
||||
@@ -427,7 +427,7 @@ class Transaction extends AppModel {
|
||||
// Create the statement entry
|
||||
$se =
|
||||
array_intersect_key($entry,
|
||||
array_flip(array('type', 'account_id', 'amount',
|
||||
array_flip(array('type', 'amount',
|
||||
'effective_date', 'through_date', 'due_date',
|
||||
'customer_id', 'lease_id',
|
||||
'charge_entry_id'))) +
|
||||
@@ -502,7 +502,11 @@ class Transaction extends AppModel {
|
||||
}
|
||||
|
||||
if (!empty($se)) {
|
||||
//pr($ret['entries'][$e_index]['DoubleEntry']); die;
|
||||
$le_id = $ret['entries'][0]['DoubleEntry']['Entry1']['ledger_entry_id'];
|
||||
$se['transaction_id'] = $ret['transaction_id'];
|
||||
$se['Fraction'] = array(array('ledger_entry_id' => $le_id,
|
||||
'amount' => $se['amount']));
|
||||
$result = $this->StatementEntry->addStatementEntry($se);
|
||||
$ret['entries'][$e_index]['StatementEntry'] = $result;
|
||||
if ($result['error']) {
|
||||
|
||||
Reference in New Issue
Block a user