2024-08-20 08:06:10 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost`
|
2024-01-15 11:31:03 +00:00
|
|
|
SQL SECURITY DEFINER
|
|
|
|
VIEW `vn`.`itemShelvingStockFull`
|
|
|
|
AS SELECT `ish`.`itemFk` AS `itemFk`,
|
|
|
|
`ish`.`visible` AS `quantity`,
|
|
|
|
`ish`.`packing` AS `packing`,
|
|
|
|
`ish`.`grouping` AS `grouping`,
|
|
|
|
`s`.`description` AS `sector`,
|
|
|
|
`issr`.`removed` AS `removed`,
|
|
|
|
`p`.`sectorFk` AS `sectorFk`,
|
|
|
|
`s`.`warehouseFk` AS `warehouseFk`,
|
|
|
|
`ish`.`shelvingFk` AS `shelvingFk`,
|
|
|
|
`p`.`code` AS `parkingCode`,
|
|
|
|
`sh`.`parkingFk` AS `parkingFk`,
|
|
|
|
`ish`.`id` AS `itemShelvingFk`,
|
|
|
|
`ish`.`created` AS `created`
|
|
|
|
FROM (
|
|
|
|
(
|
|
|
|
(
|
|
|
|
(
|
|
|
|
`vn`.`itemShelving` `ish`
|
2024-11-13 08:56:38 +00:00
|
|
|
JOIN `vn`.`shelving` `sh` ON(`sh`.`id` = `ish`.`shelvingFk`)
|
2024-01-15 11:31:03 +00:00
|
|
|
)
|
|
|
|
JOIN `vn`.`parking` `p` ON(`p`.`id` = `sh`.`parkingFk`)
|
|
|
|
)
|
|
|
|
JOIN `vn`.`sector` `s` ON(`s`.`id` = `p`.`sectorFk`)
|
|
|
|
)
|
|
|
|
LEFT JOIN `vn`.`itemShelvingStockRemoved` `issr` ON(`issr`.`itemShelvingFk` = `ish`.`id`)
|
|
|
|
)
|