Skip to content

Commit

Permalink
Merge pull request #45675 from frappe/mergify/bp/version-15-hotfix/pr…
Browse files Browse the repository at this point in the history
…-45631

fix: Do not check for cancelled invoices (backport #45631)
  • Loading branch information
ruthra-kumar authored Feb 3, 2025
2 parents 0d94eba + 84638f5 commit 16a80cc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions erpnext/accounts/doctype/subscription/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,9 +634,7 @@ def get_current_invoice(self) -> Document | None:
"""
invoice = frappe.get_all(
self.invoice_document_type,
{
"subscription": self.name,
},
{"subscription": self.name, "docstatus": ("<", 2)},
limit=1,
order_by="to_date desc",
pluck="name",
Expand Down Expand Up @@ -675,6 +673,7 @@ def has_outstanding_invoice(self) -> int:
self.invoice_document_type,
{
"subscription": self.name,
"docstatus": 1,
"status": ["!=", "Paid"],
},
)
Expand Down

0 comments on commit 16a80cc

Please sign in to comment.