Update configuration and fix some files.

This commit is contained in:
James Cole
2025-05-27 17:02:18 +02:00
parent c074fec0a7
commit d8f512ca3a
31 changed files with 154 additions and 111 deletions

View File

@@ -120,7 +120,7 @@ class UpgradesVariousCurrencyInformation extends Command
$leadTransaction = $this->getLeadTransaction($journal);
if (null === $leadTransaction) {
if (!$leadTransaction instanceof Transaction) {
$this->friendlyError(sprintf('Could not reliably determine which transaction is in the lead for transaction journal #%d.', $journal->id));
return;
@@ -129,7 +129,7 @@ class UpgradesVariousCurrencyInformation extends Command
$account = $leadTransaction->account;
$currency = $this->getCurrency($account);
$isMultiCurrency = $this->isMultiCurrency($account);
if (null === $currency) {
if (!$currency instanceof TransactionCurrency) {
$this->friendlyError(
sprintf(
'Account #%d ("%s") has no currency preference, so transaction journal #%d can\'t be corrected',
@@ -227,7 +227,7 @@ class UpgradesVariousCurrencyInformation extends Command
return $this->accountCurrencies[$accountId];
}
$currency = $this->accountRepos->getAccountCurrency($account);
if (null === $currency) {
if (!$currency instanceof TransactionCurrency) {
$this->accountCurrencies[$accountId] = 0;
return null;