mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-20 01:55:01 +00:00
Merge pull request #49927 from frappe/mergify/bp/version-15-hotfix/pr-49743
fix: use valuation_rate from item master if no bin is present (backport #49743)
This commit is contained in:
@@ -1516,7 +1516,7 @@ def get_valuation_rate(item_code, company, warehouse=None):
|
||||
|
||||
return frappe.db.get_value(
|
||||
"Bin", {"item_code": item_code, "warehouse": warehouse}, ["valuation_rate"], as_dict=True
|
||||
) or {"valuation_rate": 0}
|
||||
) or {"valuation_rate": item.get("valuation_rate") or 0}
|
||||
|
||||
elif not item.get("is_stock_item"):
|
||||
pi_item = frappe.qb.DocType("Purchase Invoice Item")
|
||||
|
||||
Reference in New Issue
Block a user