DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemShelving_afterInsert`
	AFTER INSERT ON `itemShelving`
	FOR EACH ROW
BEGIN 	
	
	UPDATE sale s
		JOIN operator o ON o.workerFk = account.myUser_getId()
		SET isPicked = IF(o.isOnReservationMode,  isPicked, TRUE)		
        WHERE id = NEW.saleFk;
END$$
DELIMITER ;