diff --git a/frappe/desk/query_report.py b/frappe/desk/query_report.py index adfc4e4692..40f049d2ad 100644 --- a/frappe/desk/query_report.py +++ b/frappe/desk/query_report.py @@ -475,6 +475,11 @@ def add_total_row(result, columns, meta=None, is_tree=False, parent_field=None): if i >= len(row): continue cell = row.get(fieldname) if isinstance(row, dict) else row[i] + if fieldtype is None: + if isinstance(cell, int): + fieldtype = "Int" + elif isinstance(cell, float): + fieldtype = "Float" if fieldtype in ["Currency", "Int", "Float", "Percent", "Duration"] and flt(cell): if not (is_tree and row.get(parent_field)): total_row[i] = flt(total_row[i]) + flt(cell)