Auto commit for release 'develop' on 2024-08-05

This commit is contained in:
github-actions
2024-08-05 05:06:53 +02:00
parent d2e9b64bf5
commit ed265f68ba
32 changed files with 574 additions and 564 deletions

View File

@@ -43,8 +43,8 @@ class OtherCurrenciesCorrections extends Command
use ShowsFriendlyMessages;
public const string CONFIG_NAME = '480_other_currencies';
protected $description = 'Update all journal currency information.';
protected $signature = 'firefly-iii:other-currencies {--F|force : Force the execution of this command.}';
protected $description = 'Update all journal currency information.';
protected $signature = 'firefly-iii:other-currencies {--F|force : Force the execution of this command.}';
private array $accountCurrencies;
private AccountRepositoryInterface $accountRepos;
private JournalCLIRepositoryInterface $cliRepos;
@@ -220,14 +220,14 @@ class OtherCurrenciesCorrections extends Command
private function getCurrency(Account $account): ?TransactionCurrency
{
$accountId = $account->id;
$accountId = $account->id;
if (array_key_exists($accountId, $this->accountCurrencies) && 0 === $this->accountCurrencies[$accountId]) {
return null;
}
if (array_key_exists($accountId, $this->accountCurrencies) && $this->accountCurrencies[$accountId] instanceof TransactionCurrency) {
return $this->accountCurrencies[$accountId];
}
$currency = $this->accountRepos->getAccountCurrency($account);
$currency = $this->accountRepos->getAccountCurrency($account);
if (null === $currency) {
$this->accountCurrencies[$accountId] = 0;
@@ -249,6 +249,7 @@ class OtherCurrenciesCorrections extends Command
if (false === $value || null === $value) {
return false;
}
return '1' === $value;
}
}