From e4c9ac3961708b2c4a45f8f107723bcd0336af72 Mon Sep 17 00:00:00 2001 From: Zarrar Date: Sun, 30 Sep 2018 21:19:01 +0530 Subject: [PATCH] [Minor] Cash Flow report - custom (#15522) * python 2-3 fix for filter * pass filters while fetching data to financial statement report --- erpnext/accounts/report/cash_flow/custom_cash_flow.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/report/cash_flow/custom_cash_flow.py b/erpnext/accounts/report/cash_flow/custom_cash_flow.py index d0b283ad37..8566f5375a 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 @@ from erpnext.accounts.report.profit_and_loss_statement.profit_and_loss_statement 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 @@ def execute(filters=None): # 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 )