mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +00:00
Differentiate between "fully allocated" and "partially allocated" in stock item table
This commit is contained in:
parent
586d38fb61
commit
d5ace1a8da
@ -526,6 +526,7 @@ class SalesOrderAllocationSerializer(InvenTreeModelSerializer):
|
|||||||
'order_detail',
|
'order_detail',
|
||||||
'part',
|
'part',
|
||||||
'part_detail',
|
'part_detail',
|
||||||
|
'shipment',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@
|
|||||||
<div class='alert alert-block alert-info'>
|
<div class='alert alert-block alert-info'>
|
||||||
{% object_link 'so-detail' allocation.line.order.id allocation.line.order as link %}
|
{% object_link 'so-detail' allocation.line.order.id allocation.line.order as link %}
|
||||||
{% decimal allocation.quantity as qty %}
|
{% decimal allocation.quantity as qty %}
|
||||||
{% blocktrans %}This stock item is allocated to Sales Order {{ link }} (Quantity: {{ qty }}){% endblocktrans %}
|
{% trans "This stock item is allocated to Sales Order" %} {{ link }} {% if qty < item.quantity %}({% trans "Quantity" %}: {{ qty }}){% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
@ -260,7 +260,7 @@
|
|||||||
<div class='alert alert-block alert-info'>
|
<div class='alert alert-block alert-info'>
|
||||||
{% object_link 'build-detail' allocation.build.id allocation.build %}
|
{% object_link 'build-detail' allocation.build.id allocation.build %}
|
||||||
{% decimal allocation.quantity as qty %}
|
{% decimal allocation.quantity as qty %}
|
||||||
{% blocktrans %}This stock item is allocated to Build {{ link }} (Quantity: {{ qty }}){% endblocktrans %}
|
{% trans "This stock item is allocated to Build Order" %} {{ link }} {% if qty < item.quantity %}({% trans "Quantity" %}: {{ qty }}){% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
@ -1278,7 +1278,14 @@ function loadStockTable(table, options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (row.allocated) {
|
if (row.allocated) {
|
||||||
html += makeIconBadge('fa-bookmark', '{% trans "Stock item has been allocated" %}');
|
|
||||||
|
if (row.serial != null && row.quantity == 1) {
|
||||||
|
html += makeIconBadge('fa-bookmark icon-yellow', '{% trans "Serialized stock item has been allocated" %}');
|
||||||
|
} else if (row.allocated >= row.quantity) {
|
||||||
|
html += makeIconBadge('fa-bookmark icon-red', '{% trans "Stock item has been fully allocated" %}');
|
||||||
|
} else {
|
||||||
|
html += makeIconBadge('fa-bookmark', '{% trans "Stock item has been partially allocated" %}');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (row.belongs_to) {
|
if (row.belongs_to) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user