Skip to content

Commit

Permalink
Fixed: scanned count not getting saved when matching manually (#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Jan 3, 2025
1 parent 18a7238 commit 6f3ecd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/HardCountDetail.vue
Original file line number Diff line number Diff line change
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 6f3ecd0

Please sign in to comment.