mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
Merge pull request #45631 from deepeshgarg007/current_subscription_invoice
fix: Do not check for cancelled invoices
This commit is contained in:
@@ -634,9 +634,7 @@ class Subscription(Document):
|
|||||||
"""
|
"""
|
||||||
invoice = frappe.get_all(
|
invoice = frappe.get_all(
|
||||||
self.invoice_document_type,
|
self.invoice_document_type,
|
||||||
{
|
{"subscription": self.name, "docstatus": ("<", 2)},
|
||||||
"subscription": self.name,
|
|
||||||
},
|
|
||||||
limit=1,
|
limit=1,
|
||||||
order_by="to_date desc",
|
order_by="to_date desc",
|
||||||
pluck="name",
|
pluck="name",
|
||||||
@@ -675,6 +673,7 @@ class Subscription(Document):
|
|||||||
self.invoice_document_type,
|
self.invoice_document_type,
|
||||||
{
|
{
|
||||||
"subscription": self.name,
|
"subscription": self.name,
|
||||||
|
"docstatus": 1,
|
||||||
"status": ["!=", "Paid"],
|
"status": ["!=", "Paid"],
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user