Update payment_request.py
This commit is contained in:
parent
143973166f
commit
59a3012a5c
@ -214,11 +214,10 @@ class PaymentRequest(Document):
|
||||
|
||||
def check_if_payment_entry_exists(self):
|
||||
if self.status == "Paid":
|
||||
payment_entry = frappe.get_all("Payment Entry Reference",
|
||||
if frappe.get_all("Payment Entry Reference",
|
||||
filters={"reference_name": self.reference_name, "docstatus": ["<", 2]},
|
||||
fields=["distinct(parent)"])
|
||||
|
||||
if any(payment_entry):
|
||||
fields=["parent"],
|
||||
limit=1):
|
||||
frappe.throw(_("Payment Entry already exists"), title=_('Error'))
|
||||
|
||||
def make_communication_entry(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user