Bug fix for matching ledger entry to double entry
git-svn-id: file:///svn-source/pmgr/branches/surplus_account_20090815@572 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -197,7 +197,7 @@ class LedgerEntriesController extends AppController {
|
||||
else
|
||||
$entry['MatchingEntry'] = $entry['DebitEntry'][0];
|
||||
|
||||
if (empty($entry['DebitDoubleEntry']))
|
||||
if (empty($entry['DebitDoubleEntry']['id']))
|
||||
$entry['DoubleEntry'] = $entry['CreditDoubleEntry'];
|
||||
else
|
||||
$entry['DoubleEntry'] = $entry['DebitDoubleEntry'];
|
||||
|
||||
@@ -13,7 +13,7 @@ class LedgerEntry extends AppModel {
|
||||
),
|
||||
'DebitDoubleEntry' => array(
|
||||
'className' => 'DoubleEntry',
|
||||
'foreignKey' => 'credit_entry_id',
|
||||
'foreignKey' => 'debit_entry_id',
|
||||
'dependent' => true,
|
||||
),
|
||||
'CreditDoubleEntry' => array(
|
||||
|
||||
Reference in New Issue
Block a user