{% extends 'base.html.twig' %} {% block title %}Clôture de Caisse — {{ caisse.nom }}{% endblock %} {% block styles %} {% endblock %} {% block body %}
{# ─── Flash messages ────────────────────────────────────────── #} {% for label, messages in app.flashes %} {% for message in messages %}
{{ message }}
{% endfor %} {% endfor %} {# ─── Header ────────────────────────────────────────────────── #} {# ─── Sélecteur de date ─────────────────────────────────────── #}
{# ─── Tableau de la formule ─────────────────────────────────── #}
Entrées
Cash j-1 {% if preview.derniereCloture %} (clôture du {{ preview.derniereCloture.dateCloture|date('d/m/Y') }}) {% else %} (première clôture) {% endif %} {{ preview.cashJ1|number_format(3, '.', ' ') }} DT
Alimentation de la période (du {{ preview.startPeriode|date('d/m/Y') }} au {{ dateJ|date('d/m/Y') }}) ({{ preview.detail_alimentations|length }} mouvements) + {{ preview.alimentationJ|number_format(3, '.', ' ') }} DT
Déductions
Reste Transactions en cours j ({{ preview.detail_transactions|length }} transactions) {{ preview.resteTransactionJ|number_format(3, '.', ' ') }} DT
Reste Transactions en cours j-1 {{ preview.resteTransactionJ1|number_format(3, '.', ' ') }} DT
Delta Transactions (j - j-1) {{ preview.deltaReste|number_format(3, '.', ' ') }} DT
Opérations de la période (du {{ preview.startPeriode|date('d/m/Y') }} au {{ dateJ|date('d/m/Y') }}) ({{ preview.detail_operations|length }} opérations) - {{ preview.operationsJ|number_format(3, '.', ' ') }} DT
Résultat
Solde Final Cash j {{ preview.soldeFinalCash|number_format(3, '.', ' ') }} DT
{# ─── Détails collapsibles ──────────────────────────────────── #} {# Alimentations #}
Détail des Alimentations du {{ dateJ|date('d/m/Y') }} {% if preview.detail_alimentations is empty %} {% else %} {% for a in preview.detail_alimentations %} {% endfor %} {% endif %}
N°SociétéMontantDate
Aucune alimentation ce jour
{{ a.numero ?? '-' }} {{ a.societe }} {{ a.montant|number_format(3, '.', ' ') }} DT {{ a.date|date('d/m/Y H:i') }}
{# Opérations #}
Détail des Opérations du {{ dateJ|date('d/m/Y') }} {% if preview.detail_operations is empty %} {% else %} {% for o in preview.detail_operations %} {% endfor %} {% endif %}
N°TypeDescriptionMontantDate
Aucune opération ce jour
{{ o.numero ?? '-' }} {{ o.type }} {{ o.desc ?? '-' }} {{ o.montant|number_format(3, '.', ' ') }} DT {{ o.date|date('d/m/Y H:i') }}
{# Transactions en cours #}
Transactions en cours (non soldées) au {{ dateJ|date('d/m/Y') }} {% if preview.detail_transactions is empty %} {% else %} {% for t in preview.detail_transactions %} {% endfor %} {% endif %}
N°TypeMontant restantDate création
Aucune transaction en cours
{{ t.numero ?? '-' }} {{ t.type }} {{ t.montantRest|number_format(3, '.', ' ') }} DT {{ t.date|date('d/m/Y H:i') }}
{# ─── Boutons action ─────────────────────────────────────────── #}
Retour
Historique
{% endblock %} {% block scripts %} {% set confirmDate = dateJ|date('d/m/Y') %} {% set confirmSolde = preview.soldeFinalCash|number_format(3, '.', ' ') %} {% endblock %}