2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 11:10:54 +00:00

Display expiry status on StockItem page

- Also adds ability to filter Stock table by expired status
This commit is contained in:
Oliver Walters
2021-01-04 00:21:47 +11:00
parent 39b9dcfec9
commit a0c95579b4
3 changed files with 24 additions and 0 deletions

View File

@ -71,6 +71,9 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
<h3>
{% trans "Stock Item" %}
{% stock_status_label item.status large=True %}
{% if item.is_expired %}
<span class='label label-large label-large-red'>{% trans "Expired" %}</span>
{% endif %}
</h3>
<hr>
<h4>
@ -293,6 +296,18 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
<td><a href="{% url 'supplier-part-detail' item.supplier_part.id %}">{{ item.supplier_part.SKU }}</a></td>
</tr>
{% endif %}
{% if item.expiry_date %}
<tr>
<td><span class='fas fa-calendar-alt{% if item.is_expired %} icon-red{% endif %}'></span></td>
<td>{% trans "Expiry Date" %}</td>
<td>
{{ item.expiry_date }}
{% if item.is_expired %}
<span title='[% trans "This StockItem expired on" %} {{ item.expiry_date }}' class='label label-red'>{% trans "Expired" %}</span>
{% endif %}
</td>
</tr>
{% endif %}
<tr>
<td><span class='fas fa-calendar-alt'></span></td>
<td>{% trans "Last Updated" %}</td>