2024-07-22 09:52:42 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn-admin`@`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`
|
|
|
|
JOIN `vn`.`shelving` `sh` ON(`sh`.`code` = `ish`.`shelvingFk`)
|
|
|
|
)
|
|
|
|
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`)
|
|
|
|
)
|