chore: build

This commit is contained in:
2026-06-12 14:47:04 +02:00
parent 49d7c6506b
commit 2c3b5cd7d2
+2 -2
View File
@@ -117,7 +117,7 @@ func GetAdminStats(c *gin.Context) {
ci.produit AS name, ci.produit AS name,
SUM(ci.quantite) AS total_quantity, SUM(ci.quantite) AS total_quantity,
COUNT(DISTINCT ci.command_id) AS order_count, 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(p.category, '') AS category,
COALESCE(cat.color, '#7c3aed') AS category_color COALESCE(cat.color, '#7c3aed') AS category_color
FROM command_items ci FROM command_items ci
@@ -156,7 +156,7 @@ func GetAdminStats(c *gin.Context) {
ci.quantite AS quantity, ci.quantite AS quantity,
COUNT(DISTINCT ci.command_id) AS order_count, COUNT(DISTINCT ci.command_id) AS order_count,
SUM(ci.quantite) AS total_sold, 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 COALESCE(cat.color, '#7c3aed') AS category_color
FROM command_items ci FROM command_items ci
JOIN commandes c ON c.id = ci.command_id JOIN commandes c ON c.id = ci.command_id