mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
fix: ui issues across multiple pages (#45224)
* fix: ui issues across multiple pages * refactor: change cur_from to frm
This commit is contained in:
@@ -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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user