{% extends "base.html" %}
{% block body %}
{{ delivery.name }} {% include "includes/order_button.html" %}
{% include "includes/delivery_head.html" %}
{% if delivery.has_multiple_producers %}
Producteur |
{% endif %}
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 %}
{% for product in delivery.products %}
{% if delivery.has_multiple_producers and (loop.first or loop.previtem.producer != product.producer) %}
{{ product.producer }} |
{% endif %}
{{ 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 %}
{% if delivery.has_multiple_producers and (loop.last or loop.nextitem.producer != product.producer) %}
— |
Sous Total {{ product.producer }} |
— |
{% if delivery.has_packing %}
|
{% endif %}
{{ delivery.total_for_producer(product.producer) }} € |
{% for email in delivery.orders.keys() %}
{{ delivery.total_for_producer(product.producer, email) }} € |
{% endfor %}
{% endif %}
{% endfor %}
Total | — |
{% if delivery.has_multiple_producers %}
— |
{% endif %}
{% if delivery.has_packing %}
— |
{% endif %}
{{ delivery.total }} € |
{% for email, order in delivery.orders.items() %}
{{ order.total(delivery.products) }} € |
{% endfor %}
{% endblock body %}