{% extends '@!EasyAdmin/crud/detail.html.twig' %} {% import 'admin/order/_icons.html.twig' as icons %} {% block main %} {% set order = entity.instance %} {% set statusColors = { 'bat1': 'dark', 'bat2': 'dark', 'bat3': 'dark', 'bat4': 'dark', 'new_order': 'primary', 'pending': 'warning', 'manufacturing': 'info', 'pending_delivery': 'secondary', 'delivered': 'success', 'cancelled': 'danger' } %} {% set statusColor = statusColors[order.status.value] ?? 'secondary' %} {% set statusStyle = { 'NEW': { color: '#3b82f6', icon: 'new' }, 'PENDING_TEXT': { color: '#58d19c', icon: 'text' }, 'PENDING_CREATION': { color: '#6c757d', icon: 'clock' }, 'BAT1': { color: '#f59e0b', icon: 'doc' }, 'BAT2': { color: '#f59e0b', icon: 'doc' }, 'BAT3': { color: '#f59e0b', icon: 'doc' }, 'BAT4': { color: '#f59e0b', icon: 'doc' }, 'BAT5': { color: '#f59e0b', icon: 'doc' }, 'PENDING_CORRECTIONS': { color: '#6c757d', icon: 'eye' }, 'VALIDATED': { color: '#00b129', icon: 'doc' }, 'PENDING': { color: '#6c757d', icon: 'clock' }, 'MANUFACTURING': { color: '#6c757d', icon: 'gear' }, 'PENDING_DELIVERY': { color: '#8b5cf6', icon: 'truck' }, 'DELIVERED': { color: '#00b129', icon: 'check' }, 'CANCELLED': { color: '#b3261e', icon: 'x' }, } %} {% set current = statusStyle[order.status.name] ?? { color: '#6c757d', icon: 'gear' } %}
STATUT ACTUEL
{{ icons.icon(current.icon) }} {{ order.status.label }}{{ order.customer.commercial }}
{{ order.customer.commercial.email }}
{{ order.internalNotes|nl2br }}
Aucun historique.
{% else %}Aucune ligne de commande.
{% else %}| Produit | SKU | Qté | Prix unitaire | Prix total |
|---|---|---|---|---|
| {{ line.product.description }} | {{ line.product.sku }} | {{ line.quantity }} | {{ line.product.price }} | {{ line.totalPrice|number_format(2, ',', ' ') }} € |
| Total HT | {{ order.orderLines|reduce((carry, l) => carry + l.totalPrice, 0)|number_format(2, ',', ' ') }} € | |||