Hotfix ticketStateUpdate to ticket_setState
This commit is contained in:
parent
82118ae933
commit
5bcdc57978
|
@ -18,7 +18,7 @@ proc:BEGIN
|
||||||
WHERE ticketFk = vTicketFk;
|
WHERE ticketFk = vTicketFk;
|
||||||
|
|
||||||
SELECT count(*) INTO vTotalLines
|
SELECT count(*) INTO vTotalLines
|
||||||
FROM vn.sale s
|
FROM sale s
|
||||||
WHERE s.ticketFk = vTicketFk;
|
WHERE s.ticketFk = vTicketFk;
|
||||||
|
|
||||||
SET vHasFullProblem = (vTotalLines = vProblemLines);
|
SET vHasFullProblem = (vTotalLines = vProblemLines);
|
||||||
|
@ -26,7 +26,7 @@ proc:BEGIN
|
||||||
-- Ticket completo
|
-- Ticket completo
|
||||||
IF vHasFullProblem THEN
|
IF vHasFullProblem THEN
|
||||||
|
|
||||||
UPDATE vn.ticket
|
UPDATE ticket
|
||||||
SET landed = vDated + INTERVAL 1 DAY,
|
SET landed = vDated + INTERVAL 1 DAY,
|
||||||
shipped = vDated,
|
shipped = vDated,
|
||||||
nickname = CONCAT('(',DAY(util.VN_CURDATE()),') ', nickname )
|
nickname = CONCAT('(',DAY(util.VN_CURDATE()),') ', nickname )
|
||||||
|
@ -40,7 +40,7 @@ proc:BEGIN
|
||||||
-- Ticket a futuro existe
|
-- Ticket a futuro existe
|
||||||
IF vTicketFutureFk THEN
|
IF vTicketFutureFk THEN
|
||||||
|
|
||||||
UPDATE vn.sale s
|
UPDATE sale s
|
||||||
JOIN tmp.salesToSplit ss ON s.id = ss.saleFk
|
JOIN tmp.salesToSplit ss ON s.id = ss.saleFk
|
||||||
SET s.ticketFk = vTicketFutureFk,
|
SET s.ticketFk = vTicketFutureFk,
|
||||||
s.concept = CONCAT('(s) ', s.concept)
|
s.concept = CONCAT('(s) ', s.concept)
|
||||||
|
@ -52,10 +52,10 @@ proc:BEGIN
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
-- Ticket nuevo
|
-- Ticket nuevo
|
||||||
CALL vn.ticket_Clone(vTicketFk, vTicketFutureFk);
|
CALL ticket_Clone(vTicketFk, vTicketFutureFk);
|
||||||
|
|
||||||
UPDATE vn.ticket t
|
UPDATE ticket t
|
||||||
JOIN vn.productionConfig pc
|
JOIN productionConfig pc
|
||||||
SET t.routeFk = IF(t.shipped = vDated , t.routeFk, NULL),
|
SET t.routeFk = IF(t.shipped = vDated , t.routeFk, NULL),
|
||||||
t.landed = vDated + INTERVAL 1 DAY,
|
t.landed = vDated + INTERVAL 1 DAY,
|
||||||
t.shipped = vDated,
|
t.shipped = vDated,
|
||||||
|
@ -63,7 +63,7 @@ proc:BEGIN
|
||||||
t.zoneFk = pc.defaultZone
|
t.zoneFk = pc.defaultZone
|
||||||
WHERE t.id = vTicketFutureFk;
|
WHERE t.id = vTicketFutureFk;
|
||||||
|
|
||||||
UPDATE vn.sale s
|
UPDATE sale s
|
||||||
JOIN tmp.salesToSplit sts ON sts.saleFk = s.id
|
JOIN tmp.salesToSplit sts ON sts.saleFk = s.id
|
||||||
SET s.ticketFk = vTicketFutureFk,
|
SET s.ticketFk = vTicketFutureFk,
|
||||||
s.concept = CONCAT('(s) ', s.concept)
|
s.concept = CONCAT('(s) ', s.concept)
|
||||||
|
|
Loading…
Reference in New Issue