fix: show create purchase receipt button only when update stock is not checked

This commit is contained in:
anwarpatelnoori
2025-08-20 14:18:35 +00:00
parent 67e57018bc
commit ed550bb633

View File

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