mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-06 12:45:30 +00:00
This commit is contained in:
@@ -122,7 +122,7 @@ SESSION_DRIVER=file
|
|||||||
# If you use Docker or similar, you can set REDIS_HOST_FILE, REDIS_PASSWORD_FILE or
|
# 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
|
# 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
|
REDIS_SCHEME=tcp
|
||||||
|
|
||||||
# use only when using 'unix' for REDIS_SCHEME. Leave empty otherwise.
|
# use only when using 'unix' for REDIS_SCHEME. Leave empty otherwise.
|
||||||
|
@@ -71,7 +71,6 @@ class EnableCurrencies extends Command
|
|||||||
$found = [$defaultCurrency->id];
|
$found = [$defaultCurrency->id];
|
||||||
|
|
||||||
// get all meta entries
|
// get all meta entries
|
||||||
/** @var Collection $meta */
|
|
||||||
$meta = AccountMeta::leftJoin('accounts', 'accounts.id', '=', 'account_meta.account_id')
|
$meta = AccountMeta::leftJoin('accounts', 'accounts.id', '=', 'account_meta.account_id')
|
||||||
->where('accounts.user_group_id', $userGroup->id)
|
->where('accounts.user_group_id', $userGroup->id)
|
||||||
->where('account_meta.name', 'currency_id')->groupBy('data')->get(['data'])
|
->where('account_meta.name', 'currency_id')->groupBy('data')->get(['data'])
|
||||||
@@ -108,6 +107,12 @@ class EnableCurrencies extends Command
|
|||||||
$found[] = $entry->transaction_currency_id;
|
$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_unique($found));
|
||||||
$found = array_values(
|
$found = array_values(
|
||||||
array_filter(
|
array_filter(
|
||||||
|
Reference in New Issue
Block a user