mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 14:12:15 +00:00
Merge branch 'develop' into 5.8-dev
# Conflicts: # composer.lock # config/firefly.php # public/v1/js/create_transaction.js # public/v1/js/edit_transaction.js # public/v1/js/profile.js # resources/assets/js/locales/pt-br.json # resources/lang/pt_BR/firefly.php # yarn.lock
This commit is contained in:
@@ -486,6 +486,13 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
*/
|
||||
public function getAccountCurrency(Account $account): ?TransactionCurrency
|
||||
{
|
||||
$type = $account->accountType->type;
|
||||
$list = config('firefly.valid_currency_account_types');
|
||||
|
||||
// return null if not in this list.
|
||||
if(!in_array($type, $list, true)) {
|
||||
return null;
|
||||
}
|
||||
$currencyId = (int) $this->getMetaValue($account, 'currency_id');
|
||||
if ($currencyId > 0) {
|
||||
return TransactionCurrency::find($currencyId);
|
||||
|
||||
Reference in New Issue
Block a user