erpnext icon indicating copy to clipboard operation
erpnext copied to clipboard

fix: disallow stock-in of same/duplicate serial number

Open rtdany10 opened this issue 3 years ago • 6 comments

Major issue. Steps to reproduce and video attached in the linked issue.

Closes #31787

rtdany10 avatar Aug 06 '22 14:08 rtdany10

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 avatar Aug 06 '22 14:08 rtdany10

@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.

rohitwaghchaure avatar Aug 08 '22 04:08 rohitwaghchaure

@rtdany10 To track the serial no's documents you can check the report Serial No Ledger 115990960-b18e8a00-a5e3-11eb-90fe-ac2f82c7267d

rohitwaghchaure avatar Aug 08 '22 04:08 rohitwaghchaure

@rtdany10 This use case was required for Intra Company transactions, For example there are 3 branches A, B, C in one company

  1. Branch A has purchased serial no SN-0001 and delivered to Branch B
  2. 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

image

rohitwaghchaure avatar Aug 08 '22 05:08 rohitwaghchaure

@rtdany10 Could you close the PR?

rohitwaghchaure avatar Aug 08 '22 05:08 rohitwaghchaure

@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?

rtdany10 avatar Aug 08 '22 05:08 rtdany10

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.

stale[bot] avatar Aug 31 '22 01:08 stale[bot]

@rohitwaghchaure Is there a PR where I can contribute or see the progress to the issue?

rtdany10 avatar Aug 31 '22 05:08 rtdany10

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.

stale[bot] avatar Sep 15 '22 15:09 stale[bot]