Merge branch 'master' of github.com:webnotes/erpnext into cleanup

This commit is contained in:
Rushabh Mehta
2013-10-31 15:16:05 +05:30
12 changed files with 101 additions and 101 deletions

View File

@@ -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,

View File

@@ -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]