mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-19 21:19:19 +00:00
[merge] merged with master
This commit is contained in:
@@ -120,7 +120,7 @@ class DocType:
|
||||
elif self.doc.rm_cost_as_per == "Price List":
|
||||
if not self.doc.buying_price_list:
|
||||
webnotes.throw(_("Please select Price List"))
|
||||
rate = webnotes.conn.get_value("Item Price", {"parent": self.doc.buying_price_list,
|
||||
rate = webnotes.conn.get_value("Item Price", {"price_list": self.doc.buying_price_list,
|
||||
"item_code": arg["item_code"]}, "ref_rate") or 0
|
||||
elif self.doc.rm_cost_as_per == 'Standard Rate':
|
||||
rate = arg['standard_rate']
|
||||
@@ -413,7 +413,9 @@ def get_bom_items_as_dict(bom, qty=1, fetch_exploded=1):
|
||||
ifnull(sum(bom_item.qty_consumed_per_unit),0) * %(qty)s as qty,
|
||||
item.description,
|
||||
item.stock_uom,
|
||||
item.default_warehouse
|
||||
item.default_warehouse,
|
||||
item.purchase_account as expense_account,
|
||||
item.cost_center
|
||||
from
|
||||
`tab%(table)s` bom_item, `tabItem` item
|
||||
where
|
||||
@@ -452,4 +454,4 @@ def get_bom_items_as_dict(bom, qty=1, fetch_exploded=1):
|
||||
def get_bom_items(bom, qty=1, fetch_exploded=1):
|
||||
items = get_bom_items_as_dict(bom, qty, fetch_exploded).values()
|
||||
items.sort(lambda a, b: a.item_code > b.item_code and 1 or -1)
|
||||
return items
|
||||
return items
|
||||
|
||||
Reference in New Issue
Block a user