{% extends "base.html" %} {% block titre %}Rapport{% endblock %} {% block contenu %}

📊 Rapport

← Retour

{{ themes[theme] }}

Du {{ date_debut.strftime('%d/%m/%Y') }} au {{ date_fin.strftime('%d/%m/%Y') }}
{% if inclure_achats %}

Achats fournisseurs

{% if achats %}
{% for a in achats %} {% endfor %}
DateN° factureFournisseurProduitMontant (MAD)
{{ a.date_achat.strftime('%d/%m/%Y') }} {{ a.numero_facture or "—" }} {{ a.fournisseur.nom }} {{ a.designation_produit }} {{ "%.2f"|format(a.montant_total) }}
Total achats : {{ "%.2f"|format(total_achats) }}
{% for nom, nb, total in par_fournisseur %} {% endfor %}
FournisseurNb achatsTotal (MAD)
{{ nom }}{{ nb }}{{ "%.2f"|format(total or 0) }}
{% else %}

Aucun achat sur cette période.

{% endif %} {% endif %} {% if inclure_autres_frais %}

Autres frais

{% if autres_frais %}
{% for f in autres_frais %} {% endfor %}
DateTypeDescriptionMontant (MAD)
{{ f.date_frais.strftime('%d/%m/%Y') }} {{ f.type_frais }} {{ f.description or "—" }} {{ "%.2f"|format(f.montant) }}
Total autres frais : {{ "%.2f"|format(total_autres_frais) }}
{% for type_frais, total in par_type_frais %} {% endfor %}
TypeTotal (MAD)
{{ type_frais }}{{ "%.2f"|format(total or 0) }}
{% else %}

Aucun autre frais sur cette période.

{% endif %} {% endif %} {% if inclure_personnel %}

Frais de personnel

{% if frais_personnel %}
{% for f in frais_personnel %} {% endfor %}
EmployéPériodeDescriptionMontant (MAD)
{{ f.employe }} {{ f.periode }} {{ f.description or "—" }} {{ "%.2f"|format(f.montant) }}
Total frais de personnel : {{ "%.2f"|format(total_personnel) }}
{% for employe, total in par_employe %} {% endfor %}
EmployéTotal (MAD)
{{ employe }}{{ "%.2f"|format(total or 0) }}

Seuls les frais de personnel avec une date de période renseignée apparaissent ici.

{% else %}

Aucun frais de personnel sur cette période.

{% endif %} {% endif %}
Total général : {{ "%.2f"|format(total_general) }} MAD
{% endblock %}