{# Fragment template loaded via AJAX in the to-pay invoices split layout #} {% for type, messages in app.flashes %} {% for message in messages %}
{{ message }}
{% endfor %} {% endfor %} {# Overdue banner #} {% if facture.isOverdue %}
Facture en retard ! Echeance depassee de {{ facture.daysUntilDue|abs }} jour{{ facture.daysUntilDue|abs > 1 ? 's' : '' }}.
{% elseif facture.daysUntilDue is not null and facture.daysUntilDue <= 3 and facture.daysUntilDue >= 0 %}
Echeance proche ! {{ facture.daysUntilDue }} jour{{ facture.daysUntilDue > 1 ? 's' : '' }} restant{{ facture.daysUntilDue > 1 ? 's' : '' }}.
{% endif %}

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

{% include 'components/_status_badge.html.twig' with { label: facture.statut.label, variant: facture.statut.color, size: 'sm' } only %}
{{ facture.fournisseur ? facture.fournisseur.nom : (facture.fournisseurNom ?? 'Fournisseur inconnu') }} {% if facture.dateEmission %} — Emission {{ facture.dateEmission|date('d/m/Y') }}{% endif %}
{# Stats row #}
{{ facture.montantTtc ? facture.montantTtc|number_format(2, ',', ' ') ~ ' €' : '—' }} TTC
{{ facture.dateEcheance ? facture.dateEcheance|date('d/m/Y') : '—' }} Echeance
{{ facture.accepteeLe ? facture.accepteeLe|date('d/m/Y') : '—' }} Acceptee
{{ facture.lignes|length }} Lignes
{# 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, ',', ' ') }} €
Total TTC {{ facture.montantTtc ? facture.montantTtc|number_format(2, ',', ' ') ~ ' €' : '—' }}
{% else %}
Aucune ligne
{% endif %}
{# Actions #} {% if can_payer or can_contester %}
{% if can_payer %} {% endif %} {% if can_contester %} {% endif %}
{% if can_payer %}
{% endif %} {% if can_contester %}
{% endif %} {% endif %}
Vue complete