From f3e6f797d5ea31816ca61277a97fb91e2ab8858f Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Sun, 8 Feb 2026 09:49:47 +0530 Subject: [PATCH] fix: adjust total row visibility index calculation based on add_total_row flag --- frappe/public/js/frappe/views/reports/query_report.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/views/reports/query_report.js b/frappe/public/js/frappe/views/reports/query_report.js index 5de5a28434..8693fce7fb 100644 --- a/frappe/public/js/frappe/views/reports/query_report.js +++ b/frappe/public/js/frappe/views/reports/query_report.js @@ -1790,7 +1790,9 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList { // excluding total row index let visible_idx = this.get_visible_indexes(); - const ignore_visible_idx = visible_idx.length === this.data.length - 1; + const ignore_visible_idx = + visible_idx.length === + this.data.length - (this.raw_data.add_total_row ? 1 : 0); visible_idx = ignore_visible_idx ? [] : visible_idx; const args = {