diff --git a/frappe/public/js/frappe/utils/utils.js b/frappe/public/js/frappe/utils/utils.js index b75d2981a5..7c4bbbf2da 100644 --- a/frappe/public/js/frappe/utils/utils.js +++ b/frappe/public/js/frappe/utils/utils.js @@ -952,11 +952,11 @@ Object.assign(frappe.utils, { return ""; } else if (values.length > 0) { if (column.column.fieldtype == "Percent" || type === "mean") { - return values.reduce((a, b) => a + flt(b)) / values.length; + return values.reduce((a, b) => flt(a) + flt(b)) / values.length; } else if (column.column.fieldtype == "Int") { - return values.reduce((a, b) => a + cint(b)); + return values.reduce((a, b) => cint(a) + cint(b)); } else if (frappe.model.is_numeric_field(column.column.fieldtype)) { - return values.reduce((a, b) => a + flt(b)); + return values.reduce((a, b) => flt(a) + flt(b)); } else { return null; }