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 42a6358cdfe..b90f922d82b 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):