{# Fragment template loaded via AJAX in the received invoices split layout #} {% for type, messages in app.flashes %} {% for message in messages %}
{{ message }}
{% endfor %} {% endfor %}

{{ facture.numeroFacture ?? facture.fichierOriginalNom ?? 'Facture en cours' }}

{% include 'components/_status_badge.html.twig' with { label: facture.statut.label, variant: facture.statut.color, size: 'sm' } only %} {% include 'components/_status_badge.html.twig' with { label: facture.source.label, variant: facture.source.color, size: 'sm' } only %}
{{ facture.fournisseur ? facture.fournisseur.nom : (facture.fournisseurNom ?? 'Fournisseur inconnu') }} {% if facture.dateEmission %} — {{ facture.dateEmission|date('d/m/Y') }}{% endif %}
{# Stats row #}
{{ facture.montantHt ? facture.montantHt|number_format(2, ',', ' ') ~ ' €' : '—' }} HT
{{ facture.montantTva ? facture.montantTva|number_format(2, ',', ' ') ~ ' €' : '—' }} TVA
{{ facture.montantTtc ? facture.montantTtc|number_format(2, ',', ' ') ~ ' €' : '—' }} TTC
{{ facture.lignes|length }} Lignes
{# Rapprochement BL #} {% if facture.bonLivraison %}
BL {{ facture.bonLivraison.numeroBl ?? '#' ~ facture.bonLivraison.id }} {% if facture.scoreRapprochement %} — Score {{ facture.scoreRapprochement }}%{% endif %} {% if facture.ecartMontantHt and facture.ecartMontantHt != '0.00' %} — Ecart {{ facture.ecartMontantHt|number_format(2, ',', ' ') }} €{% endif %}
{% endif %} {# Lines table #}
Lignes ({{ facture.lignes|length }})
{% if facture.lignes is not empty %}
{% for ligne in facture.lignes %} {% endfor %}
Code Designation Qte PU TVA Total
{{ ligne.codeArticle ?? '—' }} {{ ligne.designation }} {{ ligne.quantite }} {{ ligne.prixUnitaire|number_format(4, ',', ' ') }} {{ ligne.tauxTva ? ligne.tauxTva ~ '%' : '—' }} {{ ligne.montantLigne|number_format(2, ',', ' ') }} €
Total HT {{ facture.montantHt ? facture.montantHt|number_format(2, ',', ' ') ~ ' €' : '—' }}
{% else %}
Aucune ligne
{% endif %}
{# Document link #} {% if facture.documentOriginalPath %}
{{ facture.fichierOriginalNom ?? 'Voir le document' }}
{% endif %} {# Actions #} {% if can_accepter or can_refuser %}
{% if can_accepter %}
{% endif %} {% if can_refuser %} {% endif %}
{% if can_refuser %}
{% endif %} {% endif %}
Vue complete