refactor: refs #7567 Fix and improvement #2699

Merged
guillermo merged 8 commits from 7567-movingCleanFix into dev 2024-08-23 07:13:36 +00:00
1 changed files with 3 additions and 4 deletions
Showing only changes of commit 582fa5faeb - Show all commits

View File

@ -5,13 +5,12 @@ BEGIN
* Elimina movimientos por inactividad * Elimina movimientos por inactividad
*/ */
DECLARE vExpeditionFk INT; DECLARE vExpeditionFk INT;
DECLARE vBufferToFk INT;
DECLARE vBufferFromFk INT; DECLARE vBufferFromFk INT;
guillermo marked this conversation as resolved
Review

esta es gastaba en el correu, pero com l'has llevat, sobra

esta es gastaba en el correu, pero com l'has llevat, sobra
DECLARE vStateOutFk INT DECLARE vStateOutFk INT
DEFAULT (SELECT id FROM expeditionState WHERE `description` = 'OUT'); DEFAULT (SELECT id FROM expeditionState WHERE `description` = 'OUT');
DECLARE vDone BOOL DEFAULT FALSE; DECLARE vDone BOOL;
DECLARE vSorter CURSOR FOR DECLARE vSorter CURSOR FOR
SELECT m.expeditionFk, m.bufferToFk, m.bufferFromFk SELECT m.expeditionFk, m.bufferFromFk
FROM moving m FROM moving m
JOIN ( JOIN (
SELECT bufferFk, SUM(isActive) hasBox SELECT bufferFk, SUM(isActive) hasBox
@ -32,7 +31,7 @@ BEGIN
OPEN vSorter; OPEN vSorter;
l: LOOP l: LOOP
SET vDone = FALSE; SET vDone = FALSE;
FETCH vSorter INTO vExpeditionFk, vBufferToFk, vBufferFromFk; FETCH vSorter INTO vExpeditionFk, vBufferFromFk;
IF vDone THEN IF vDone THEN
LEAVE l; LEAVE l;