mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add stock-info labels to Part info page
This commit is contained in:
parent
06f28898a0
commit
5aec3df7c9
@ -98,7 +98,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans "In Stock" %}</td>
|
<td>{% trans "In Stock" %}</td>
|
||||||
<td>{% decimal part.total_stock %}</td>
|
<td>{% include "part/stock_count.html" %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% if not part.is_template %}
|
{% if not part.is_template %}
|
||||||
{% if part.allocation_count > 0 %}
|
{% if part.allocation_count > 0 %}
|
||||||
|
10
InvenTree/part/templates/part/stock_count.html
Normal file
10
InvenTree/part/templates/part/stock_count.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{% load inventree_extras %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% decimal part.total_stock %}
|
||||||
|
|
||||||
|
{% if part.total_stock == 0 %}
|
||||||
|
<span class='label label-danger'>{% trans "No Stock" %}</span>
|
||||||
|
{% elif part.total_stock < part.minimum_stock %}
|
||||||
|
<span class='label label-warning'>{% trans "Low Stock" %}</span>
|
||||||
|
{% endif %}
|
Loading…
Reference in New Issue
Block a user