From 31c89538bc9d17d75b72975ecc1e3d87fcd2903e Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 23 Oct 2024 08:27:07 +0200 Subject: [PATCH] feat: refs #8119 Requested changes --- db/routines/vn/procedures/itemCampaign_add.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/itemCampaign_add.sql b/db/routines/vn/procedures/itemCampaign_add.sql index ff92f3b25..6291d6895 100644 --- a/db/routines/vn/procedures/itemCampaign_add.sql +++ b/db/routines/vn/procedures/itemCampaign_add.sql @@ -44,7 +44,7 @@ proc: BEGIN FROM sale s JOIN ticket t ON t.id = s.ticketFk JOIN client c ON c.id = t.clientFk - WHERE t.shipped BETWEEN vDateSumFrom AND util.dayEnd(vDateSumTo) + WHERE t.shipped BETWEEN vDateSumFrom AND vDateSumTo AND c.typeFk = 'normal' AND NOT t.isDeleted GROUP BY s.itemFk