mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-20 18:54:55 +00:00
fix: use item valuation rate if no bin
This commit is contained in:
@@ -1564,7 +1564,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