Aucun produit n'est encore défini pour cette livraison.
{% if request.user and request.user.is_staff %} diff --git a/copanier/templates/includes/delivery_table.html b/copanier/templates/includes/delivery_table.html new file mode 100644 index 0000000..547b43e --- /dev/null +++ b/copanier/templates/includes/delivery_table.html @@ -0,0 +1,54 @@ +{% for producer in delivery.producers %} +{{ producer }}
+Produit | +Prix | + {% if delivery.has_packing %} +Conditionnement | + {% endif %} +Total | + {% for email, order in delivery.orders.items() %} ++ {% if request.user and request.user.is_staff %} + {{ email }} + {% else %} + {{ email }} + {% endif %} + | + {% endfor %} +
---|---|---|---|---|
{{ product }} | +{{ product.price | round(2) }} € | + {% if delivery.has_packing %} +{{ product.packing or '—'}} | + {% 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() %} +{{ order[product.ref].quantity or "—" }} | + {% endfor %} +
Total | — | + {% if delivery.has_packing %} +— | + {% endif %} +{{ delivery.total_for_producer(producer) }} € | + {% for email, order in delivery.orders.items() %} +{{ order.total(delivery.get_products_by(producer)) }} € | + {% endfor %} +