[Minor] Cash Flow report - custom (#15522)
* python 2-3 fix for filter
* pass filters while fetching data to financial statement report
diff --git a/erpnext/accounts/report/cash_flow/custom_cash_flow.py b/erpnext/accounts/report/cash_flow/custom_cash_flow.py
index d0b283a..8566f53 100644
--- a/erpnext/accounts/report/cash_flow/custom_cash_flow.py
+++ b/erpnext/accounts/report/cash_flow/custom_cash_flow.py
@@ -10,7 +10,7 @@
def get_mapper_for(mappers, position):
- mapper_list = filter(lambda x: x['position'] == position, mappers)
+ mapper_list = list(filter(lambda x: x['position'] == position, mappers))
return mapper_list[0] if mapper_list else []
@@ -345,13 +345,13 @@
# compute net profit / loss
income = get_data(
- filters.company, "Income", "Credit", period_list,
+ filters.company, "Income", "Credit", period_list, filters=filters,
accumulated_values=filters.accumulated_values, ignore_closing_entries=True,
ignore_accumulated_values_for_fy=True
)
expense = get_data(
- filters.company, "Expense", "Debit", period_list,
+ filters.company, "Expense", "Debit", period_list, filters=filters,
accumulated_values=filters.accumulated_values, ignore_closing_entries=True,
ignore_accumulated_values_for_fy=True
)