{% extends 'app/base.html.twig' %} {% set moisNoms = ['', 'Janvier','Février','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','Décembre'] %} {% set couleurs = ['#4CAF50','#2196F3','#FF9800','#9C27B0','#F44336','#00BCD4','#8BC34A','#607D8B','#E91E63','#795548'] %} {% block title %}Répartition par Type — {% if mois == 0 %}{{ annee }}{% else %}{{ moisNoms[mois] }} {{ annee }}{% endif %}{% endblock %} {% block body %} {# ── En-tête ─────────────────────────────────────────────────────────────────── #}
{% if mois == 0 %}Année complète {{ annee }}{% else %}{{ moisNoms[mois] }} {{ annee }}{% endif %}
{{ stat.nb_ventes|number_format(0, ',', ' ') }} repas
Moy. {{ stat.moyenne_par_jour|number_format(1, ',', ' ') }} repas/jour
{{ totalVentes|number_format(0, ',', ' ') }} repas au total
| Type | Nb Repas | % Repas | Montant Total | % Montant | Prix Moyen | Moy./Jour |
|---|---|---|---|---|---|---|
| {{ stat.type|capitalize }} | {{ stat.nb_ventes|number_format(0, ',', ' ') }} | {{ stat.pourcentage_ventes }}% | {{ stat.total_montant|number_format(2, ',', ' ') }} € | {{ stat.pourcentage_montant }}% | {{ prixMoyen|number_format(2, ',', ' ') }} € | {{ stat.moyenne_par_jour|number_format(1, ',', ' ') }} |
| TOTAL | {{ totalVentes|number_format(0, ',', ' ') }} | 100% | {{ totalMontant|number_format(2, ',', ' ') }} € | 100% | {{ totalVentes > 0 ? (totalMontant / totalVentes)|number_format(2, ',', ' ') : '0,00' }} € | — |