mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
Fixed old usages of base_currency
This commit is contained in:
parent
2ab2b7f77d
commit
e9973af8f4
3 changed files with 10 additions and 6 deletions
|
@ -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'),
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{% extends "admin/base_admin.html.twig" %}
|
||||
|
||||
{% import "vars.macro.twig" as vars %}
|
||||
|
||||
{% block card_title %}
|
||||
<i class="fa-solid fa-coins"></i> {% trans %}currency.caption{% endtrans %}
|
||||
{% endblock %}
|
||||
|
@ -20,8 +22,8 @@
|
|||
{{ form_row(form.exchange_rate) }}
|
||||
{% if entity.inverseExchangeRate %}
|
||||
<p class="form-text text-muted offset-3 col-9">
|
||||
{{ '1'|format_currency(default_currency) }} = {{ entity.inverseExchangeRate.tofloat | format_currency(entity.isoCode, {fraction_digit: 5}) }}<br>
|
||||
{{ '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}) }}<br>
|
||||
{{ '1'|format_currency(entity.isoCode) }} = {{ entity.exchangeRate.tofloat | format_currency(vars.base_currency(), {fraction_digit: 5}) }}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
{% macro partdb_title() %}{{ settings_instance("customization").instanceName }}{% endmacro %}
|
||||
{% macro partdb_title() %}{{ settings_instance("customization").instanceName }}{% endmacro %}
|
||||
|
||||
{% macro base_currency() %}{{ settings_instance("localization").baseCurrency }}{% endmacro %}
|
Loading…
Add table
Add a link
Reference in a new issue