This commit is contained in:
James Cole
2025-10-12 12:25:21 +02:00
parent 7c4ada458e
commit df3e4a6554
2 changed files with 8 additions and 0 deletions

View File

@@ -225,6 +225,11 @@ class TransactionJournalFactory
$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.
if(null === $destinationAccount) {
Log::warning('Destination account is NULL, will replace with cash account.');
$destinationAccount = $this->accountRepository->getCashAccount();
}
// this is the moment for a reconciliation sanity check (again).
if (TransactionTypeEnum::RECONCILIATION->value === $type->type) {