mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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"""
|
||||
order_detail = kwargs.pop('order_detail', False)
|
||||
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)
|
||||
customer_detail = kwargs.pop('customer_detail', False)
|
||||
|
||||
|
@ -3236,10 +3236,12 @@ function showAllocationSubTable(index, row, element, options) {
|
||||
formatter: function(value, row, index, field) {
|
||||
var text = '';
|
||||
|
||||
if (row.serial != null && row.quantity == 1) {
|
||||
text = `{% trans "Serial Number" %}: ${row.serial}`;
|
||||
} else {
|
||||
text = `{% trans "Quantity" %}: ${row.quantity}`;
|
||||
var item = row.item_detail;
|
||||
|
||||
var 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}/`);
|
||||
|
Loading…
Reference in New Issue
Block a user