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>
This commit is contained in:
Anupam Kumar 2020-04-16 10:16:35 +05:30 committed by GitHub
parent a5daf8ffa1
commit 8a2c85c687
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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") {