diff --git a/src/backend/InvenTree/templates/js/translated/stock.js b/src/backend/InvenTree/templates/js/translated/stock.js index 5254eec00f..e88f0602bb 100644 --- a/src/backend/InvenTree/templates/js/translated/stock.js +++ b/src/backend/InvenTree/templates/js/translated/stock.js @@ -1110,11 +1110,8 @@ function adjustStock(action, items, options={}) { classes: 'float-right' }); - var quantity = item.quantity; + let quantityString = ''; - if (item.part_detail.units != null) { - quantity += ` ${item.part_detail.units}`; - } var location = locationDetail(item, false); @@ -1122,12 +1119,18 @@ function adjustStock(action, items, options={}) { location = item.location_detail.pathstring; } - if (item.serial != null) { - quantity = `#${item.serial}`; + if (!item.serial) { + quantityString = `${item.quantity}`; + + if (item.part_detail?.units) { + quantityString += ` [${item.part_detail.units}]`; + } + } else { + quantityString = `#${item.serial}`; } if (item.batch) { - quantity += ` - {% trans "Batch" %}: ${item.batch}`; + quantityString += ` - {% trans "Batch" %}: ${item.batch}`; } var actionInput = ''; @@ -1158,7 +1161,7 @@ function adjustStock(action, items, options={}) { html += `