Fix API error

This commit is contained in:
James Cole
2023-11-05 14:31:05 +01:00
parent c0cc896102
commit 998fed7782
5 changed files with 7 additions and 7 deletions

View File

@@ -113,7 +113,7 @@ class CorrectOpeningBalanceCurrencies extends Command
$transactions = $journal->transactions()->get();
/** @var Transaction $transaction */
foreach ($transactions as $transaction) {
/** @var Account $account */
/** @var Account|null $account */
$account = $transaction->account()->first();
if (null !== $account && AccountType::INITIAL_BALANCE !== $account->accountType()->first()->type) {
return $account;