fix: Chart data for monthly periodicity in Cash Flow report (#31039)
fix: Chart data for monthly periodicity in Cash Flow report
diff --git a/erpnext/accounts/report/cash_flow/cash_flow.py b/erpnext/accounts/report/cash_flow/cash_flow.py
index 74926b9..75e983a 100644
--- a/erpnext/accounts/report/cash_flow/cash_flow.py
+++ b/erpnext/accounts/report/cash_flow/cash_flow.py
@@ -262,7 +262,10 @@
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")
]