{% set date1 = payments[0].paymentDate|date('d/m/Y') %}
{{date1}}
|
ID |
Montant |
Date paiment |
Méthode |
Transaction |
Référence |
Réservation |
{% set totalAmount = 0 %}
{% set n = payments|length %}
{% for key, payment in payments %}
{%set date1 = payments[key].paymentDate|date('d/m/Y')%}
{% if key < n - 1 %}
{%set date2 = payments[key + 1].paymentDate|date('d/m/Y')%}
{% endif %}
{{payment.id}} |
{{ payment.amountPaid|number_format(0, ',', '.') }} |
{{payment.paymentDate|date('d/m/Y H:i:s')}} |
{{payment.method}} |
{{payment.transaction}} |
{{payment.paymentReference}} |
{{payment.booking}} |
{% set totalAmount = totalAmount + payment.amountPaid %}
{% if date1 != date2 %}
Total :
{{ totalAmount|number_format(0, ',', '.') }}
{% set totalAmount = 0 %}
|
{{ date2 }}
|
ID |
Montant |
Date paiment |
Méthode |
Transaction |
Référence |
Réservation |
{% endif %}
{% endfor %}
Total :
{{ totalAmount|number_format(0, ',', '.') }}
|