{# ======================== EN-TÊTE COLORÉ ======================== #} {# ======================== BLOCS ADRESSES ======================== #}
Service Restauration {{ generales.nom_etablissement ?? config.nom_etablissement }}
{% if generales.adresse ?? '' %} {{ generales.adresse }}
{% endif %} {% if generales.nom_commune ?? '' %} {{ generales.nom_commune }}
{% endif %} {% if generales.telephone ?? '' %} Tél : {{ generales.telephone }}
{% endif %} {% if generales.email ?? '' %} {{ generales.email }}
{% endif %} {% if (generales.prenom_responsable ?? '') or (generales.nom_responsable ?? '') %} Responsable : {{ generales.prenom_responsable ?? '' }} {{ generales.nom_responsable ?? '' }} {% elseif config.nom_expediteur %} Responsable : {{ config.nom_expediteur }} {% endif %}
Fournisseur : {{ fournisseur.nom ?? commande.fournisseur }}
{% if fournisseur.contact_principal %}Contact : {{ fournisseur.contact_principal }}
{% endif %} {% if fournisseur.adresse %}{{ fournisseur.adresse }}
{% endif %} {% if fournisseur.code_postal or fournisseur.ville %} {{ fournisseur.code_postal ?? '' }} {{ fournisseur.ville ?? '' }}
{% endif %} {% if fournisseur.telephone %}Tél : {{ fournisseur.telephone }}
{% endif %} {% if fournisseur.notes ?? '' %}{{ fournisseur.notes }}{% endif %}
{# ======================== TABLE INFOS ======================== #} {% if commande.notes %} {% endif %}
Date de commande : {{ commande.date_commande|date('d/m/Y') }}
Livraison souhaitée : {% if commande.date_livraison_souhaitee %}{{ commande.date_livraison_souhaitee|date('d/m/Y') }}{% else %}—{% endif %}
Notes : {{ commande.notes }}
{# ======================== TABLEAU PRODUITS ======================== #}

Produits commandés

{% set totalHT = 0 %} {% set totalTTC = 0 %} {% for ligne in lignes %} {% set qte = ligne.quantite ?? 0 %} {% set tva = ligne.taux_tva ?? 0 %} {% if ligne.is_ttc == 1 %} {% set prixTTC = ligne.prix_ttc ?? ligne.prix_ht ?? 0 %} {% set prixHT = tva > 0 ? prixTTC / (1 + tva / 100) : prixTTC %} {% else %} {% set prixHT = ligne.prix_ht ?? 0 %} {% set prixTTC = prixHT * (1 + tva / 100) %} {% endif %} {% set ligneHT = prixHT * qte %} {% set ligneTTC = prixTTC * qte %} {% set totalHT = totalHT + ligneHT %} {% set totalTTC = totalTTC + ligneTTC %} {% endfor %} {% set totalTVA = totalTTC - totalHT %}
Référence Produit Origine Qté Unité PU HT PU TTC TVA Total TTC
{{ ligne.reference_fournisseur ?? '' }} {{ ligne.produit }} {% if ligne.label %} {{ ligne.label }}{% endif %} {{ ligne.origine ?? '' }} {{ qte|number_format(3, ',', ' ') }} {{ ligne.unite ?? '' }} {{ prixHT > 0 ? prixHT|number_format(3, ',', ' ') ~ ' €' : '—' }} {{ prixTTC > 0 ? prixTTC|number_format(3, ',', ' ') ~ ' €' : '—' }} {{ tva }}% {{ ligneTTC > 0 ? ligneTTC|number_format(3, ',', ' ') ~ ' €' : '—' }}
TOTAL HT : {{ totalHT|number_format(3, ',', ' ') }} €
TOTAL TVA : {{ totalTVA|number_format(3, ',', ' ') }} €
TOTAL TTC : {{ totalTTC|number_format(3, ',', ' ') }} €
{# ======================== FOOTER + SIGNATURES ======================== #} {% if config.signature_email %} {% endif %}

Date et signature de {{ config.nom_etablissement }} :

Date et signature du Fournisseur :