From ed550bb63382a97cbbd55d5c90d361a61c26a529 Mon Sep 17 00:00:00 2001 From: anwarpatelnoori Date: Wed, 20 Aug 2025 14:18:35 +0000 Subject: [PATCH] fix: show create purchase receipt button only when update stock is not checked --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index bff7ee3ff56..3898636a051 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -656,7 +656,7 @@ frappe.ui.form.on("Purchase Invoice", { }, add_custom_buttons: function (frm) { - if (frm.doc.docstatus == 1 && frm.doc.per_received < 100) { + if (frm.doc.docstatus == 1 && frm.doc.per_received < 100 && frm.doc.update_stock == 0) { frm.add_custom_button( __("Purchase Receipt"), () => {