From 536f7d5ff8f699f80659fa39aa9b9f8bf1f1bc9f Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 27 May 2025 17:27:29 +0530 Subject: [PATCH] fix: handle multiselect filters for tree doctypes in Customer Ledger Summary Report --- .../customer_ledger_summary.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py index 1648166d041..e753bb59fa0 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py @@ -458,9 +458,16 @@ class PartyLedgerSummaryReport: def get_children(doctype, value): - children = get_descendants_of(doctype, value) + if not isinstance(value, list): + value = [d.strip() for d in value.strip().split(",") if d] - return [value, *children] + all_children = [] + + for d in value: + all_children += get_descendants_of(doctype, value) + all_children.append(d) + + return list(set(all_children)) def execute(filters=None):