{# Bloc image / icône #}
{% if image %} Image produit {% else %}
{% endif %}
{# Infos produit #}
{{ reference }} — {{ nom }}
{% set totalCommande = 0 %} {% set totalVendu = 0 %} {% set totalAnnulee = 0 %} {% set totalRetour = 0 %} {% set totalMontant = 0 %} {% for row in stats %} {% set totalCommande = totalCommande + (row.qtTotal ?: 0) %} {% set totalVendu = totalVendu + (row.qtVendu ?: 0) %} {% set totalAnnulee = totalAnnulee + (row.qtAnnulee ?: 0) %} {% set totalRetour = totalRetour + (row.qtRetour ?: 0) %} {% set totalMontant = totalMontant + (row.montantTotal ?: 0) %} {% endfor %}
Regroupement par : {{ stats[0].declinaison_label|default('Déclinaison') }}
{% if dateDebut is defined and dateFin is defined %}
Date : Du {{ dateDebut|date('d/m/Y') }} au {{ dateFin|date('d/m/Y') }}
{% endif %}
{% for row in stats %} {% set qtTotal = row.qtTotal ?: 0 %} {% set qtVendu = row.qtVendu ?: 0 %} {% set qtAnnulee = row.qtAnnulee ?: 0 %} {% set qtRetour = row.qtRetour ?: 0 %} {% set pVendu = qtTotal > 0 ? ((qtVendu / qtTotal) * 100)|round : 0 %} {% set pAnnulee = qtTotal > 0 ? ((qtAnnulee / qtTotal) * 100)|round : 0 %} {% set pRetour = qtTotal > 0 ? ((qtRetour / qtTotal) * 100)|round : 0 %} {% set partGlobal = totalCommande > 0 ? ((qtTotal / totalCommande) * 100)|round : 0 %} {% endfor %}
Image {{ stats[0].declinaison_label|default('Declinaison') }} Qté Cdé Qté Vendue Qté Annulée Qté Retournée Montant total
{% if row.decli_image %} Image déclinaison {% else %}
{% endif %}
{{ row.valeur }}
{{ qtTotal }}
{{ partGlobal }}%
{{ qtVendu }}
{{ pVendu }}%
{{ qtAnnulee }}
{{ pAnnulee }}%
{{ qtRetour }}
{{ pRetour }}%
{{ row.montantTotal|number_format(3, '.', ' ') }} TND
Total {{ totalCommande }} {{ totalVendu }} {{ totalAnnulee }} {{ totalRetour }} {{ totalMontant|number_format(3, '.', ' ') }} TND