From 93de845b6764da67a78386e2fc8496918884a740 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Fri, 16 Feb 2024 07:03:05 +0100 Subject: [PATCH] refs#5890 feat: delete trigger and modify getTickets --- back/methods/collection/getTickets.js | 2 +- .../vn/triggers/itemShelvingSale_afterInsert.sql | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 db/routines/vn/triggers/itemShelvingSale_afterInsert.sql diff --git a/back/methods/collection/getTickets.js b/back/methods/collection/getTickets.js index 50117b954..fc77d4af3 100644 --- a/back/methods/collection/getTickets.js +++ b/back/methods/collection/getTickets.js @@ -68,7 +68,7 @@ module.exports = Self => { LEFT JOIN saleGroup sg ON sg.id = sgd.saleGroupFk LEFT JOIN parking p2 ON p2.id = sg.parkingFk JOIN item i ON i.id = s.itemFk - LEFT JOIN itemShelvingSale iss ON iss.saleFk = s.id + JOIN itemShelvingSale iss ON iss.saleFk = s.id LEFT JOIN itemShelving ish ON ish.id = iss.itemShelvingFk LEFT JOIN shelving sh ON sh.code = ish.shelvingFk LEFT JOIN parking p ON p.id = sh.parkingFk diff --git a/db/routines/vn/triggers/itemShelvingSale_afterInsert.sql b/db/routines/vn/triggers/itemShelvingSale_afterInsert.sql deleted file mode 100644 index 63ca893bd..000000000 --- a/db/routines/vn/triggers/itemShelvingSale_afterInsert.sql +++ /dev/null @@ -1,12 +0,0 @@ -DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemShelvingSale_afterInsert` - AFTER INSERT ON `itemShelvingSale` - FOR EACH ROW -BEGIN - - UPDATE vn.sale - SET isPicked = TRUE - WHERE id = NEW.saleFk; - -END$$ -DELIMITER ;