From bd171fbd42eb3966712d934168f578dd85a0be75 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Fri, 25 Mar 2022 16:08:51 +0530 Subject: [PATCH] fix: unsupported operand type(s) for +=: 'int' and 'NoneType' (cherry picked from commit 5450542fdb6c36514e71416e8ca32283f9eed91d) --- 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 20f7fcfb1b3..e81e0d73cdb 100644 --- a/erpnext/accounts/report/cash_flow/custom_cash_flow.py +++ b/erpnext/accounts/report/cash_flow/custom_cash_flow.py @@ -5,7 +5,7 @@ import frappe from frappe import _ from frappe.query_builder.functions import Sum -from frappe.utils import add_to_date, get_date_str +from frappe.utils import add_to_date, flt, get_date_str from erpnext.accounts.report.financial_statements import get_columns, get_data, get_period_list from erpnext.accounts.report.profit_and_loss_statement.profit_and_loss_statement import ( @@ -442,8 +442,8 @@ def _get_account_type_based_data(filters, account_names, period_list, accumulate else: gl_sum = 0 - total += gl_sum - data.setdefault(period["key"], gl_sum) + total += flt(gl_sum) + data.setdefault(period["key"], flt(gl_sum)) data["total"] = total return data