From c6b01f653e255da7984453f42d88551dc14a4c87 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Mon, 23 Dec 2024 14:42:56 +0530 Subject: [PATCH] Fixed: handling for the update cycle count behavior (#528) --- src/views/HardCountDetail.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/HardCountDetail.vue b/src/views/HardCountDetail.vue index bb7da5e3..121680fa 100644 --- a/src/views/HardCountDetail.vue +++ b/src/views/HardCountDetail.vue @@ -106,7 +106,7 @@ - + {{ translate("Add to existing count") }} @@ -234,7 +234,7 @@ const selectedSegment = ref("all"); let previousItem = {} as any; const barcodeInputRef = ref(); const inputCount = ref("") as any; -const selectedCountUpdateType = ref("new"); +const selectedCountUpdateType = ref("add"); const isScrolling = ref(false); let isScanningInProgress = ref(false); @@ -563,7 +563,7 @@ async function saveCount(currentProduct: any, isScrollEvent = false) { const prevCount = currentProduct.scannedCount ? currentProduct.scannedCount : 0 item.countedByUserLoginId = userProfile.value.username - if(selectedCountUpdateType.value === "new") item.scannedCount = inputCount.value + if(selectedCountUpdateType.value === "replace") item.scannedCount = inputCount.value else item.scannedCount = inputCount.value + prevCount currentItem = item; }