Merge pull request #50991 from frappe/mergify/bp/version-15-hotfix/pr-50970

fix: ensure payment request button only shows for submitted invoices (backport #50970)
This commit is contained in:
Diptanil Saha
2025-12-09 17:21:53 +05:30
committed by GitHub

View File

@@ -126,8 +126,8 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
}
}
if (doc.outstanding_amount > 0 && !cint(doc.is_return) && !doc.on_hold) {
cur_frm.add_custom_button(
if (doc.docstatus == 1 && doc.outstanding_amount > 0 && !cint(doc.is_return) && !doc.on_hold) {
this.frm.add_custom_button(
__("Payment Request"),
function () {
me.make_payment_request();