Finish prod order when skipped material transfer
This commit is contained in:
parent
ab59e4769b
commit
b866fcf14f
@ -265,7 +265,7 @@ erpnext.production_order = {
|
|||||||
erpnext.production_order.stop_production_order(frm, "Resumed");
|
erpnext.production_order.stop_production_order(frm, "Resumed");
|
||||||
}, __("Status"));
|
}, __("Status"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!frm.doc.skip_transfer){
|
if(!frm.doc.skip_transfer){
|
||||||
if ((flt(doc.material_transferred_for_manufacturing) < flt(doc.qty))
|
if ((flt(doc.material_transferred_for_manufacturing) < flt(doc.qty))
|
||||||
&& frm.doc.status != 'Stopped') {
|
&& frm.doc.status != 'Stopped') {
|
||||||
@ -274,7 +274,7 @@ erpnext.production_order = {
|
|||||||
erpnext.production_order.make_se(frm, 'Material Transfer for Manufacture');
|
erpnext.production_order.make_se(frm, 'Material Transfer for Manufacture');
|
||||||
});
|
});
|
||||||
start_btn.addClass('btn-primary');
|
start_btn.addClass('btn-primary');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!frm.doc.skip_transfer){
|
if(!frm.doc.skip_transfer){
|
||||||
@ -293,8 +293,9 @@ erpnext.production_order = {
|
|||||||
} else {
|
} else {
|
||||||
if ((flt(doc.produced_qty) < flt(doc.qty)) && frm.doc.status != 'Stopped') {
|
if ((flt(doc.produced_qty) < flt(doc.qty)) && frm.doc.status != 'Stopped') {
|
||||||
frm.has_finish_btn = true;
|
frm.has_finish_btn = true;
|
||||||
var finish_btn = frm.add_custom_button(__('Finish'),
|
var finish_btn = frm.add_custom_button(__('Finish'), function() {
|
||||||
cur_frm.cscript['Update Finished Goods']);
|
erpnext.production_order.make_se(frm, 'Manufacture');
|
||||||
|
});
|
||||||
finish_btn.addClass('btn-primary');
|
finish_btn.addClass('btn-primary');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user