From 57f67faba1c3f5466b7333579b828708229eaef1 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 27 Mar 2024 14:28:37 +0530 Subject: [PATCH] fix: typeerror on Purchase Order form UI --- .../buying/doctype/purchase_order/purchase_order.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index c3a155a0133..4aee9efab08 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -350,7 +350,9 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( if (flt(doc.per_received, 2) < 100 && allow_receipt) { this.frm.add_custom_button( __("Purchase Receipt"), - this.make_purchase_receipt, + () => { + me.make_purchase_receipt(); + }, __("Create") ); if (doc.is_subcontracted) { @@ -367,7 +369,9 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( } else { this.frm.add_custom_button( __("Subcontracting Order"), - this.make_subcontracting_order, + () => { + me.make_subcontracting_order(); + }, __("Create") ); } @@ -376,7 +380,9 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( if (flt(doc.per_billed, 2) < 100) this.frm.add_custom_button( __("Purchase Invoice"), - this.make_purchase_invoice, + () => { + me.make_purchase_invoice(); + }, __("Create") );