parent
14798146c7
commit
c2d35b773b
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue