{% set array_type = ['T01', 'T02', 'T03', 'T04', 'T05'] %} {% set array_montant = {'T01':'Budget', 'T02':'Montant caution', 'T03':"Montant d'offre", 'T04':'Montant contractualisé', 'T05':'Montant part SFM'} %} {% set array_champ = {'T01':'budget', 'T02':'montantCaution', 'T03':"montantOffre", 'T04':'montantContractualise', 'T05':'montantPartSFM'} %}
{% if opportunity is defined %} {% set array_value = {'T01':opportunity.budget, 'T02':opportunity.montantCaution, 'T03':opportunity.montantOffre, 'T04':opportunity.montantContractualise, 'T05':opportunity.montantPartSFM} %} {% set unity = opportunity.unityAbreviation %} {% set type_opportunity = opportunity.type %} {% for type in array_type %} {% if ((type_opportunity == 'T01' and type != 'T02') or (type_opportunity == 'T02') ) %}

{% set count = 0 %} {% for history in opportunity.historyMontantCRMs if history.type == type %} {% set count = count + 1 %}
user {{ history.userCreator.getFullName }} ( {{ history.userCreator.groupe.name }} )
Ancien montant : {{ history.montantBefore|number_format(0,'',' ') }} {{ unity }}
Nouveau montant : {{ history.montantAfter|number_format(0,'',' ') }} {{ unity }}
{{ history.dateModification|date('Y-m-d H:i') }}
{% endfor %} {% if count == 0 %} {% endif %}
{% endif %} {% endfor %} {% else %} {% endif %}