mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
[fix] BOM item validation in lower case
This commit is contained in:
@@ -424,6 +424,6 @@ def validate_bom_no(item, bom_no):
|
|||||||
if bom.docstatus != 1:
|
if bom.docstatus != 1:
|
||||||
if not getattr(frappe.flags, "in_test", False):
|
if not getattr(frappe.flags, "in_test", False):
|
||||||
frappe.throw(_("BOM {0} must be submitted").format(bom_no))
|
frappe.throw(_("BOM {0} must be submitted").format(bom_no))
|
||||||
if item and not (bom.item == item or \
|
if item and not (bom.item.lower() == item.lower() or \
|
||||||
bom.item == frappe.db.get_value("Item", item, "variant_of")):
|
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))
|
frappe.throw(_("BOM {0} does not belong to Item {1}").format(bom_no, item))
|
||||||
|
|||||||
Reference in New Issue
Block a user