chore: build

This commit is contained in:
2026-06-13 12:40:44 +02:00
parent 4a67b0cd82
commit 13c09c10c3
8 changed files with 102 additions and 58 deletions
+3 -3
View File
@@ -537,7 +537,7 @@ func GetMyDeliveryStats(c *gin.Context) {
gdb.Raw(`
SELECT DATE(updated_at) AS day,
COUNT(*) AS count,
COALESCE(SUM(total_prix), 0) AS revenue
COALESCE(SUM(total_prix - COALESCE(referral_used, 0)), 0) AS revenue
FROM commandes
WHERE livreur_assign = ?
AND status IN ('livre', 'approved')
@@ -551,7 +551,7 @@ func GetMyDeliveryStats(c *gin.Context) {
SELECT EXTRACT(WEEK FROM updated_at)::int AS week_num,
EXTRACT(YEAR FROM updated_at)::int AS year,
COUNT(*) AS count,
COALESCE(SUM(total_prix), 0) AS revenue
COALESCE(SUM(total_prix - COALESCE(referral_used, 0)), 0) AS revenue
FROM commandes
WHERE livreur_assign = ?
AND status IN ('livre', 'approved')
@@ -565,7 +565,7 @@ func GetMyDeliveryStats(c *gin.Context) {
SELECT EXTRACT(MONTH FROM updated_at)::int AS month_num,
EXTRACT(YEAR FROM updated_at)::int AS year,
COUNT(*) AS count,
COALESCE(SUM(total_prix), 0) AS revenue
COALESCE(SUM(total_prix - COALESCE(referral_used, 0)), 0) AS revenue
FROM commandes
WHERE livreur_assign = ?
AND status IN ('livre', 'approved')