Skip to content

Commit

Permalink
Merge pull request #583 from amansinghbais/#556-update
Browse files Browse the repository at this point in the history
Fixed: scanned count not getting saved when matching manually (#556)
  • Loading branch information
ymaheshwari1 authored Jan 3, 2025
2 parents 18a7238 + 4091479 commit 57f04e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/views/HardCountDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</ion-segment>
</div>
<template v-if="itemsList?.length > 0">
<ProductItemList v-for="item in itemsList" :key="item.importItemSeqId" :item="item"/>
<ProductItemList v-for="item in itemsList" :key="item.importItemSeqId ? item.importItemSeqId : item.scannedId" :item="item"/>
</template>
<template v-else>
<div class="empty-state">
Expand Down Expand Up @@ -481,7 +481,7 @@ async function updateCurrentItemInList(newItem: any, scannedValue: string) {
updatedItem["isMatchNotFound"] = newItem?.importItemSeqId ? false : true
let newCount = "" as any;
if(updatedItem && updatedItem.scannedId !== updatedProduct.scannedId && updatedItem?.scannedCount) {
if(updatedItem && updatedItem?.scannedCount) {
newCount = updatedItem.scannedCount
} else if(selectedSegment.value === "unmatched" && (inputCount.value || updatedItem.scannedCount)) {
newCount = Number(inputCount.value || 0) + Number(updatedItem.scannedCount || 0)
Expand All @@ -500,7 +500,7 @@ async function updateCurrentItemInList(newItem: any, scannedValue: string) {
if(!hasError(resp)) {
updatedItem["quantity"] = newCount
delete updatedItem["scannedCount"];
inputCount.value = ""
if(selectedSegment.value === "unmatched") inputCount.value = ""
}
} catch(error) {
logger.error(error)
Expand Down

0 comments on commit 57f04e6

Please sign in to comment.