From 59b3277696d834debaf273b97916d4ea60c51060 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 10 Jul 2023 20:34:32 +0530 Subject: [PATCH] fix: also check on_hold (#35910) fix: also check on_hold (#35910) (cherry picked from commit 5aa02b8571efdc1710a9b3069a18a80ed17856a2) Co-authored-by: RJPvT <48353029+RJPvT@users.noreply.github.com> --- erpnext/accounts/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 9edeb854e3e..7ab1b1c2768 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -847,7 +847,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)