diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index a5cd6ce6c2a..6ae83d0f00b 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -32,7 +32,8 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend( cur_frm.add_custom_button(__('Receive'), this.make_purchase_receipt).addClass("btn-primary"); if(doc.is_subcontracted==="Yes") { - cur_frm.add_custom_button(__('Transfer Material to Supplier'), this.make_stock_entry); + cur_frm.add_custom_button(__('Transfer Material to Supplier'), + function() { me.make_stock_entry(); }); } }