From f14e9b7502aebde4c77305253cb704730a9accd1 Mon Sep 17 00:00:00 2001 From: xdlumertz Date: Wed, 25 May 2022 11:09:59 -0300 Subject: [PATCH] fix: Chart data for monthly periodicity in Cash Flow report (#31039) fix: Chart data for monthly periodicity in Cash Flow report (cherry picked from commit c5e922c76bced414679fbaad33d9a50d0b2c62f4) --- erpnext/accounts/report/cash_flow/cash_flow.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/cash_flow/cash_flow.py b/erpnext/accounts/report/cash_flow/cash_flow.py index 7929d4aa2aef..ee924f86a6a1 100644 --- a/erpnext/accounts/report/cash_flow/cash_flow.py +++ b/erpnext/accounts/report/cash_flow/cash_flow.py @@ -263,7 +263,10 @@ def get_report_summary(summary_data, currency): def get_chart_data(columns, data): labels = [d.get("label") for d in columns[2:]] datasets = [ - {"name": account.get("account").replace("'", ""), "values": [account.get("total")]} + { + "name": account.get("account").replace("'", ""), + "values": [account.get(d.get("fieldname")) for d in columns[2:]], + } for account in data if account.get("parent_account") == None and account.get("currency") ]