2024-05-27 09:33:04 +00:00
|
|
|
DELIMITER $$
|
2024-08-20 08:06:10 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemShelvingSale_afterInsert`
|
2024-05-27 09:55:42 +00:00
|
|
|
AFTER INSERT ON `itemShelvingSale`
|
2024-05-27 09:33:04 +00:00
|
|
|
FOR EACH ROW
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
UPDATE sale s
|
2024-06-11 16:43:26 +00:00
|
|
|
JOIN operator o ON o.workerFk = account.myUser_getId()
|
2024-06-20 16:18:03 +00:00
|
|
|
SET s.isPicked = IF(o.isOnReservationMode, s.isPicked, TRUE)
|
2024-06-11 16:43:26 +00:00
|
|
|
WHERE id = NEW.saleFk;
|
2024-05-27 09:33:04 +00:00
|
|
|
END$$
|
|
|
|
DELIMITER ;
|