mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-18 22:35:10 +00:00
Merge pull request #49743 from aerele/item-valuation-rate
fix: use valuation_rate from item master if no bin is present
This commit is contained in:
@@ -1577,7 +1577,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