mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 06:59:20 +00:00
fix: nullish check and table name
This commit is contained in:
@@ -753,7 +753,7 @@ class BOM(WebsiteGenerator):
|
|||||||
bom_item.include_item_in_manufacturing,
|
bom_item.include_item_in_manufacturing,
|
||||||
bom_item.sourced_by_supplier,
|
bom_item.sourced_by_supplier,
|
||||||
bom_item.stock_qty / ifnull(bom.quantity, 1) AS qty_consumed_per_unit
|
bom_item.stock_qty / ifnull(bom.quantity, 1) AS qty_consumed_per_unit
|
||||||
FROM `tabBOM Explosion Item` bom_item, tabBOM bom
|
FROM `tabBOM Explosion Item` bom_item, `tabBOM` bom
|
||||||
WHERE
|
WHERE
|
||||||
bom_item.parent = bom.name
|
bom_item.parent = bom.name
|
||||||
AND bom.name = %s
|
AND bom.name = %s
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class ItemPrice(Document):
|
|||||||
if self.get(field):
|
if self.get(field):
|
||||||
conditions += " and {0} = %({0})s ".format(field)
|
conditions += " and {0} = %({0})s ".format(field)
|
||||||
else:
|
else:
|
||||||
conditions += "and (isnull({0}) or {0} = '')".format(field)
|
conditions += "and ({0} is null or {0} = '')".format(field)
|
||||||
|
|
||||||
price_list_rate = frappe.db.sql(
|
price_list_rate = frappe.db.sql(
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user