We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d0b553d commit 0d1c30fCopy full SHA for 0d1c30f
1 file changed
erpnext/manufacturing/doctype/work_order/work_order.js
@@ -710,7 +710,7 @@ erpnext.work_order = {
710
set_custom_buttons: function (frm) {
711
var doc = frm.doc;
712
713
- if (doc.docstatus === 1 && doc.status !== "Closed") {
+ if (doc.docstatus === 1 && !["Closed", "Completed"].includes(doc.status)) {
714
frm.add_custom_button(
715
__("Close"),
716
function () {
@@ -720,9 +720,6 @@ erpnext.work_order = {
720
},
721
__("Status")
722
);
723
- }
724
-
725
- if (doc.docstatus === 1 && !["Closed", "Completed"].includes(doc.status)) {
726
if (doc.status != "Stopped" && doc.status != "Completed") {
727
728
__("Stop"),
0 commit comments