mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
This commit is contained in:
parent
44df07a5f5
commit
7ea112c5e7
@ -122,7 +122,7 @@ SESSION_DRIVER=file
|
||||
# If you use Docker or similar, you can set REDIS_HOST_FILE, REDIS_PASSWORD_FILE or
|
||||
# REDIS_PORT_FILE to set the value from a file instead of from an environment variable
|
||||
|
||||
# can be tcp, unix or http
|
||||
# can be tcp or unix. http is not supported
|
||||
REDIS_SCHEME=tcp
|
||||
|
||||
# use only when using 'unix' for REDIS_SCHEME. Leave empty otherwise.
|
||||
|
@ -71,7 +71,6 @@ class EnableCurrencies extends Command
|
||||
$found = [$defaultCurrency->id];
|
||||
|
||||
// get all meta entries
|
||||
/** @var Collection $meta */
|
||||
$meta = AccountMeta::leftJoin('accounts', 'accounts.id', '=', 'account_meta.account_id')
|
||||
->where('accounts.user_group_id', $userGroup->id)
|
||||
->where('account_meta.name', 'currency_id')->groupBy('data')->get(['data'])
|
||||
@ -108,6 +107,12 @@ class EnableCurrencies extends Command
|
||||
$found[] = $entry->transaction_currency_id;
|
||||
}
|
||||
|
||||
// also get all currencies already enabled.
|
||||
$alreadyEnabled = $userGroup->currencies()->get(['transaction_currencies.id'])->pluck('id')->toArray();
|
||||
foreach ($alreadyEnabled as $currencyId) {
|
||||
$found[] = $currencyId;
|
||||
}
|
||||
|
||||
$found = array_values(array_unique($found));
|
||||
$found = array_values(
|
||||
array_filter(
|
||||
|
Loading…
Reference in New Issue
Block a user