diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 4c87dc7cd22..d4fa02c752b 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -424,6 +424,6 @@ def validate_bom_no(item, bom_no): if bom.docstatus != 1: if not getattr(frappe.flags, "in_test", False): frappe.throw(_("BOM {0} must be submitted").format(bom_no)) - if item and not (bom.item == item or \ - bom.item == frappe.db.get_value("Item", item, "variant_of")): + if item and not (bom.item.lower() == item.lower() or \ + bom.item.lower() == frappe.db.get_value("Item", item, "variant_of").lower()): frappe.throw(_("BOM {0} does not belong to Item {1}").format(bom_no, item))