{% extends "base.html" %} {% block body %}

{{ delivery.name }} {% include "includes/order_button.html" %}

{% include "includes/delivery_head.html" %}
{% if delivery.has_multiple_producers %} {% endif %} {% if delivery.has_packing %} {% endif %} {% for email, order in delivery.orders.items() %} {% endfor %} {% for product in delivery.products %} {% if delivery.has_multiple_producers and (loop.first or loop.previtem.producer != product.producer) %} {% endif %} {% if delivery.has_packing %} {% endif %} {{ delivery.product_wanted(product) }} {% if delivery.status == delivery.ADJUSTMENT and delivery.product_missing(product) %} (−{{ delivery.product_missing(product) }}) {% if request.user.is_staff %}ajuster{% endif %} {% endif %} {% for email, order in delivery.orders.items() %} {% endfor %} {% if delivery.has_multiple_producers and (loop.last or loop.nextitem.producer != product.producer) %} {% if delivery.has_packing %} {% endif %} {% for email in delivery.orders.keys() %} {% endfor %} {% endif %} {% endfor %} {% if delivery.has_multiple_producers %} {% endif %} {% if delivery.has_packing %} {% endif %} {% for email, order in delivery.orders.items() %} {% endfor %}
ProducteurProduit PrixConditionnementTotal {% if request.user and request.user.is_staff %} {{ email }} {% else %} {{ email }} {% endif %}
{{ product.producer }}{{ product }} {{ product.price | round(2) }} €{{ product.packing or '—'}}{{ order[product.ref].quantity or "—" }}
Sous Total {{ product.producer }} {{ delivery.total_for_producer(product.producer) }} €{{ delivery.total_for_producer(product.producer, email) }} €
Total{{ delivery.total }} €{{ order.total(delivery.products) }} €

{% endblock body %}