mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Fix #3493
This commit is contained in:
@@ -577,7 +577,8 @@ class CurrencyController extends Controller
|
|||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$currency = app('amount')->getDefaultCurrencyByUser(auth()->user());
|
$currency = app('amount')->getDefaultCurrencyByUser(auth()->user());
|
||||||
|
$this->parameters->set('defaultCurrency', $currency);
|
||||||
|
|
||||||
/** @var CurrencyTransformer $transformer */
|
/** @var CurrencyTransformer $transformer */
|
||||||
$transformer = app(CurrencyTransformer::class);
|
$transformer = app(CurrencyTransformer::class);
|
||||||
$transformer->setParameters($this->parameters);
|
$transformer->setParameters($this->parameters);
|
||||||
|
@@ -55,7 +55,7 @@ class CurrencyTransformer extends AbstractTransformer
|
|||||||
$isDefault = false;
|
$isDefault = false;
|
||||||
$defaultCurrency = $this->parameters->get('defaultCurrency');
|
$defaultCurrency = $this->parameters->get('defaultCurrency');
|
||||||
if (null !== $defaultCurrency) {
|
if (null !== $defaultCurrency) {
|
||||||
$isDefault = $defaultCurrency->id === $currency->id;
|
$isDefault = (int) $defaultCurrency->id === (int) $currency->id;
|
||||||
}
|
}
|
||||||
$data = [
|
$data = [
|
||||||
'id' => (int)$currency->id,
|
'id' => (int)$currency->id,
|
||||||
|
Reference in New Issue
Block a user