mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 09:52:20 +00:00
Fix old todo item
This commit is contained in:
@@ -125,19 +125,17 @@ class OtherCurrenciesCorrections extends Command
|
|||||||
if (isset($this->accountCurrencies[$accountId]) && $this->accountCurrencies[$accountId] instanceof TransactionCurrency) {
|
if (isset($this->accountCurrencies[$accountId]) && $this->accountCurrencies[$accountId] instanceof TransactionCurrency) {
|
||||||
return $this->accountCurrencies[$accountId]; // @codeCoverageIgnore
|
return $this->accountCurrencies[$accountId]; // @codeCoverageIgnore
|
||||||
}
|
}
|
||||||
// TODO we can use getAccountCurrency() instead
|
$currency = $this->accountRepos->getAccountCurrency($account);
|
||||||
$currencyId = (int)$this->accountRepos->getMetaValue($account, 'currency_id');
|
if (null === $currency) {
|
||||||
$result = $this->currencyRepos->findNull($currencyId);
|
|
||||||
if (null === $result) {
|
|
||||||
// @codeCoverageIgnoreStart
|
// @codeCoverageIgnoreStart
|
||||||
$this->accountCurrencies[$accountId] = 0;
|
$this->accountCurrencies[$accountId] = 0;
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
// @codeCoverageIgnoreEnd
|
// @codeCoverageIgnoreEnd
|
||||||
}
|
}
|
||||||
$this->accountCurrencies[$accountId] = $result;
|
$this->accountCurrencies[$accountId] = $currency;
|
||||||
|
|
||||||
return $result;
|
return $currency;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user