fix(stock): show error for unmatched scan in barcode scan dialog by mihir-kandoi · Pull Request #61765 · frappe/erpnext · GitHub
Skip to content

fix(stock): show error for unmatched scan in barcode scan dialog - #61765

Merged
mergify[bot] merged 3 commits into
frappe:developfrom
mihir-kandoi:fix/issue-61763
Oct 21, 2026
Merged

mergify[bot] merged 3 commits into
frappe:developfrom
mihir-kandoi:fix/issue-61763

Conversation

@mihir-kandoi

Copy link
Copy Markdown
Collaborator

In the "Scan barcode for item" dialog, scanning a value that is not a barcode, batch or serial no of the dialog's item (unknown serial, or a serial of another item) cleared the input with no message or fail sound.

Now it plays the fail sound and shows an error, the same way the duplicate serial scan does.

Closes #61763

Scanning a value that is not a serial, batch or barcode of the dialog's
item cleared the input without any message.
@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Comment thread erpnext/public/js/utils/barcode_scanner.js Outdated
@mihir-kandoi mihir-kandoi self-assigned this Oct 21, 2026
@mihir-kandoi

Copy link
Copy Markdown
Collaborator Author

Auto-generated review.

Verdict: Approve

Reproduced on develop (console + browser): in the "Scan barcode for item" dialog of a draft Delivery Note, scanning an unknown serial (S999999) or a serial of another item cleared the input with no message and no count change. scan_barcode returns {} for both, and update_dialog_values had no else branch.

On the PR head both scans now show "Cannot find for Item " and call play_fail_sound, the value is HTML-escaped, and valid serials still count afterwards.

Nothing pushed.

Non-blocking:

Same silent path exists on version-15-hotfix and version-16-hotfix (identical update_dialog_values), so added both backport labels.

@mihir-kandoi

Copy link
Copy Markdown
Collaborator Author

@Mergifyio queue

@mergify

mergify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

@mergify mergify Bot added the queued label Oct 21, 2026
@mergify
mergify Bot merged commit e55270d into frappe:develop Oct 21, 2026
12 checks passed
@mergify mergify Bot removed the queued label Oct 21, 2026
mergify Bot added a commit that referenced this pull request Oct 21, 2026
…-61765

fix(stock): show error for unmatched scan in barcode scan dialog (backport #61765)
mergify Bot added a commit that referenced this pull request Oct 21, 2026
…-61765

fix(stock): show error for unmatched scan in barcode scan dialog (backport #61765)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Barcode Scanner: "Scan barcode for item" dialog silently discards unknown or mismatched Serial Nos

1 participant