{% extends admin.getTemplate('base_list_field') %} {% block field %} {% if (object.newAmountRequested is not null or object.newDebitDay is not null) and object.modificationRequestedAt is not null %} {% set oldAmount = object.monthlyAmount %} {% set newAmount = object.newAmountRequested %} {% set oldDebitDay = object.debitDay %} {% set newDebitDay = object.newDebitDay %} {% set tooltipText = 'Modification demandée le ' ~ object.modificationRequestedAt|date('d/m/Y H:i') %}
{% if newAmount is not null %} {% set variance = newAmount - oldAmount %} {% set percentChange = (variance / oldAmount * 100)|round(1) %} {{ oldAmount|number_format(2, ',', ' ') }}€ → {{ newAmount|number_format(2, ',', ' ') }}€ {% if variance > 0 %} (+{{ percentChange }}%) {% else %} ({{ percentChange }}%) {% endif %} {% endif %} {% if newDebitDay is not null %} {% if newAmount is not null %}
{% endif %} Jour: {{ oldDebitDay }} → {{ newDebitDay }} {% endif %}
{# Boutons d'action #} {% if admin.hasAccess('edit', object) %}
{% if admin.hasRoute('approveModification') %} {% endif %} {% if admin.hasRoute('rejectModification') %} {% endif %}
{% endif %}
{% else %} - {% endif %} {% endblock %}