mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 07:29:22 +00:00
fix: null check for valuatiomn rate
This commit is contained in:
@@ -286,6 +286,9 @@ class BOM(WebsiteGenerator):
|
|||||||
if not valuation_rate:
|
if not valuation_rate:
|
||||||
valuation_rate = frappe.db.get_value("Item", args['item_code'], "valuation_rate")
|
valuation_rate = frappe.db.get_value("Item", args['item_code'], "valuation_rate")
|
||||||
|
|
||||||
|
if not valuation_rate:
|
||||||
|
frappe.throw(_("Please set valuation rate for item {0}.".format(args['item_code'])))
|
||||||
|
|
||||||
return valuation_rate
|
return valuation_rate
|
||||||
|
|
||||||
def manage_default_bom(self):
|
def manage_default_bom(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user