{% set currentWeek = '' %} {% if commandes is not empty %} {% for element in commandes.demande.toArray %} {% set elementWeek = element.createdAt|date('W') %} {% if elementWeek != currentWeek %} {% set currentWeek = elementWeek %} {% endif %} {% endfor %} {% else %}

Aucune commande trouvée.

{% endif %}
Commande n° Produit Catégorie Quantite Date
Semaine {{ elementWeek }}
{{ commandes.id }} {{ element.produit.produit }} {{ element.produit.tag }} {{ element.user.name }} souhaite {{ element.quantite }} {{ element.createdAt|date('d-m-Y H:i:s') }}