fix: serial no status for Disassemble entry

This commit is contained in:
Rohit Waghchaure
2026-03-03 17:11:53 +05:30
parent 735631899f
commit 81acefa8ad

View File

@@ -461,6 +461,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 = (