fix: ensure payment request button only shows for submitted invoices

This commit is contained in:
Abdeali Chharchhoda
2025-12-08 18:51:21 +05:30
parent b58c4edd5d
commit f26ee9e546

View File

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