fixes in bom and removed asset item check when fetching description
This commit is contained in:
parent
ed2554e8cc
commit
3470971016
@ -175,7 +175,7 @@ var calculate_total = function(doc) {
|
|||||||
|
|
||||||
cur_frm.fields_dict['item'].get_query = function(doc) {
|
cur_frm.fields_dict['item'].get_query = function(doc) {
|
||||||
return erpnext.queries.item({
|
return erpnext.queries.item({
|
||||||
'ifnull(tabItem.is_manufactured_item, "No")': 'Yes'
|
'ifnull(tabItem.is_manufactured_item, "No")': 'Yes',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,9 +87,6 @@ class DocType:
|
|||||||
msgprint("Item_code: %s in materials tab cannot be same as FG Item",
|
msgprint("Item_code: %s in materials tab cannot be same as FG Item",
|
||||||
item[0]['name'], raise_exception=1)
|
item[0]['name'], raise_exception=1)
|
||||||
|
|
||||||
if item and item[0]['is_asset_item'] == 'Yes':
|
|
||||||
msgprint("Item: %s is an asset item, please check", item[0]['name'], raise_exception=1)
|
|
||||||
|
|
||||||
if not item or item[0]['docstatus'] == 2:
|
if not item or item[0]['docstatus'] == 2:
|
||||||
msgprint("Item %s does not exist in system" % item[0]['item_code'], raise_exception = 1)
|
msgprint("Item %s does not exist in system" % item[0]['item_code'], raise_exception = 1)
|
||||||
|
|
||||||
@ -147,11 +144,11 @@ class DocType:
|
|||||||
rate = []
|
rate = []
|
||||||
for wh in warehouse:
|
for wh in warehouse:
|
||||||
r = get_incoming_rate({
|
r = get_incoming_rate({
|
||||||
item_code: args.get("item_code"),
|
"item_code": args.get("item_code"),
|
||||||
warehouse: wh[0],
|
"warehouse": wh[0],
|
||||||
posting_date: dt,
|
"posting_date": dt,
|
||||||
posting_time: time,
|
"posting_time": time,
|
||||||
qty: args.get("qty") or 0
|
"qty": args.get("qty") or 0
|
||||||
})
|
})
|
||||||
if r:
|
if r:
|
||||||
rate.append(r)
|
rate.append(r)
|
||||||
|
Loading…
Reference in New Issue
Block a user