refs #6915 test_master24_8 #2067

Merged
alexm merged 561 commits from test_master24_8 into master 2024-02-22 07:31:34 +00:00
1 changed files with 37 additions and 0 deletions
Showing only changes of commit 6a94a48a9d - Show all commits

View File

@ -1 +1,38 @@
ALTER TABLE vn.sectorType CHANGE description code varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL; ALTER TABLE vn.sectorType CHANGE description code varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL;
-- Si no pongo lo de bajo da error en la view vn.itemShelvingAvailable
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn`.`itemShelvingStock`
AS SELECT `ish`.`itemFk` AS `itemFk`,
sum(`ish`.`visible`) AS `visible`,
min(`ish`.`packing`) AS `packing`,
min(`ish`.`grouping`) AS `grouping`,
`s`.`description` AS `sector`,
sum(`ish`.`visible`) AS `visibleOriginal`,
0 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`,
`st`.`code` = 'previousPrepared' AS `isPreviousPrepared`
FROM (
(
(
(
`vn`.`itemShelving` `ish`
LEFT JOIN `vn`.`shelving` `sh` ON(`sh`.`code` = `ish`.`shelvingFk`)
)
LEFT JOIN `vn`.`parking` `p` ON(`p`.`id` = `sh`.`parkingFk`)
)
LEFT JOIN `vn`.`sector` `s` ON(`s`.`id` = `p`.`sectorFk`)
)
LEFT JOIN `vn`.`sectorType` `st` ON(`st`.`id` = `s`.`typeFk`)
)
WHERE `ish`.`visible` <> 0
AND `p`.`sectorFk` <> 0
GROUP BY `ish`.`itemFk`,
`p`.`sectorFk`;