From caa1681c5fc556836eca5b0d7fc6bf35e26e5317 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 (cherry picked from commit ed550bb63382a97cbbd55d5c90d361a61c26a529) --- 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 17fad2eca43..ad367f3c9cb 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -644,7 +644,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"), () => {