mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 06:59:20 +00:00
update for default warehouse
This commit is contained in:
@@ -216,8 +216,9 @@ class BuyingController(StockController):
|
||||
|
||||
raw_materials_cost = 0
|
||||
items = list(set([d.item_code for d in bom_items]))
|
||||
item_wh = frappe._dict(frappe.db.sql("""select item_code, default_warehouse
|
||||
from `tabItem` where name in ({0})""".format(", ".join(["%s"] * len(items))), items))
|
||||
item_wh = frappe._dict(frappe.db.sql("""select i.item_code, id.default_warehouse
|
||||
from `tabItem` i, `tabItem Default` id where id.company=%s and i.name in ({0})"""
|
||||
.format(", ".join(["%s"] * len(items))), [self.company] + items))
|
||||
|
||||
for bom_item in bom_items:
|
||||
if self.doctype == "Purchase Order":
|
||||
|
||||
Reference in New Issue
Block a user