hotFix(ticket): refs #7225 fix advanced and movable #2356

Merged
alexm merged 6 commits from 7225-hotFix_ticket_advanced_movable into master 2024-04-25 05:52:40 +00:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit eced03f69b - Show all commits

View File

@ -124,8 +124,8 @@ BEGIN
) dest ON dest.addressFk = origin.addressFk ) dest ON dest.addressFk = origin.addressFk
WHERE origin.hasStock; WHERE origin.hasStock;
DROP TEMPORARY TABLE IF EXISTS DROP TEMPORARY TABLE IF EXISTS
tmp.itemList, tmp.itemList,
tmp.itemMinacum; tmp.itemMinacum;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -38,7 +38,7 @@ BEGIN
s.discount, s.discount,
i.image, i.image,
i.subName, i.subName,
il.stock + IFNULL(im.amount, 0) AS movable IFNULL(il.stock,0) + IFNULL(im.amount, 0) AS movable
FROM ticket t FROM ticket t
JOIN sale s ON s.ticketFk = t.id JOIN sale s ON s.ticketFk = t.id
JOIN item i ON i.id = s.itemFk JOIN item i ON i.id = s.itemFk
@ -48,8 +48,8 @@ BEGIN
WHERE t.id = vTicketFk; WHERE t.id = vTicketFk;
DROP TEMPORARY TABLE IF EXISTS DROP TEMPORARY TABLE IF EXISTS
tmp.itemList, tmp.itemList,
tmp.itemMinacum; tmp.itemMinacum;
END$$ END$$
DELIMITER ; DELIMITER ;