feat: refs #8119 Minor change
gitea/salix/pipeline/pr-master There was a failure building this commit Details

This commit is contained in:
Guillermo Bonet 2024-10-17 10:21:39 +02:00
parent 41d078aaf1
commit 8ca69d3574
1 changed files with 3 additions and 3 deletions

View File

@ -68,9 +68,9 @@ proc: BEGIN
INSERT INTO itemCampaignQuantity(dated, itemFk, quantity, campaign)
SELECT DATE(s.created),
s.itemFk,
CASE WHEN t.shipped BETWEEN vDateSumFrom AND vDateSumTo
THEN SUM(s.quantity)
END quantity,
SUM(CASE WHEN t.shipped BETWEEN vDateSumFrom AND vDateSumTo
THEN s.quantity
END) quantity,
vCampaign
FROM sale s
JOIN ticket t ON t.id = s.ticketFk