diff --git a/InvenTree/templates/js/translated/barcode.js b/InvenTree/templates/js/translated/barcode.js index 6be56d14f1..40d143887d 100644 --- a/InvenTree/templates/js/translated/barcode.js +++ b/InvenTree/templates/js/translated/barcode.js @@ -366,7 +366,6 @@ function barcodeCheckIn(location_id) { // List of items we are going to checkin var items = []; - function reloadTable() { modalEnable(modal, false); @@ -389,10 +388,17 @@ function barcodeCheckIn(location_id) { `; items.forEach(function(item) { + + var location_info = `${item.location}`; + + if (item.location_detail) { + location_info = `${item.location_detail.name}`; + } + html += ` ${imageHoverIcon(item.part_detail.thumbnail)} ${item.part_detail.name} - ${item.location_detail.name} + ${location_info} ${item.quantity} ${makeIconButton('fa-times-circle icon-red', 'button-item-remove', item.pk, '{% trans "Remove stock item" %}')} `; @@ -469,6 +475,12 @@ function barcodeCheckIn(location_id) { data.items = entries; + // Prevent submission without any entries + if (entries.length == 0) { + showBarcodeMessage(modal, '{% trans "No barcode provided" %}', 'warning'); + return; + } + inventreePut( '{% url "api-stock-transfer" %}', data,