fix: refs #6861 getTickets #3106

Merged
sergiodt merged 3 commits from 6861-itemShelvingSaleTickets into master 2024-10-16 05:58:53 +00:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 12abca0a2d - Show all commits

View File

@ -6,7 +6,7 @@ BEGIN
UPDATE sale s
JOIN operator o ON o.workerFk = account.myUser_getId()
JOIN sector se ON se.id = o.sectorFk
sergiodt marked this conversation as resolved
Review

SET s.isPicked = IF(IFNULL(se.isOnReservationMode, o.isOnReservationMode), s.isPicked, TRUE)

Aixina és més fàcil

SET s.isPicked = IF(IFNULL(se.isOnReservationMode, o.isOnReservationMode), s.isPicked, TRUE) Aixina és més fàcil
SET s.isPicked = IF((se.isOnReservationMode IS NULL AND o.isOnReservationMode) OR se.isOnReservationMode, s.isPicked, TRUE)
WHERE id = NEW.saleFk;
SET s.isPicked = IF(IFNULL(se.isOnReservationMode, o.isOnReservationMode), s.isPicked, TRUE)
WHERE s.id = NEW.saleFk;
END$$
DELIMITER ;