{% extends 'layouts/authenticated.html.twig' %} {% block page_title %}Rapports POS{% endblock %} {% block content %}

Rapports

Mes ventes →
{# KPIs du jour #}

Ventes du jour

{{ stats.todaySales.count|default(0) }}

CA du jour

{{ stats.todaySales.totalAmount|default(0)|number_format(0, ',', ' ') }} FCFA

Ventes du mois

{{ stats.monthlySales.count|default(0) }}

CA du mois

{{ stats.monthlySales.totalAmount|default(0)|number_format(0, ',', ' ') }} FCFA

{# Top produits du jour #} {% if stats.topProducts|default([])|length > 0 %}

Top produits du jour

{% for item in stats.topProducts|slice(0, 5) %} {% endfor %}
# Produit Quantité CA
{{ loop.index }} {{ item.productName|default('—') }} {{ item.totalQuantity|default(0) }} {{ item.totalAmount|default(0)|number_format(0, ',', ' ') }}
{% endif %} {# Répartition paiements #} {% if stats.paymentMethods|default([])|length > 0 %}

Paiements du jour

{% set methodLabels = { 'cash': 'Espèces', 'mobile_money': 'Mobile Money', 'card': 'Carte', 'transfer': 'Virement', 'credit': 'Crédit' } %} {% set methodColors = { 'cash': 'emerald', 'mobile_money': 'orange', 'card': 'blue', 'transfer': 'purple', 'credit': 'red' } %} {% for method in stats.paymentMethods %}
{{ methodLabels[method.method]|default(method.method) }} {{ method.totalAmount|default(0)|number_format(0, ',', ' ') }} FCFA
{% endfor %}
{% endif %}
{% endblock %}