{% extends "base.html" %}
{% block titre %}Rapport{% endblock %}
{% block contenu %}
{{ themes[theme] }}
Du {{ date_debut.strftime('%d/%m/%Y') }} au {{ date_fin.strftime('%d/%m/%Y') }}
{% if inclure_achats %}
Achats fournisseurs
{% if achats %}
| Date | N° facture | Fournisseur | Produit | Montant (MAD) |
{% for a in achats %}
| {{ a.date_achat.strftime('%d/%m/%Y') }} |
{{ a.numero_facture or "â" }} |
{{ a.fournisseur.nom }} |
{{ a.designation_produit }} |
{{ "%.2f"|format(a.montant_total) }} |
{% endfor %}
| Total achats : |
{{ "%.2f"|format(total_achats) }} |
| Fournisseur | Nb achats | Total (MAD) |
{% for nom, nb, total in par_fournisseur %}
| {{ nom }} | {{ nb }} | {{ "%.2f"|format(total or 0) }} |
{% endfor %}
{% else %}
Aucun achat sur cette période.
{% endif %}
{% endif %}
{% if inclure_autres_frais %}
Autres frais
{% if autres_frais %}
| Date | Type | Description | Montant (MAD) |
{% for f in autres_frais %}
| {{ f.date_frais.strftime('%d/%m/%Y') }} |
{{ f.type_frais }} |
{{ f.description or "â" }} |
{{ "%.2f"|format(f.montant) }} |
{% endfor %}
| Total autres frais : |
{{ "%.2f"|format(total_autres_frais) }} |
| Type | Total (MAD) |
{% for type_frais, total in par_type_frais %}
| {{ type_frais }} | {{ "%.2f"|format(total or 0) }} |
{% endfor %}
{% else %}
Aucun autre frais sur cette période.
{% endif %}
{% endif %}
{% if inclure_personnel %}
Frais de personnel
{% if frais_personnel %}
| Employé | Période | Description | Montant (MAD) |
{% for f in frais_personnel %}
| {{ f.employe }} |
{{ f.periode }} |
{{ f.description or "â" }} |
{{ "%.2f"|format(f.montant) }} |
{% endfor %}
| Total frais de personnel : |
{{ "%.2f"|format(total_personnel) }} |
| Employé | Total (MAD) |
{% for employe, total in par_employe %}
| {{ employe }} | {{ "%.2f"|format(total or 0) }} |
{% endfor %}
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 %}