From 158b19778b19daeba35413027ba30b518d1110a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Sat, 7 Apr 2018 14:20:41 +0200 Subject: [PATCH] also sort the unsold table --- kfet/templates/kfet/article.html | 61 +++++++++++++++++++------------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/kfet/templates/kfet/article.html b/kfet/templates/kfet/article.html index 002abadd..b1f173c6 100644 --- a/kfet/templates/kfet/article.html +++ b/kfet/templates/kfet/article.html @@ -79,38 +79,49 @@

Articles non vendus

Article{{ not_sold_articles|length|pluralize }} non vendu{{ nots_sold_article|length|pluralize }}

- +
- - - + + + - - {% for article in not_sold_articles %} - {% ifchanged article.category %} - - - - {% endifchanged %} - - - - - - - - - {% endfor %} - + {% regroup not_sold_articles by category as not_sold_category_list %} + + {% for category in not_sold_category_list %} + + + + + + + {% for article in category.list %} + + + + + + + {% with last_inventory=article.inventory.0 %} + + {% endwith %} + + {% endfor %} + + {% endfor %}
Nom Prix StockEn venteAffichéDernier inventaireEn venteAffichéDernier inventaire
{{ article.category.name }}
- - {{ article.name }} - - {{ article.price }}€{{ article.stock }}{{ article.is_sold | yesno:"En vente,Non vendu"}}{{ article.hidden | yesno:"Caché,Affiché" }}{{ article.inventory.0.at }}
{{ category.grouper }}
+ + {{ article.name }} + + {{ article.price }}€{{ article.stock }}{{ article.is_sold | yesno:"En vente,Non vendu"}}{{ article.hidden | yesno:"Caché,Affiché" }} + {{ last_inventory.at|date:'d/m/Y H:i' }} +