Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
815f2f32c8
@ -91,7 +91,7 @@ cur_frm.cscript.make_se = function(doc, purpose) {
|
||||
se.company = doc.company;
|
||||
se.fg_completed_qty = doc.qty - doc.produced_qty;
|
||||
se.bom_no = doc.bom_no;
|
||||
se.use_multi_level_bom = 1;
|
||||
se.use_multi_level_bom = doc.use_multi_level_bom;
|
||||
loaddoc('Stock Entry', se.name);
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
"docstatus": 0,
|
||||
"creation": "2012-12-20 14:31:18",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2012-12-20 15:50:43"
|
||||
"modified": "2012-12-24 18:39:00"
|
||||
},
|
||||
{
|
||||
"is_submittable": 1,
|
||||
@ -142,6 +142,14 @@
|
||||
"fieldtype": "Data",
|
||||
"depends_on": "production_item"
|
||||
},
|
||||
{
|
||||
"description": "If checked, BOM for sub-assembly items will be considered for getting raw materials. Otherwise, all sub-assembly items will be treated as a raw material.",
|
||||
"default": "1",
|
||||
"doctype": "DocField",
|
||||
"label": "Use Multi-Level BOM",
|
||||
"fieldname": "use_multi_level_bom",
|
||||
"fieldtype": "Check"
|
||||
},
|
||||
{
|
||||
"read_only": 0,
|
||||
"doctype": "DocField",
|
||||
|
@ -6,4 +6,7 @@ def execute():
|
||||
|
||||
webnotes.conn.sql("""update `tabStock Entry`
|
||||
set use_multi_level_bom = if(consider_sa_items_as_raw_materials='Yes', 0, 1)""")
|
||||
|
||||
|
||||
webnotes.conn.sql("""update `tabProduction Order`
|
||||
set use_multi_level_bom = if(consider_sa_items_as_raw_materials='Yes', 0, 1)
|
||||
where use_multi_level_bom is null""")
|
||||
|
@ -543,6 +543,6 @@ class DocType(TransactionBase):
|
||||
@webnotes.whitelist()
|
||||
def get_production_order_details(production_order):
|
||||
result = webnotes.conn.sql("""select bom_no,
|
||||
ifnull(qty, 0) - ifnull(produced_qty, 0) as fg_completed_qty
|
||||
ifnull(qty, 0) - ifnull(produced_qty, 0) as fg_completed_qty, use_multi_level_bom
|
||||
from `tabProduction Order` where name = %s""", production_order, as_dict=1)
|
||||
return result and result[0] or {}
|
Loading…
Reference in New Issue
Block a user