Better display of where a StockItem is allocated

This commit is contained in:
Oliver Walters 2020-04-22 17:39:59 +10:00
parent eb7b49784b
commit 5d1754ec32

View File

@ -17,15 +17,13 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
{% for allocation in item.sales_order_allocations.all %}
<div class='alert alert-block alert-info'>
{% trans "This stock item is allocated to Sales Order" %}
<a href="{% url 'so-detail' allocation.line.order.id %}"><b>{{ allcation.line.order }}</b></a>
{% trans "This stock item is allocated to Sales Order" %} <a href="{% url 'so-detail' allocation.line.order.id %}">#{{ allocation.line.order.id }}</a> ({% trans "Quantity" %}: {% decimal allocation.quantity %})
</div>
{% endfor %}
{% for allocation in item.allocations.all %}
<div class='alert alert-block alert-info'>
{% trans "This stock item is allocated to Build" %}
<a href="{% url 'build-detail' allocation.build.id %}"><b>{{ allocation.build }}</b></a>
{% trans "This stock item is allocated to Build" %} <a href="{% url 'build-detail' allocation.build.id %}">#{{ allocation.build.id }}</a> ({% trans "Quantity" %}: {% decimal allocation.quantity %})
</div>
{% endfor %}