erpnext
erpnext copied to clipboard
fix: disallow stock-in of same/duplicate serial number
Major issue. Steps to reproduce and video attached in the linked issue.
Closes #31787
We need a patch to fix affected transaction but I have clue on how to proceed with it. Maybe split the duplicate serial number based on number of inward entries and make the change in SLEs and other documents? But then we again can't figure out which serial number was stock out in which document.
Little help here please
@rtdany10 this is not an issue, this behaviour was added intentionally to handle a use case where customer purchase same serial number multiple times. With this behaviour you can only be able to purchase the delivered serial nos only.
@rtdany10 To track the serial no's documents you can check the report Serial No Ledger

@rtdany10 This use case was required for Intra Company transactions, For example there are 3 branches A, B, C in one company
- Branch A has purchased serial no SN-0001 and delivered to Branch B
- Now Branch B wants to make purchase entry for the same serial no SN-0001 and wants to deliver to Branch C
Here customer was expecting same serial nos was purchase multiple times, also if you tried to cancel backdated transaction for the serial no SN-0001 then system won't allow you to cancel it and throw the below error
@rtdany10 Could you close the PR?
@rohitwaghchaure
What happens when there is a Sales Return? I can't cancel the document due to future transaction and neither can I generate a return document. Return document throws: Serial no <serial number here> has been already returned
P.S Shouldn't branch transfers be Stock Transfer and not purchase?
This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.
@rohitwaghchaure Is there a PR where I can contribute or see the progress to the issue?
This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.