Merge pull request #40706 from ruthra-kumar/typeerror_in_purchase_order

fix: typeerror on Purchase Order form UI
This commit is contained in:
ruthra kumar
2024-03-27 14:38:49 +05:30
committed by GitHub

View File

@@ -350,7 +350,9 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends (
if (flt(doc.per_received, 2) < 100 && allow_receipt) { if (flt(doc.per_received, 2) < 100 && allow_receipt) {
this.frm.add_custom_button( this.frm.add_custom_button(
__("Purchase Receipt"), __("Purchase Receipt"),
this.make_purchase_receipt, () => {
me.make_purchase_receipt();
},
__("Create") __("Create")
); );
if (doc.is_subcontracted) { if (doc.is_subcontracted) {
@@ -367,7 +369,9 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends (
} else { } else {
this.frm.add_custom_button( this.frm.add_custom_button(
__("Subcontracting Order"), __("Subcontracting Order"),
this.make_subcontracting_order, () => {
me.make_subcontracting_order();
},
__("Create") __("Create")
); );
} }
@@ -376,7 +380,9 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends (
if (flt(doc.per_billed, 2) < 100) if (flt(doc.per_billed, 2) < 100)
this.frm.add_custom_button( this.frm.add_custom_button(
__("Purchase Invoice"), __("Purchase Invoice"),
this.make_purchase_invoice, () => {
me.make_purchase_invoice();
},
__("Create") __("Create")
); );