refactor: refs #6453 Minor changes
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Guillermo Bonet 2024-07-11 07:14:02 +02:00
parent 15f580508b
commit 6dc464d26b
1 changed files with 3 additions and 0 deletions

View File

@ -162,6 +162,8 @@ BEGIN
FROM tTicketByItemPackingType;
CASE
WHEN NOT vCountDistinctItemPackingTypeFk THEN
-- Code
WHEN vCountDistinctItemPackingTypeFk = 1 THEN
INSERT INTO tTicketByItemPackingType
SET itemPackingTypeFk = vItemPackingTypeFk,
@ -196,6 +198,7 @@ BEGIN
JOIN sale s ON s.ticketFk = t.id
JOIN item i ON i.id = s.itemFk
WHERE t.shipped = vShipment
AND t.warehouseFk= vWarehouseFk
GROUP BY t.id
HAVING hasSameItemPackingType
)