fix: also check on_hold (#35910)

This commit is contained in:
RJPvT
2023-07-10 16:13:12 +02:00
committed by GitHub
parent 53f7764c67
commit 5aa02b8571

View File

@@ -810,7 +810,7 @@ def get_held_invoices(party_type, party):
if party_type == "Supplier":
held_invoices = frappe.db.sql(
"select name from `tabPurchase Invoice` where release_date IS NOT NULL and release_date > CURDATE()",
"select name from `tabPurchase Invoice` where on_hold = 1 and release_date IS NOT NULL and release_date > CURDATE()",
as_dict=1,
)
held_invoices = set(d["name"] for d in held_invoices)