{% extends 'layouts/authenticated.html.twig' %} {% block page_title %}Commande {{ po.orderNumber }}{% endblock %} {% block content %}
{# Header #}

{{ po.orderNumber }}

{{ po.statusLabel }} {% if po.supplier %}— {{ po.supplier.name }}{% endif %}

{% if po.canEdit %} Modifier {% endif %} {% if po.isDraft %}
{% endif %} {% if po.isSent %}
{% endif %} {% if po.canReceive %} Réceptionner {% endif %} {% if po.canCancel %} {% endif %} Retour
{# Left: Order info #}

Informations

Fournisseur
{% if po.supplier %} {{ po.supplier.name }} {% else %} Supprimé {% endif %}
Statut
{{ po.statusLabel }}
Créée le
{{ po.createdAt|date('d/m/Y H:i') }}
Créée par
{{ po.createdBy.fullName|default('?') }}
{% if po.expectedDeliveryAt %}
Livraison prévue
{{ po.expectedDeliveryAt|date('d/m/Y') }}
{% endif %} {% if po.receivedAt %}
Reçue le
{{ po.receivedAt|date('d/m/Y H:i') }}
{% endif %} {% if po.isCancelled %}
Annulée le
{{ po.cancelledAt|date('d/m/Y H:i') }}
Par
{{ po.cancelledBy.fullName|default('?') }}
Motif
{{ po.cancelReason }}
{% endif %} {% if po.notes %}
Notes
{{ po.notes|nl2br }}
{% endif %}
{# Financial summary #}

Résumé financier

Sous-total HT
{{ po.subtotal|number_format(0, ',', ' ') }} {{ settings.currencySymbol }}
TVA ({{ po.taxRate }}%)
{{ po.taxAmount|number_format(0, ',', ' ') }} {{ settings.currencySymbol }}
Total TTC
{{ po.total|number_format(0, ',', ' ') }} {{ settings.currencySymbol }}
{% if po.receivedTotal != '0.00' %}
Valeur reçue
{{ po.receivedTotal|number_format(0, ',', ' ') }} {{ settings.currencySymbol }}
{% endif %}
Articles
{{ po.receivedItemsCount }}/{{ po.itemsCount }} reçus
{# Right: Lines table #}

Lignes de commande

{% for line in lines %} {% endfor %}
Produit Réf. fournisseur PU Commandé Reçu Restant Total Statut
{{ line.productName }}
{{ line.productSku }}
{{ line.supplierReference ?? '-' }} {{ line.unitPrice|number_format(0, ',', ' ') }} {{ settings.currencySymbol }} {{ line.quantity }} {{ line.receivedQuantity }} {{ line.remainingQuantity }} {{ line.total|number_format(0, ',', ' ') }} {{ settings.currencySymbol }} {% if line.fullyReceived %} Complet {% elseif line.partiallyReceived %} Partiel {% else %} En attente {% endif %}
{# Cancel Modal #} {% if po.canCancel %} {% endif %} {% endblock %}