mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-03 00:23:21 +00:00
[fix] cleanup stop-resume code
This commit is contained in:
@@ -83,7 +83,7 @@ erpnext.production_order = {
|
||||
frm.add_custom_button(__('Stop'), cur_frm.cscript['Stop Production Order'],
|
||||
"icon-exclamation", "btn-default");
|
||||
} else if (doc.status == 'Stopped') {
|
||||
frm.add_custom_button(__('Unstop'), cur_frm.cscript['Unstop Production Order'],
|
||||
frm.add_custom_button(__('Re-open'), cur_frm.cscript['Unstop Production Order'],
|
||||
"icon-check", "btn-default");
|
||||
}
|
||||
|
||||
@@ -239,18 +239,11 @@ $.extend(cur_frm.cscript, {
|
||||
});
|
||||
|
||||
cur_frm.cscript['Stop Production Order'] = function() {
|
||||
var doc = cur_frm.doc;
|
||||
var check = confirm(__("Do you really want to stop production order: " + doc.name));
|
||||
if (check) {
|
||||
return $c_obj(doc, 'stop_unstop', 'Stopped', function(r, rt) {cur_frm.refresh();});
|
||||
}
|
||||
$c_obj(cur_frm.doc, 'stop_unstop', 'Stopped', function(r, rt) {cur_frm.refresh();});
|
||||
}
|
||||
|
||||
cur_frm.cscript['Unstop Production Order'] = function() {
|
||||
var doc = cur_frm.doc;
|
||||
var check = confirm(__("Do really want to unstop production order: " + doc.name));
|
||||
if (check)
|
||||
return $c_obj(doc, 'stop_unstop', 'Unstopped', function(r, rt) {cur_frm.refresh();});
|
||||
$c_obj(cur_frm.doc, 'stop_unstop', 'Unstopped', function(r, rt) {cur_frm.refresh();});
|
||||
}
|
||||
|
||||
cur_frm.cscript['Transfer Raw Materials'] = function() {
|
||||
|
||||
Reference in New Issue
Block a user