salix/db/routines/vn/procedures/itemShelving_get.sql

28 lines
723 B
MySQL
Raw Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`itemShelving_get`(IN vSelf VARCHAR(8))
BEGIN
/**
* Lista artículos de itemshelving
*
* @param vSelf matrícula del carro
**/
SELECT ish.itemFk item,
IFNULL(i.longName, CONCAT(i.name, ' ', i.size)) description,
ish.visible,
CEIL(ish.visible/ish.packing) stickers,
ish.packing,
ish.grouping,
p.code,
ish.id,
s.priority,
2024-02-09 06:51:51 +00:00
ish.isChecked,
2024-02-09 10:14:30 +00:00
ic.url
FROM itemShelving ish
JOIN item i ON i.id = ish.itemFk
JOIN shelving s ON vSelf = s.code COLLATE utf8_unicode_ci
LEFT JOIN parking p ON s.parkingFk = p.id
2024-02-09 06:51:51 +00:00
JOIN hedera.imageConfig ic
WHERE ish.shelvingFk COLLATE utf8_unicode_ci = vSelf;
END$$
DELIMITER ;