Updated ticketGetProblems()
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2021-06-03 11:40:39 +02:00
parent e2ec78461a
commit d6dd39d447
1 changed files with 5 additions and 6 deletions

View File

@ -120,7 +120,7 @@ BEGIN
GROUP BY tl.ticketFk
ON DUPLICATE KEY UPDATE
isAvailable = 0;
/*
INSERT INTO tmp.ticketProblems(ticketFk, itemShortage)
SELECT ticketFk, problem
FROM (
@ -142,10 +142,10 @@ BEGIN
AND NOT i.generic
AND CURDATE() = vDate
AND t.warehouseFk = vWarehouse
GROUP BY tl.ticketFk LIMIT 1) sub
GROUP BY tl.ticketFk) sub
ON DUPLICATE KEY UPDATE
itemShortage = sub.problem;
*/
INSERT INTO tmp.ticketProblems(ticketFk, itemDelay)
SELECT ticketFk, problem
FROM (
@ -165,7 +165,7 @@ BEGIN
AND NOT i.generic
AND CURDATE() = vDate
AND t.warehouseFk = vWarehouse
GROUP BY tl.ticketFk LIMIT 1) sub
GROUP BY tl.ticketFk) sub
ON DUPLICATE KEY UPDATE
itemDelay = sub.problem;
END WHILE;
@ -182,7 +182,6 @@ BEGIN
DROP TEMPORARY TABLE
tmp.clientGetDebt,
tmp.ticketList;
tmp.ticketList;
END;;$$
DELIMITER ;