mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
This commit is contained in:
@@ -106,6 +106,8 @@ frappe.ui.form.on("Production Plan", {
|
||||
__("View")
|
||||
);
|
||||
|
||||
let has_create_buttons = false;
|
||||
|
||||
if (frm.doc.status !== "Completed") {
|
||||
if (frm.doc.status === "Closed") {
|
||||
frm.add_custom_button(
|
||||
@@ -135,6 +137,7 @@ frappe.ui.form.on("Production Plan", {
|
||||
},
|
||||
__("Create")
|
||||
);
|
||||
has_create_buttons = true;
|
||||
}
|
||||
|
||||
if (
|
||||
@@ -149,13 +152,14 @@ frappe.ui.form.on("Production Plan", {
|
||||
},
|
||||
__("Create")
|
||||
);
|
||||
}
|
||||
has_create_buttons = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (frm.doc.status !== "Closed") {
|
||||
if (has_create_buttons && frm.doc.status !== "Closed") {
|
||||
frm.page.set_inner_btn_group_as_primary(__("Create"));
|
||||
}
|
||||
}
|
||||
frm.trigger("material_requirement");
|
||||
|
||||
const projected_qty_formula = ` <table class="table table-bordered" style="background-color: var(--scrollbar-track-color);">
|
||||
|
||||
Reference in New Issue
Block a user