fix twig date and currency filter deprecation

This commit is contained in:
Tchama 2020-09-05 15:38:41 +02:00
parent 92f3926bbf
commit e34afe1ee6

View File

@ -56,12 +56,12 @@
<td>
{{ f.type|budget_element_type_display(family) }}
</td>
<td>{{ f.amount|localizedcurrency('EUR') }}</td>
<td>{{ f.amount|format_currency('EUR') }}</td>
<td>
{% if f.endDate is not null %}
{{ 'Valid since %startDate% until %endDate%'|trans( { '%startDate%': f.startDate|localizeddate('long', 'none'), '%endDate%': f.endDate|localizeddate('long', 'none') } ) }}
{{ 'Valid since %startDate% until %endDate%'|trans( { '%startDate%': f.startDate|format_date('long', 'none'), '%endDate%': f.endDate|format_date('long', 'none') } ) }}
{% else %}
{{ 'Valid since %startDate%'|trans( { '%startDate%': f.startDate|localizeddate('long', 'none') } ) }}
{{ 'Valid since %startDate%'|trans( { '%startDate%': f.startDate|format_date('long', 'none') } ) }}
{% endif %}
</td>
<td>
@ -90,7 +90,7 @@
{{ 'Total'|trans }}
</td>
<td>
{{ total|localizedcurrency('EUR') }}
{{ total|format_currency('EUR') }}
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
@ -113,7 +113,7 @@
<td>{{ result.label }}</td>
<td>
{% if result.type == constant('CHILL\\AMLI\\BudgetBundle\\Calculator\\CalculatorResult::TYPE_CURRENCY') %}
{{ result.result|localizedcurrency('EUR') }}
{{ result.result|format_currency('EUR') }}
{% elseif result.type == constant('CHILL\\AMLI\\BudgetBundle\\Calculator\\CalculatorResult::TYPE_PERCENTAGE') %}
{{ result.result|round(2, 'ceil') ~ '%' }}
{% else %}