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
|
else
|
||||||
$entry['MatchingEntry'] = $entry['DebitEntry'][0];
|
$entry['MatchingEntry'] = $entry['DebitEntry'][0];
|
||||||
|
|
||||||
if (empty($entry['DebitDoubleEntry']))
|
if (empty($entry['DebitDoubleEntry']['id']))
|
||||||
$entry['DoubleEntry'] = $entry['CreditDoubleEntry'];
|
$entry['DoubleEntry'] = $entry['CreditDoubleEntry'];
|
||||||
else
|
else
|
||||||
$entry['DoubleEntry'] = $entry['DebitDoubleEntry'];
|
$entry['DoubleEntry'] = $entry['DebitDoubleEntry'];
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class LedgerEntry extends AppModel {
|
|||||||
),
|
),
|
||||||
'DebitDoubleEntry' => array(
|
'DebitDoubleEntry' => array(
|
||||||
'className' => 'DoubleEntry',
|
'className' => 'DoubleEntry',
|
||||||
'foreignKey' => 'credit_entry_id',
|
'foreignKey' => 'debit_entry_id',
|
||||||
'dependent' => true,
|
'dependent' => true,
|
||||||
),
|
),
|
||||||
'CreditDoubleEntry' => array(
|
'CreditDoubleEntry' => array(
|
||||||
|
|||||||
Reference in New Issue
Block a user