copanier/copanier/templates/delivery.html
Yohan Boniface abc5fd019d Wording
2019-04-07 08:56:27 +02:00

83 lines
3.3 KiB
HTML

{% extends "base.html" %}
{% block body %}
<h3>{{ delivery.producer }} {% if delivery.is_open %}<a class="button" href="/livraison/{{ delivery.id }}/commander">Gérer ma commande</a>{% endif %}</h3>
{% include "includes/delivery_head.html" %}
<article class="delivery">
<table class="delivery">
<tbody>
<tr>
<th class="ref">Référence</th>
<th class="product">Produit</th>
<th class="price">Prix</th>
<th class="amount">Total</th>
{% for email, order in delivery.orders.items() %}
<th class="person{% if delivery.is_passed and not order.paid %} not-paid{% endif %}">
{% if request.user and request.user.is_staff %}
<a href="/livraison/{{ delivery.id }}/commander?email={{ email }}" title="{{ email }}">{{ email }}</a>
{% else %}
<span title="{{ email }}">{{ email }}</span>
{% endif %}
</th>
{% endfor %}
</tr>
{% for product in delivery.products %}
<tr>
<td class="ref">{{ product.ref }}</td>
<th class="product">{{ product.label }}</th>
<td>{{ product.price }} €</td>
<th>{{ delivery.product_wanted(product) }}</th>
{% for email, order in delivery.orders.items() %}
{% if product.ref in order.products %}
<td>{{ order.products[product.ref].wanted }}</td>
{% else %}
<td></td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
<tr><th class="total"><i class="icon-pricetags"></i> Total</th><td></td><td></td>
<td class="total">{{ delivery.total }} €</td>
{% for email, order in delivery.orders.items() %}
<td>{{ order.total(delivery.products) }} €</td>
{% endfor %}
</tr>
</tbody>
</table>
</article>
<hr>
<ul class="toolbox">
<li>
<a href="/livraison/{{ delivery.id }}/rapport.xlsx"><i class="icon-magnifying-glass"></i> Rapport résumé</a>
</li>
<li>
<a href="/livraison/{{ delivery.id }}/rapport-complet.xlsx"><i class="icon-grid"></i> Rapport complet</a>
</li>
<li>
<a href="/livraison/{{ delivery.id }}/émargement" target="_blank"><i class="icon-document"></i> Liste d'émargement</a>
</li>
{% if request.user and request.user.is_staff %}
<li>
<a href="/livraison/{{ delivery.id }}/exporter/produits"><i class="icon-layers"></i> Télécharger les produits</a>
</li>
<li>
<a href="/livraison/{{ delivery.id }}/edit"><i class="icon-adjustments"></i> Modifier la livraison</a>
</li>
<li>
{% with unique_id="import-command" %}
{% include "includes/modal_import_command.html" %}
{% endwith %}
</li>
<li>
{% with unique_id="add-command" %}
{% include "includes/modal_add_command.html" %}
{% endwith %}
</li>
<li>
{% with unique_id="copy-emails" %}
{% include "includes/modal_copy_emails.html" %}
{% endwith %}
</li>
{% endif %}
</ul>
{% endblock body %}