From d9888d51955e8136d0750ad7612ae06aea191467 Mon Sep 17 00:00:00 2001 From: Sudharsanan11 Date: Thu, 25 Dec 2025 13:24:04 +0530 Subject: [PATCH] fix(stock): remove total bar in chart view (cherry picked from commit 7df349844ab27299452b0ab634160404f128be44) --- .../purchase_receipt_trends/purchase_receipt_trends.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.py b/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.py index b62a6ee6fd8..9d313b477a3 100644 --- a/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.py +++ b/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.py @@ -20,6 +20,9 @@ def execute(filters=None): def get_chart_data(data, filters): + def wrap_in_quotes(label): + return f"'{label}'" + if not data: return [] @@ -36,6 +39,9 @@ def get_chart_data(data, filters): data = data[:10] for row in data: + if row[0] == wrap_in_quotes(_("Total")): + continue + labels.append(row[0]) datapoints.append(row[-1])