diff --git a/Areas/Inventory/Views/InventoryMaster/ItemMovement.cshtml b/Areas/Inventory/Views/InventoryMaster/ItemMovement.cshtml index b090376..77e7f63 100644 --- a/Areas/Inventory/Views/InventoryMaster/ItemMovement.cshtml +++ b/Areas/Inventory/Views/InventoryMaster/ItemMovement.cshtml @@ -407,24 +407,24 @@ // Generate QR codes after rows are rendered const api = this.api(); api.rows().every(function () { - const data = this.data(); // Row data - const containerId = `qr${data.id}`; - + const data = this.data(); + const containerId = `qr${data.id}`; //containerid is by increments from API const container = $(`#${containerId}`); + container.empty(); container.append(`${data.item.itemId}`); + + if (container.length) { + - // console.log(container[0]); - if (container) { - // Generate QR code only if not already generated - new QRCode(container[0], { - text: data.qrString, - width: 100, - height: 100, - colorDark: "#000000", - colorLight: "#ffffff", - correctLevel: QRCode.CorrectLevel.M - }); + new QRCode(container[0], { + text: data.qrString, + width: 100, + height: 100, + colorDark: "#000000", + colorLight: "#ffffff", + correctLevel: QRCode.CorrectLevel.M, + }); } // container.on('click', function() { // window.open(data.qrString, '_blank'); diff --git a/Areas/Inventory/Views/InventoryMaster/ItemRequestMaster.cshtml b/Areas/Inventory/Views/InventoryMaster/ItemRequestMaster.cshtml index 825a62b..e9a53eb 100644 --- a/Areas/Inventory/Views/InventoryMaster/ItemRequestMaster.cshtml +++ b/Areas/Inventory/Views/InventoryMaster/ItemRequestMaster.cshtml @@ -20,7 +20,7 @@