salix/db/routines/vn/views/itemShelvingPlacementSupply...

28 lines
769 B
MySQL
Raw Permalink Normal View History

2024-08-20 08:06:10 +00:00
CREATE OR REPLACE DEFINER=`vn`@`localhost`
SQL SECURITY DEFINER
VIEW `vn`.`itemShelvingPlacementSupplyStock`
AS SELECT `ish`.`id` AS `itemShelvingFk`,
`ish`.`itemFk` AS `itemFk`,
`ish`.`packing` AS `packing`,
`ish`.`visible` AS `stock`,
`i`.`longName` AS `longName`,
`i`.`size` AS `size`,
`i`.`subName` AS `subName`,
`sh`.`code` AS `shelving`,
`p`.`code` AS `parking`,
`ish`.`created` AS `created`,
IFNULL(`sh`.`priority`, 1) AS `priority`,
`p`.`id` AS `parkingFk`,
`p`.`sectorFk` AS `sectorFk`
FROM (
(
(
`vn`.`itemShelving` `ish`
2024-11-13 08:56:38 +00:00
JOIN `vn`.`shelving` `sh` ON(`sh`.`id` = `ish`.`shelvingFk`)
)
LEFT JOIN `vn`.`parking` `p` ON(`p`.`id` = `sh`.`parkingFk`)
)
JOIN `vn`.`item` `i` ON(`i`.`id` = `ish`.`itemFk`)
)
GROUP BY `ish`.`id`