{# Partial template for extracted BL data #} {# BL Info #}
N° BL: {{ bonLivraison.numeroBl|default('—') }}
N° Commande: {{ bonLivraison.numeroCommande|default('—') }}
Date livraison: {{ bonLivraison.dateLivraison ? bonLivraison.dateLivraison|date('d/m/Y') : '—' }}
Total HT: {{ bonLivraison.totalHt ? bonLivraison.totalHt|number_format(2, ',', ' ') ~ ' €' : '—' }}
{# Warnings from extraction #} {% if bonLivraison.donneesBrutes.remarques is defined and bonLivraison.donneesBrutes.remarques|length > 0 %}
Remarques de l'extraction
{% endif %} {# Lines table #}
{% for ligne in bonLivraison.lignes %} {% set hasAlertes = ligne.alertes|length > 0 %} {% set isMatched = ligne.produitFournisseur is not null %} {# Alerts row (hidden by default) #} {% if hasAlertes %} {% endif %} {% else %} {% endfor %}
Code Désignation Orig. Qté livrée Qté fact. PU MJ Total HT TVA Statut
{{ ligne.numeroLigneBl }} {{ ligne.codeProduitBl|e }}
{% if isMatched %} {% else %} {% endif %} {{ ligne.designationBl|e }}
{{ ligne.origine }} {% if ligne.quantiteLivree %} {{ ligne.quantiteLivree|number_format(3, ',', ' ') }} {{ ligne.uniteLivraison }} {% else %} {% endif %} {% if ligne.quantiteFacturee %} {{ ligne.quantiteFacturee|number_format(3, ',', ' ') }} {{ ligne.uniteFacturation }} {% else %} {% endif %} {{ ligne.prixUnitaire|number_format(4, ',', ' ') }} €/{{ ligne.uniteFacturation|default(ligne.unite.code) }} {% if ligne.majorationDecote and ligne.majorationDecote != '0' and ligne.majorationDecote != '0.0000' %} {% set mjFloat = ligne.majorationDecote|number_format(2, ',', ' ') %} {{ mjFloat }} € {% else %} {% endif %} {{ ligne.totalLigne|number_format(2, ',', ' ') }} € {{ ligne.codeTva }} {% if ligne.statutControle.value == 'OK' %} {% elseif ligne.statutControle.value == 'NON_CONTROLE' %} {% else %} {% endif %}
{% for alerte in ligne.alertes %}
{{ alerte.typeAlerte.label }} {{ alerte.message|e }}
{% endfor %}

Aucune ligne extraite

{# Summary #}
{{ bonLivraison.lignes|length }} ligne(s) {% set alertCount = 0 %} {% for ligne in bonLivraison.lignes %} {% set alertCount = alertCount + ligne.alertes|length %} {% endfor %} {% if alertCount > 0 %} — {{ alertCount }} alerte(s) {% endif %}
Total HT: {{ bonLivraison.totalHt ? bonLivraison.totalHt|number_format(2, ',', ' ') ~ ' €' : '—' }}