mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
UI tweaks
This commit is contained in:
parent
118d045e50
commit
b6b4189c49
@ -42,8 +42,10 @@
|
||||
<tr>
|
||||
<td>Available Stock</td>
|
||||
<td>
|
||||
{% if part.available_stock == 0 or part.available_stock < part.minimum_stock %}
|
||||
{% if part.available_stock == 0 %}
|
||||
<span class='label label-danger'>{{ part.available_stock }}</span>
|
||||
{% elif part.available_stock < part.minimum_stock %}
|
||||
<span class='label label-warning'>{{ part.available_stock }}</span>
|
||||
{% else %}
|
||||
{{ part.available_stock }}
|
||||
{% endif %}
|
||||
|
@ -176,6 +176,10 @@ class StockItem(models.Model):
|
||||
part=self.part.name,
|
||||
loc=self.location.name)
|
||||
|
||||
@property
|
||||
def is_trackable(self):
|
||||
return self.part.trackable
|
||||
|
||||
|
||||
class StockItemTracking(models.Model):
|
||||
""" Stock tracking entry
|
||||
|
@ -44,7 +44,7 @@
|
||||
<tr>
|
||||
<th>SKU</th>
|
||||
<th>Description</th>
|
||||
<th>Part</th>
|
||||
<th>Parent Part</th>
|
||||
<th>MPN</th>
|
||||
<th>URL</th>
|
||||
</tr>
|
||||
@ -54,7 +54,7 @@
|
||||
<td>{{ part.description }}</td>
|
||||
<td>
|
||||
{% if part.part %}
|
||||
<a href="{% url 'part-detail' part.part.id %}">{{ part.part.name }}</a>
|
||||
<a href="{% url 'part-suppliers' part.part.id %}">{{ part.part.name }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<tr><td>SKU</td><td>{{ part.SKU }}</tr></tr>
|
||||
<tr><td>Supplier</td><td><a href="{% url 'supplier-detail' part.supplier.id %}">{{ part.supplier.name }}</a></td></tr>
|
||||
<tr>
|
||||
<td>Part</td>
|
||||
<td>Parent Part</td>
|
||||
<td>
|
||||
{% if part.part %}
|
||||
<a href="{% url 'part-suppliers' part.part.id %}">{{ part.part.name }}</a>
|
||||
|
Loading…
Reference in New Issue
Block a user