Skip to content

Commit 19e054c

Browse files
authored
Merge pull request frappe#40706 from ruthra-kumar/typeerror_in_purchase_order
fix: typeerror on Purchase Order form UI
2 parents c2470cc + 57f67fa commit 19e054c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Diff for: erpnext/buying/doctype/purchase_order/purchase_order.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,9 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends (
350350
if (flt(doc.per_received, 2) < 100 && allow_receipt) {
351351
this.frm.add_custom_button(
352352
__("Purchase Receipt"),
353-
this.make_purchase_receipt,
353+
() => {
354+
me.make_purchase_receipt();
355+
},
354356
__("Create")
355357
);
356358
if (doc.is_subcontracted) {
@@ -367,7 +369,9 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends (
367369
} else {
368370
this.frm.add_custom_button(
369371
__("Subcontracting Order"),
370-
this.make_subcontracting_order,
372+
() => {
373+
me.make_subcontracting_order();
374+
},
371375
__("Create")
372376
);
373377
}
@@ -376,7 +380,9 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends (
376380
if (flt(doc.per_billed, 2) < 100)
377381
this.frm.add_custom_button(
378382
__("Purchase Invoice"),
379-
this.make_purchase_invoice,
383+
() => {
384+
me.make_purchase_invoice();
385+
},
380386
__("Create")
381387
);
382388

0 commit comments

Comments
 (0)