mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
Merge branch 'master' of github.com:webnotes/erpnext into cleanup
This commit is contained in:
@@ -409,7 +409,8 @@ def get_bom_items_as_dict(bom, qty=1, fetch_exploded=1):
|
||||
item_dict = {}
|
||||
|
||||
query = """select
|
||||
bom_item.item_code,
|
||||
bom_item.item_code,
|
||||
item.item_name,
|
||||
ifnull(sum(bom_item.qty_consumed_per_unit),0) * %(qty)s as qty,
|
||||
item.description,
|
||||
item.stock_uom,
|
||||
|
||||
@@ -133,16 +133,16 @@ class DocType:
|
||||
|
||||
@webnotes.whitelist()
|
||||
def get_item_details(item):
|
||||
res = webnotes.conn.sql("""select stock_uom
|
||||
res = webnotes.conn.sql("""select stock_uom, description
|
||||
from `tabItem` where (ifnull(end_of_life, "")="" or end_of_life > now())
|
||||
and name=%s""", (item,), as_dict=1)
|
||||
and name=%s""", item, as_dict=1)
|
||||
|
||||
if not res:
|
||||
return {}
|
||||
|
||||
res = res[0]
|
||||
bom = webnotes.conn.sql("""select name from `tabBOM` where item=%s
|
||||
and ifnull(is_default, 0)=1""", (item,))
|
||||
and ifnull(is_default, 0)=1""", item)
|
||||
if bom:
|
||||
res.bom_no = bom[0][0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user