fix: bind this to function

This commit is contained in:
Mihir Kandoi
2025-01-30 17:29:31 +05:30
parent 9a34c4c1ec
commit 41649cf52d

View File

@@ -367,7 +367,11 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends (
}
if (is_drop_ship && doc.status != "Delivered") {
this.frm.add_custom_button(__("Delivered"), this.delivered_by_supplier, __("Status"));
this.frm.add_custom_button(
__("Delivered"),
this.delivered_by_supplier.bind(this),
__("Status")
);
this.frm.page.set_inner_btn_group_as_primary(__("Status"));
}