diff --git a/src/Controller/ToolsController.php b/src/Controller/ToolsController.php index aea23895..74dcabb7 100644 --- a/src/Controller/ToolsController.php +++ b/src/Controller/ToolsController.php @@ -57,9 +57,9 @@ class ToolsController extends AbstractController //Part-DB section 'git_branch' => $versionInfo->getGitBranchName(), 'git_commit' => $versionInfo->getGitCommitHash(), - 'default_locale' => $this->getParameter('partdb.locale'), - 'default_timezone' => $this->getParameter('partdb.timezone'), - 'default_currency' => $this->getParameter('partdb.default_currency'), + 'default_locale' => $settings->system->localization->locale, + 'default_timezone' => $settings->system->localization->timezone, + 'default_currency' => $settings->system->localization->baseCurrency, 'default_theme' => $settings->system->customization->theme, 'enabled_locales' => $this->getParameter('partdb.locale_menu'), 'demo_mode' => $this->getParameter('partdb.demo_mode'), diff --git a/templates/admin/currency_admin.html.twig b/templates/admin/currency_admin.html.twig index dca46ce6..fbd3822c 100644 --- a/templates/admin/currency_admin.html.twig +++ b/templates/admin/currency_admin.html.twig @@ -1,5 +1,7 @@ {% extends "admin/base_admin.html.twig" %} +{% import "vars.macro.twig" as vars %} + {% block card_title %} {% trans %}currency.caption{% endtrans %} {% endblock %} @@ -20,8 +22,8 @@ {{ form_row(form.exchange_rate) }} {% if entity.inverseExchangeRate %}
- {{ '1'|format_currency(default_currency) }} = {{ entity.inverseExchangeRate.tofloat | format_currency(entity.isoCode, {fraction_digit: 5}) }}
- {{ '1'|format_currency(entity.isoCode) }} = {{ entity.exchangeRate.tofloat | format_currency(default_currency, {fraction_digit: 5}) }}
+ {{ '1'|format_currency(vars.base_currency()) }} = {{ entity.inverseExchangeRate.tofloat | format_currency(entity.isoCode, {fraction_digit: 5}) }}
+ {{ '1'|format_currency(entity.isoCode) }} = {{ entity.exchangeRate.tofloat | format_currency(vars.base_currency(), {fraction_digit: 5}) }}