gestioCOF/kfet/templates/kfet/order_read.html
Aurélien Delobelle 3c5f8c49aa Détails commande
- Ajout du détails d'une commande sur sa page
- Réorganisation de la vue `order.read`
- Optimisation queries DB avec select_related sur `OrderList`
2016-08-30 17:07:51 +02:00

67 lines
2 KiB
HTML

{% extends 'kfet/base.html' %}
{% block title %}Commande #{{ order.pk }}{% endblock %}
{% block content-header-title %}Commande #{{ order.pk }}{% endblock %}
{% block content %}
<div class="row">
<div class="col-sm-4 col-md-3 col-content-left">
<div class="content-left">
<div class="content-left-top">
<div class="line"><b>Créée le:</b> {{ order.at }}</div>
<div class="line"><b>Fournisseur:</b> {{ order.supplier.name }}</div>
</div>
</div>
</div>
<div class="col-sm-8 col-md-9 col-content-right">
{% include 'kfet/base_messages.html' %}
<div class="content-right">
<div class="content-right-block">
<h2>Détails</h2>
<div>
<table class="table">
<thead>
<tr>
<td>Article</td>
<td>Commandé</td>
<td>Commandé (#box)</td>
<td>Reçu</td>
</tr>
</thead>
<tbody>
{% for orderart in orderarts %}
{% ifchanged orderart.article.category %}
<tr>
<td colspan="4">{{ orderart.article.category.name }}</td>
</tr>
{% endifchanged %}
<tr>
<td>{{ orderart.article.name }}</td>
<td>{{ orderart.quantity_ordered }}</td>
<td>
{% if orderart.article.box_capacity %}
{# c'est une division ! #}
{% widthratio orderart.quantity_ordered orderart.article.box_capacity 1 %}
{% endif %}
</td>
<td>
{{ orderart.quantity_received|default_if_none:'' }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="content-right-block">
<h2>Mail</h2>
<div>
<textarea>{{ mail }}</textarea>
</div>
</div>
</div>
</div>
</div>
{% endblock %}