diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 92dc2942250..896b43088ad 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -444,6 +444,11 @@ class SerialBatchBundle: if sle.voucher_type in ["Sales Invoice", "Delivery Note"] and sle.actual_qty < 0: customer = frappe.get_cached_value(sle.voucher_type, sle.voucher_no, "customer") + if sle.voucher_type in ["Stock Entry"] and sle.actual_qty < 0: + purpose = frappe.get_cached_value("Stock Entry", sle.voucher_no, "purpose") + if purpose in ["Disassemble", "Material Receipt"]: + status = "Inactive" + sn_table = frappe.qb.DocType("Serial No") query = (