Merge pull request #49351 from frappe/mergify/bp/version-15-hotfix/pr-49254

fix: show create purchase receipt button in purchase invoice only when update stock is not checked (backport #49254)
This commit is contained in:
Mihir Kandoi
2025-08-27 22:45:29 +05:30
committed by GitHub

View File

@@ -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"),
() => {