{% extends 'base.html' %} {% block title %}Statistiques{% endblock %} {% block content %}
CA par client
{% if by_client %} {% set total_rev = by_client | sum(attribute='revenue') %} {% for c in by_client %} {% endfor %}
ClientCommandesMarge moy.CA total
{{ c.name }} {{ c.jobs }} {{ c.avg_margin }}% {{ c.revenue }} € {% if total_rev > 0 %}
{% endif %}
{% else %}
Aucune donnée disponible.
{% endif %}
CA par mois (12 derniers)
{% if by_month %} {% set max_rev = by_month | map(attribute='revenue') | max %} {% for m in by_month %} {% endfor %}
MoisCmdsCA
{{ m.month }} {{ m.jobs }} {{ m.revenue }} € {% if max_rev > 0 %}
{% endif %}
{% else %}
Aucune donnée disponible.
{% endif %}
{% endblock %}