Make proposed corrections

This commit is contained in:
Ishan Loya 2017-04-21 18:18:39 +05:30 committed by Nabin Hait
parent b12e15dcc4
commit 56c1b2a625

View File

@ -145,7 +145,7 @@ erpnext.production_order = {
btn.addClass('btn-primary');
}
}
} else if(frm.doc.skip_transfer){
} else {
if ((flt(doc.produced_qty) < flt(doc.qty)) && frm.doc.status != 'Stopped') {
frm.has_finish_btn = true;
var btn = frm.add_custom_button(__('Finish'),
@ -252,10 +252,8 @@ $.extend(cur_frm.cscript, {
var max = (purpose === "Manufacture") ?
flt(this.frm.doc.material_transferred_for_manufacturing) - flt(this.frm.doc.produced_qty) :
flt(this.frm.doc.qty) - flt(this.frm.doc.material_transferred_for_manufacturing);
} else if(this.frm.doc.skip_transfer){
var max = (purpose === "Manufacture") ?
flt(this.frm.doc.qty) - flt(this.frm.doc.produced_qty) :
flt(this.frm.doc.qty) - flt(this.frm.doc.produced_qty);
} else {
var max = flt(this.frm.doc.qty) - flt(this.frm.doc.produced_qty);
}
frappe.prompt({fieldtype:"Float", label: __("Qty for {0}", [purpose]), fieldname:"qty",
@ -334,4 +332,4 @@ cur_frm.fields_dict['project'].get_query = function(doc, dt, dn) {
['Project', 'status', 'not in', 'Completed, Cancelled']
]
}
}
}