From 76354762aa0e5a123ade0cd6a95e2ba14747018a Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Thu, 26 Dec 2024 12:32:45 +0530 Subject: [PATCH 1/2] Fixed: scanned count getting saved twice in the list state (#528) --- src/views/HardCountDetail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/HardCountDetail.vue b/src/views/HardCountDetail.vue index 65861049..385b006f 100644 --- a/src/views/HardCountDetail.vue +++ b/src/views/HardCountDetail.vue @@ -590,7 +590,7 @@ async function saveCount(currentProduct: any, isScrollEvent = false) { const items = JSON.parse(JSON.stringify(cycleCountItems.value.itemList)) items.map((item: any) => { if(item.importItemSeqId === currentProduct.importItemSeqId) { - item.quantity = selectedCountUpdateType.value === "replace" ? inputCount.value : Number(inputCount.value) + Number(currentProduct.quantity || 0) + item.quantity = selectedCountUpdateType.value === "replace" ? inputCount.value : Number(currentProduct.quantity || 0) item.countedByGroupName = userProfile.value.userFullName item.countedByUserLoginId = userProfile.value.username } From 72e23ace41b2f7b25a4b90fd38075dbe30b641e6 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Thu, 26 Dec 2024 12:36:46 +0530 Subject: [PATCH 2/2] Improved: logic to update the count in the current list (#528) --- src/views/HardCountDetail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/HardCountDetail.vue b/src/views/HardCountDetail.vue index 385b006f..dc370692 100644 --- a/src/views/HardCountDetail.vue +++ b/src/views/HardCountDetail.vue @@ -590,7 +590,7 @@ async function saveCount(currentProduct: any, isScrollEvent = false) { const items = JSON.parse(JSON.stringify(cycleCountItems.value.itemList)) items.map((item: any) => { if(item.importItemSeqId === currentProduct.importItemSeqId) { - item.quantity = selectedCountUpdateType.value === "replace" ? inputCount.value : Number(currentProduct.quantity || 0) + item.quantity = currentProduct.quantity item.countedByGroupName = userProfile.value.userFullName item.countedByUserLoginId = userProfile.value.username }