fix: ui issues across multiple pages (#45224)

* fix: ui issues across multiple pages

* refactor: change cur_from to frm
This commit is contained in:
Ejaaz Khan
2025-01-13 11:56:59 +05:30
committed by GitHub
parent 6eb3b0b1c2
commit eea0eff001
3 changed files with 10 additions and 6 deletions

View File

@@ -199,9 +199,10 @@
},
{
"depends_on": "eval:doc.get_items_from && doc.docstatus == 0",
"description": "Get Finished Goods for Manufacture",
"fieldname": "get_items",
"fieldtype": "Button",
"label": "Get Finished Goods for Manufacture"
"label": "Get Finished Goods"
},
{
"fieldname": "po_items",
@@ -439,7 +440,7 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2024-12-04 11:55:03.108971",
"modified": "2025-01-10 17:47:52.207209",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Production Plan",

View File

@@ -717,7 +717,6 @@ erpnext.work_order = {
);
}
);
consumption_btn.addClass("btn-primary");
}
}
}

View File

@@ -254,20 +254,24 @@ erpnext.buying.SubcontractingOrderController = class SubcontractingOrderControll
if (doc.docstatus == 1) {
if (!["Closed", "Completed"].includes(doc.status)) {
if (flt(doc.per_received) < 100) {
cur_frm.add_custom_button(
this.frm.add_custom_button(
__("Subcontracting Receipt"),
this.make_subcontracting_receipt,
__("Create")
);
if (me.has_unsupplied_items()) {
cur_frm.add_custom_button(
this.frm.add_custom_button(
__("Material to Supplier"),
this.make_stock_entry,
__("Transfer")
);
}
}
cur_frm.page.set_inner_btn_group_as_primary(__("Create"));
if (flt(doc.per_received) < 100 && me.has_unsupplied_items()) {
this.frm.page.set_inner_btn_group_as_primary(__("Transfer"));
} else {
this.frm.page.set_inner_btn_group_as_primary(__("Create"));
}
}
}
}