From 3b409af9a0621a308b941bb1e58c60cb0307a708 Mon Sep 17 00:00:00 2001 From: Dirk van der Laarse Date: Wed, 7 Jun 2023 18:31:44 +0200 Subject: [PATCH] fix: exclude disabled customers when fetching customers on process statement of accounts (#35539) fix: exclude disabled when fetching customers --- .../process_statement_of_accounts.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py index b36f33be3b..c9d03012b8 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py @@ -158,7 +158,10 @@ def get_customers_based_on_territory_or_customer_group(customer_collection, coll return frappe.get_list( "Customer", fields=["name", "customer_name", "email_id"], - filters=[[fields_dict[customer_collection], "IN", selected]], + filters=[ + ["disabled", "=", 0], + [fields_dict[customer_collection], "IN", selected] + ], )