fix: validate on hold purchase invoices in payment entry
This commit is contained in:
parent
b8dc40b7a0
commit
b0f302e579
@ -346,6 +346,12 @@ class PaymentEntry(AccountsController):
|
||||
)
|
||||
)
|
||||
|
||||
if ref_doc.doctype == "Purchase Invoice" and ref_doc.get("on_hold"):
|
||||
frappe.throw(
|
||||
_("{0} {1} is on hold").format(d.reference_doctype, d.reference_name),
|
||||
title=_("Invalid Invoice"),
|
||||
)
|
||||
|
||||
if ref_doc.docstatus != 1:
|
||||
frappe.throw(_("{0} {1} must be submitted").format(d.reference_doctype, d.reference_name))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user