{% set lignes = field.value %} {% if lignes is empty %}

Aucune ligne pour ce bon de livraison.

{% else %}
{% set totalGeneral = '0' %} {% for ligne in lignes %} {% set hasAlerte = ligne.alertes|length > 0 %} {% set totalGeneral = totalGeneral + ligne.totalLigne %} {% endfor %}
# N° ligne Produit Orig. Qte livrée Qte facturée Unité PU MJ/Décote Total TVA Statut Alertes
{{ ligne.ordre }} {{ ligne.numeroLigneBl }} {% if ligne.codeProduitBl %}{{ ligne.codeProduitBl }} {% endif %} {{ ligne.designationBl }} {{ ligne.origine }} {% if ligne.quantiteLivree is not null %} {{ ligne.quantiteLivree|number_format(3, ',', ' ') }} {% if ligne.uniteLivraison %}{{ ligne.uniteLivraison }}{% endif %} {% else %} - {% endif %} {% if ligne.quantiteFacturee is not null %} {{ ligne.quantiteFacturee|number_format(3, ',', ' ') }} {% if ligne.uniteFacturation %}{{ ligne.uniteFacturation }}{% endif %} {% else %} - {% endif %} {{ ligne.unite }} {{ ligne.prixUnitaire|number_format(4, ',', ' ') }} € {% if ligne.majorationDecote and ligne.majorationDecote != '0' and ligne.majorationDecote != '0.0000' %} {{ ligne.majorationDecote|number_format(2, ',', ' ') }} € {% else %} - {% endif %} {{ ligne.totalLigne|number_format(2, ',', ' ') }} € {{ ligne.codeTva }} {% set statutColor = ligne.statutControle.color() %} {{ ligne.statutControle.label() }} {% if hasAlerte %} {% for alerte in ligne.alertes %} {{ alerte.statut.label() }} {% endfor %} {% else %} - {% endif %}
Total {{ totalGeneral|number_format(2, ',', ' ') }} €
{% endif %}