mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 16:13:54 +00:00
Another fix for #11054
This commit is contained in:
@@ -221,8 +221,19 @@ class TransactionJournalFactory
|
||||
];
|
||||
Log::debug('Source info:', $sourceInfo);
|
||||
Log::debug('Destination info:', $destInfo);
|
||||
$sourceAccount = $this->getAccount($type->type, 'source', $sourceInfo);
|
||||
$destinationAccount = $this->getAccount($type->type, 'destination', $destInfo, $sourceAccount);
|
||||
$destinationAccount = null;
|
||||
$sourceAccount = null;
|
||||
if(TransactionTypeEnum::DEPOSIT->value === $type->type) {
|
||||
Log::debug(sprintf('Transaction type is deposit, start with destination first.'));
|
||||
$destinationAccount = $this->getAccount($type->type, 'destination', $destInfo);
|
||||
$sourceAccount = $this->getAccount($type->type, 'source', $sourceInfo, $destinationAccount);
|
||||
}
|
||||
if(TransactionTypeEnum::DEPOSIT->value !== $type->type) {
|
||||
Log::debug(sprintf('Transaction type is not deposit, start with source first.'));
|
||||
$sourceAccount = $this->getAccount($type->type, 'source', $sourceInfo);
|
||||
$destinationAccount = $this->getAccount($type->type, 'destination', $destInfo, $sourceAccount);
|
||||
}
|
||||
|
||||
Log::debug('Done with getAccount(2x)');
|
||||
|
||||
// there is a safety catch here. If either account is NULL, they will be replaced with the cash account.
|
||||
|
Reference in New Issue
Block a user