Merge pull request 'fix: refs #6861 getTickets' (!3106) from 6861-itemShelvingSaleTickets into master
Reviewed-on: #3106 Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
This commit is contained in:
commit
15622a3e68
|
@ -62,7 +62,8 @@ module.exports = Self => {
|
|||
p.code parkingCodePrevia,
|
||||
p.pickingOrder pickingOrderPrevia,
|
||||
iss.id itemShelvingSaleFk,
|
||||
iss.isPicked
|
||||
iss.isPicked,
|
||||
iss.itemShelvingFk
|
||||
FROM ticketCollection tc
|
||||
LEFT JOIN collection c ON c.id = tc.collectionFk
|
||||
JOIN sale s ON s.ticketFk = tc.ticketFk
|
||||
|
@ -102,7 +103,8 @@ module.exports = Self => {
|
|||
p.code,
|
||||
p.pickingOrder,
|
||||
iss.id itemShelvingSaleFk,
|
||||
iss.isPicked
|
||||
iss.isPicked,
|
||||
iss.itemShelvingFk
|
||||
FROM sectorCollection sc
|
||||
JOIN sectorCollectionSaleGroup ss ON ss.sectorCollectionFk = sc.id
|
||||
JOIN saleGroup sg ON sg.id = ss.saleGroupFk
|
||||
|
|
|
@ -3,10 +3,10 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemShelvingSale_afterI
|
|||
AFTER INSERT ON `itemShelvingSale`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
|
||||
UPDATE sale s
|
||||
JOIN operator o ON o.workerFk = account.myUser_getId()
|
||||
SET s.isPicked = IF(o.isOnReservationMode, s.isPicked, TRUE)
|
||||
WHERE id = NEW.saleFk;
|
||||
JOIN sector se ON se.id = o.sectorFk
|
||||
SET s.isPicked = IF(IFNULL(se.isOnReservationMode, o.isOnReservationMode), s.isPicked, TRUE)
|
||||
WHERE s.id = NEW.saleFk;
|
||||
END$$
|
||||
DELIMITER ;
|
Loading…
Reference in New Issue