From 2c3b5cd7d26507f6254f16e7cdd72b5d7de1e877 Mon Sep 17 00:00:00 2001 From: Xor290 Date: Fri, 12 Jun 2026 14:47:04 +0200 Subject: [PATCH] chore: build --- backend/gestion/handlers/stats.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/gestion/handlers/stats.go b/backend/gestion/handlers/stats.go index 7e8444cc..8d402172 100644 --- a/backend/gestion/handlers/stats.go +++ b/backend/gestion/handlers/stats.go @@ -117,7 +117,7 @@ func GetAdminStats(c *gin.Context) { ci.produit AS name, SUM(ci.quantite) AS total_quantity, COUNT(DISTINCT ci.command_id) AS order_count, - SUM(ci.prix * ci.quantite) AS revenue, + SUM(ci.prix) AS revenue, COALESCE(p.category, '') AS category, COALESCE(cat.color, '#7c3aed') AS category_color FROM command_items ci @@ -156,7 +156,7 @@ func GetAdminStats(c *gin.Context) { ci.quantite AS quantity, COUNT(DISTINCT ci.command_id) AS order_count, SUM(ci.quantite) AS total_sold, - SUM(ci.prix * ci.quantite) AS revenue, + SUM(ci.prix) AS revenue, COALESCE(cat.color, '#7c3aed') AS category_color FROM command_items ci JOIN commandes c ON c.id = ci.command_id