{# Fragment template loaded via AJAX in the archive split layout — read-only #}

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

{% 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
{# Archive-specific info #}
{% if facture.payeeLe %}
Payee le {{ facture.payeeLe|date('d/m/Y H:i') }}
{% endif %} {% if facture.referencePaiement %}
Ref. paiement {{ facture.referencePaiement }}
{% endif %} {% if facture.motifRefus %}
Motif refus {{ facture.motifRefus }}
{% endif %} {% if facture.contesteeLe %}
Contestee le {{ facture.contesteeLe|date('d/m/Y H:i') }}
{% endif %} {% if facture.validatedBy %}
Traitee par {{ facture.validatedBy.email }}
{% endif %} {% if facture.internalReference %}
Ref. interne {{ facture.internalReference }}
{% endif %}
{# Lines table #}
Lignes ({{ facture.lignes|length }})
{% if facture.lignes is not empty %}
{% for ligne in facture.lignes %} {% endfor %}
Designation Qte PU Total
{{ ligne.designation }} {{ ligne.quantite }} {{ ligne.prixUnitaire|number_format(4, ',', ' ') }} {{ ligne.montantLigne|number_format(2, ',', ' ') }} €
{% else %}
Aucune ligne
{% endif %}
{# Transition timeline #} {% if transitions is not empty %}
Historique
{% for transition in transitions %}
{{ transition.fromStatut.label }} {{ transition.toStatut.label }}
{{ transition.user.email }} — {{ transition.createdAt|date('d/m/Y H:i') }}
{% if transition.motif %}
{{ transition.motif }}
{% endif %}
{% endfor %}
{% endif %} {# Document link #} {% if facture.documentOriginalPath %}
{{ facture.fichierOriginalNom ?? 'Voir le document' }}
{% endif %}
Vue complete