refactor: refs #7567 Fix and improvement #2699
|
@ -5,13 +5,12 @@ BEGIN
|
|||
* Elimina movimientos por inactividad
|
||||
*/
|
||||
DECLARE vExpeditionFk INT;
|
||||
DECLARE vBufferToFk INT;
|
||||
DECLARE vBufferFromFk INT;
|
||||
guillermo marked this conversation as resolved
|
||||
DECLARE vStateOutFk INT
|
||||
DEFAULT (SELECT id FROM expeditionState WHERE `description` = 'OUT');
|
||||
DECLARE vDone BOOL DEFAULT FALSE;
|
||||
DECLARE vDone BOOL;
|
||||
DECLARE vSorter CURSOR FOR
|
||||
SELECT m.expeditionFk, m.bufferToFk, m.bufferFromFk
|
||||
SELECT m.expeditionFk, m.bufferFromFk
|
||||
FROM moving m
|
||||
JOIN (
|
||||
SELECT bufferFk, SUM(isActive) hasBox
|
||||
|
@ -32,7 +31,7 @@ BEGIN
|
|||
OPEN vSorter;
|
||||
l: LOOP
|
||||
SET vDone = FALSE;
|
||||
FETCH vSorter INTO vExpeditionFk, vBufferToFk, vBufferFromFk;
|
||||
FETCH vSorter INTO vExpeditionFk, vBufferFromFk;
|
||||
|
||||
IF vDone THEN
|
||||
LEAVE l;
|
||||
|
|
Loading…
Reference in New Issue
esta es gastaba en el correu, pero com l'has llevat, sobra