2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-08-20 08:06:10 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingLog_get`(vShelvingFk VARCHAR(10) )
|
2024-01-15 11:31:03 +00:00
|
|
|
BEGIN
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Devuelve el log de los item en cada carro
|
|
|
|
*
|
|
|
|
* @param vShelvingFk Matrícula del carro
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
SELECT isl.itemShelvingFk,
|
|
|
|
isl.created,
|
|
|
|
isl.accion,
|
|
|
|
isl.itemFk,
|
|
|
|
isl.shelvingFk,
|
|
|
|
isl.quantity,
|
|
|
|
isl.visible,
|
|
|
|
isl.available,
|
|
|
|
isl.grouping,
|
|
|
|
isl.packing,
|
|
|
|
isl.stars,
|
|
|
|
item.longName,
|
|
|
|
item.size,
|
|
|
|
item.subName,
|
|
|
|
worker.code,
|
|
|
|
isl.accion
|
|
|
|
FROM item
|
|
|
|
JOIN itemShelvingLog isl ON item.id = isl.itemFk
|
|
|
|
JOIN worker ON isl.workerFk = worker.id
|
|
|
|
WHERE shelvingFk = vShelvingFk OR isl.itemFk = vShelvingFk
|
|
|
|
ORDER BY isl.created DESC;
|
|
|
|
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|