From 8a2c85c6872fe6ec5d0ac2cee7b405d61ef90ece Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Thu, 16 Apr 2020 10:16:35 +0530 Subject: [PATCH] feat: Add new report column property disable_total (#9909) * Adding new column property disable_total * Sider fix * Sider fix Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> --- frappe/public/js/frappe/utils/utils.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/utils/utils.js b/frappe/public/js/frappe/utils/utils.js index a2b03f180e..0f27e97178 100644 --- a/frappe/public/js/frappe/utils/utils.js +++ b/frappe/public/js/frappe/utils/utils.js @@ -675,7 +675,9 @@ Object.assign(frappe.utils, { return __(frappe.utils.to_title_case(route[0], true)); }, report_column_total: function(values, column, type) { - if (values.length > 0) { + if (column.column.disable_total) { + return ''; + } else if (values.length > 0) { if (column.column.fieldtype == "Percent" || type === "mean") { return values.reduce((a, b) => a + flt(b)) / values.length; } else if (column.column.fieldtype == "Int") {