From bac07fe265c0393bbbe329bea42e63b6ae5d270f Mon Sep 17 00:00:00 2001 From: robert Date: Thu, 23 May 2024 12:41:59 +0200 Subject: [PATCH] feat: refs #6822 --- db/routines/vn/procedures/entryTransfer.sql | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/db/routines/vn/procedures/entryTransfer.sql b/db/routines/vn/procedures/entryTransfer.sql index b0d3c98e3..64c9b7680 100644 --- a/db/routines/vn/procedures/entryTransfer.sql +++ b/db/routines/vn/procedures/entryTransfer.sql @@ -12,13 +12,7 @@ BEGIN DECLARE vWarehouseFk INT; -- Clonar la entrada - CALL entry_clone(vOriginalEntry); - - SELECT id INTO vNewEntryFk - FROM entry - WHERE clonedFrom = vOriginalEntry - ORDER BY dated DESC - LIMIT 1; + CALL entry_clone(vOriginalEntry,vNewEntryFk); -- Hay que crear un nuevo travel, con salida hoy y llegada maƱana y asignar la entrada nueva al nuevo travel. INSERT INTO travel(