fix: incorrect total in sales analytics for customer/item group
diff --git a/erpnext/selling/report/sales_analytics/sales_analytics.py b/erpnext/selling/report/sales_analytics/sales_analytics.py
index 3fc4633..c0c1133 100644
--- a/erpnext/selling/report/sales_analytics/sales_analytics.py
+++ b/erpnext/selling/report/sales_analytics/sales_analytics.py
@@ -225,9 +225,6 @@
def get_rows_by_group(self):
self.get_periodic_data()
out = []
- total_row = {
- "entity": "Total",
- }
for d in reversed(self.group_entries):
row = {
@@ -245,12 +242,10 @@
total += amount
if not total_row.get(scrub(period)): total_row[scrub(period)] = 0
- total_row[scrub(period)] += amount
row["total"] = total
out = [row] + out
- out.append(total_row)
self.data = out
def get_periodic_data(self):