Fixed old usages of base_currency

This commit is contained in:
Jan Böhmer 2024-08-03 23:19:09 +02:00
parent 2ab2b7f77d
commit e9973af8f4
3 changed files with 10 additions and 6 deletions

View file

@ -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 %}