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`.`itemEntryIn`
|
|
|
|
AS SELECT `t`.`warehouseInFk` AS `warehouseInFk`,
|
|
|
|
`t`.`landed` AS `landed`,
|
|
|
|
`b`.`itemFk` AS `itemFk`,
|
|
|
|
`b`.`quantity` AS `quantity`,
|
|
|
|
`t`.`isReceived` AS `isReceived`,
|
2024-11-11 13:19:11 +00:00
|
|
|
`t`.`isRaid` AS `isVirtualStock`,
|
2024-01-15 11:31:03 +00:00
|
|
|
`e`.`id` AS `entryFk`
|
|
|
|
FROM (
|
|
|
|
(
|
|
|
|
`vn`.`buy` `b`
|
|
|
|
JOIN `vn`.`entry` `e` ON(`b`.`entryFk` = `e`.`id`)
|
|
|
|
)
|
|
|
|
JOIN `vn`.`travel` `t` ON(`e`.`travelFk` = `t`.`id`)
|
|
|
|
)
|
|
|
|
WHERE `e`.`isExcludedFromAvailable` = 0
|
|
|
|
AND `b`.`quantity` <> 0
|