{% extends 'gestion/_base.html.twig' %} {% set active = 'commandes' %} {% block title %}Commande {{ commande.reference|slice(0, 12) }}{% endblock %} {% block content %}
Commande

{{ commande.reference }}

Passée le {{ commande.createdAt|date('d/m/Y à H:i') }} {% if commande.updatedAt %} · mise à jour {{ commande.updatedAt|date('d/m/Y H:i') }}{% endif %}

{% include 'gestion/commandes/_status_badge.html.twig' with { status: commande.status } only %} Facture PDF ← Retour
{# ===== Colonne gauche : articles + note ===== #}

Articles

{# Trois colonnes seulement : le tableau tient sans plancher de largeur, donc sans défilement horizontal sur téléphone. #}
{% for ligne in commande.productCommandes %} {# Options payantes : le texte à graver est ce qui part à l'atelier, il doit sauter aux yeux ici. #} {% for option in ligne.options %} {% endfor %} {% endfor %}
ArticlePrix
{% if ligne.product %} {% else %} {% endif %} {{ ligne.product ? ligne.product.libelle : 'Produit supprimé' }} {{ ligne.price|number_format(2, ',', ' ') }} €
↳ {{ option.label }} : {{ option.valeur }} {{ option.prix|number_format(2, ',', ' ') }} €
Livraison — {{ commande.livraison.libelle }} {{ commande.prixLivraison|number_format(2, ',', ' ') }} €
Total {{ commande.total|number_format(2, ',', ' ') }} €

Note interne

Suivi du colis

Suivi automatique La Poste : statut, timeline et notifications se mettront à jour tout seuls.

{% if commande.carrier and commande.carrier.value == 'laposte' and commande.numSuiviColis %} {% endif %}
Timeline {% if commande.trackingLastCheckedAt %}Vérifié le {{ commande.trackingLastCheckedAt|date('d/m/Y H:i') }}{% endif %}
    {% if commande.trackingEvents %} {% for event in commande.trackingEvents|reverse %}
  • {{ event.label }}
    {{ event.date|date('d/m/Y H:i') }} · {{ event.code }}
  • {% endfor %} {% endif %}
{# ===== Colonne droite : client, adresse, paiement, statut ===== #}

Client

{{ commande.client.prenom }} {{ commande.client.nom }}

{% if clientEmail %}

{{ clientEmail }}

{% else %}

Aucun email

{% endif %}

Client depuis {{ commande.client.dhCreation|date('m/Y') }}

Adresse de livraison

{{ commande.adresse.prenom }} {{ commande.adresse.nom }}
{{ commande.adresse.libAdr }}
{{ commande.adresse.cp }} {{ commande.adresse.ville }} {% if commande.adresse.infoSupp %}
{{ commande.adresse.infoSupp }}{% endif %}

{{ commande.adresse.numTel }}

Paiement

{% if commande.payment %}

{{ commande.payment.status.value }}

PayPal · {{ commande.payment.amount|number_format(2, ',', ' ') }} {{ commande.payment.currency }}
Payeur : {{ commande.payment.payerEmail }}
Capture : {{ commande.payment.captureId }}

{% else %}

Aucun paiement enregistré.

{% endif %}

Changer le statut

{% endblock %} {% block scripts %} {% endblock %}