mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 04:19:25 +00:00
Update stock items quantity after shopping
This commit is contained in:
@ -10,6 +10,14 @@ Shopping list for {{ stock }}
|
||||
{% endif %}
|
||||
<h3>{% trans s=stock %}Shopping lists history for {{ s }}{% endtrans %}</h3>
|
||||
|
||||
<p>
|
||||
{% trans %}Information :{% endtrans %}
|
||||
<br>
|
||||
{% trans %}Use the "update stock" action when you get back from shopping to add the effective quantity bought for each shopping list item.{% endtrans %}
|
||||
<br>
|
||||
{% trans %}For example, 3 Cheesburger (boxes) are aksing in the list, but there were only 2 so, 2 have to be added in the stock quantity.{% endtrans %}
|
||||
</p>
|
||||
|
||||
<h4>{% trans %}To do{% endtrans %}</h4>
|
||||
<table>
|
||||
<thead>
|
||||
@ -25,6 +33,9 @@ Shopping list for {{ stock }}
|
||||
<td>{{ s.date|localtime|date("Y-m-d H:i") }}</td>
|
||||
<td><a href="{{ url('stock:shoppinglist_items', stock_id=stock.id, shoppinglist_id=s.id)}}">{{ s.name }}</a></td>
|
||||
<td>{{ s.items_to_buy.count() }}</td>
|
||||
<td>
|
||||
<a href="{{ url('stock:update_after_shopping', stock_id=stock.id, shoppinglist_id=s.id)}}">{% trans %}Update stock{% endtrans %}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url('stock:shoppinglist_set_done', stock_id=stock.id, shoppinglist_id=s.id)}}">{% trans %}Mark as done{% endtrans %}</a>
|
||||
</td>
|
||||
|
16
stock/templates/stock/update_after_shopping.jinja
Normal file
16
stock/templates/stock/update_after_shopping.jinja
Normal file
@ -0,0 +1,16 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans s = shoppinglist %}Update {{ s }}'s quantity after shopping{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h3>{% trans s = shoppinglist %}Update {{ s }}'s quantity after shopping{% endtrans %}</h3>
|
||||
<div>
|
||||
<form method="post" action="" class="inline" style="display:inline">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p() }}
|
||||
<p><input type="submit" value="{% trans %}Update stock quantities{% endtrans %}" /></p>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user