[Minor] Cash Flow report - custom (#15522)
* python 2-3 fix for filter * pass filters while fetching data to financial statement report
This commit is contained in:
parent
90f9f9d3d8
commit
e4c9ac3961
@ -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
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user