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`.`itemSearch`
|
|
|
|
AS SELECT `s`.`itemFk` AS `itemFk`,
|
|
|
|
`s`.`concept` AS `concept`,
|
|
|
|
`s`.`quantity` AS `quantity`,
|
|
|
|
`t`.`nickname` AS `nickname`,
|
|
|
|
`t`.`shipped` AS `shipped`
|
|
|
|
FROM (
|
|
|
|
(
|
|
|
|
`vn`.`sale` `s`
|
|
|
|
JOIN `vn`.`ticket` `t` ON(`t`.`id` = `s`.`ticketFk`)
|
|
|
|
)
|
|
|
|
JOIN `vn`.`warehouse` `w` ON(`w`.`id` = `t`.`warehouseFk`)
|
|
|
|
)
|
|
|
|
WHERE `t`.`shipped` BETWEEN `util`.`yesterday`() AND `util`.`tomorrow`()
|
|
|
|
AND `w`.`name` IN ('VNH', 'Floramondo')
|