🐞 Bug: Same Serial No Allowed in One Stock Entry (Material Receipt) for Different Warehouses

ERPNext currently allows the same Serial No to be included multiple times in a single Stock Entry (Material Receipt) but linked to different Warehouses.
This behavior should not be possible — a single serial number should always exist in one warehouse at a time, otherwise it corrupts the Serial No Ledger and creates data inconsistency across stock tracking reports.

Example Case

In my case, Stock Entry SE-HO-MR-00034 has two rows for the same Serial No BTCENTRAL00002
one linked to “Mehul Patel - PEPL” and another to “Panchmahal - Amul Amcs Main”.

Here’s the affected Serial No Ledger view :point_down:

You can see both entries showing “Active” even though the same Serial No was used in two different warehouses in one transaction.


Impact

  • Serial No Ledger becomes inconsistent (duplicate rows for same Serial No)
  • Stock reconciliation reports become incorrect
  • Traceability and audit trail breaks for serialized items

Expected Behavior

ERPNext should restrict the same Serial No from being used more than once in a single Stock Entry, even across multiple child rows pointing to different Warehouses.

I think you can restrict it via Stock Settings

In my case the same serial no is allowed in different warehouse in one stock entry (Material Receipt) , your solution may not be helpful for this scenario