Skip to content

Commit dc0592a

Browse files
rohitwaghchauremergify[bot]
authored andcommitted
fix: serial no status for Disassemble entry
(cherry picked from commit 81acefa)
1 parent d74833d commit dc0592a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

erpnext/stock/serial_batch_bundle.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,11 @@ def update_serial_no_status_warehouse(self, sle, serial_nos):
463463
if sle.voucher_type in ["Sales Invoice", "Delivery Note"] and sle.actual_qty < 0:
464464
customer = frappe.get_cached_value(sle.voucher_type, sle.voucher_no, "customer")
465465

466+
if sle.voucher_type in ["Stock Entry"] and sle.actual_qty < 0:
467+
purpose = frappe.get_cached_value("Stock Entry", sle.voucher_no, "purpose")
468+
if purpose in ["Disassemble", "Material Receipt"]:
469+
status = "Inactive"
470+
466471
sn_table = frappe.qb.DocType("Serial No")
467472

468473
query = (

0 commit comments

Comments
 (0)