mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Bug fix for sales order allocation table (#3295)
- Display serial number where available
This commit is contained in:
parent
5045f85346
commit
1235d47eca
@ -741,7 +741,7 @@ class SalesOrderAllocationSerializer(InvenTreeModelSerializer):
|
|||||||
"""Initialization routine for the serializer"""
|
"""Initialization routine for the serializer"""
|
||||||
order_detail = kwargs.pop('order_detail', False)
|
order_detail = kwargs.pop('order_detail', False)
|
||||||
part_detail = kwargs.pop('part_detail', True)
|
part_detail = kwargs.pop('part_detail', True)
|
||||||
item_detail = kwargs.pop('item_detail', False)
|
item_detail = kwargs.pop('item_detail', True)
|
||||||
location_detail = kwargs.pop('location_detail', False)
|
location_detail = kwargs.pop('location_detail', False)
|
||||||
customer_detail = kwargs.pop('customer_detail', False)
|
customer_detail = kwargs.pop('customer_detail', False)
|
||||||
|
|
||||||
|
@ -3236,10 +3236,12 @@ function showAllocationSubTable(index, row, element, options) {
|
|||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
var text = '';
|
var text = '';
|
||||||
|
|
||||||
if (row.serial != null && row.quantity == 1) {
|
var item = row.item_detail;
|
||||||
text = `{% trans "Serial Number" %}: ${row.serial}`;
|
|
||||||
} else {
|
var text = `{% trans "Quantity" %}: ${row.quantity}`;
|
||||||
text = `{% trans "Quantity" %}: ${row.quantity}`;
|
|
||||||
|
if (item && item.serial != null && row.quantity == 1) {
|
||||||
|
text = `{% trans "Serial Number" %}: ${item.serial}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return renderLink(text, `/stock/item/${row.item}/`);
|
return renderLink(text, `/stock/item/${row.item}/`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user