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`.`expeditionTicket_NoBoxes`
|
|
|
|
AS SELECT `t`.`id` AS `ticketFk`,
|
|
|
|
`t`.`warehouseFk` AS `warehouseFk`,
|
|
|
|
`t`.`routeFk` AS `routeFk`,
|
2024-04-30 09:48:18 +00:00
|
|
|
`rs`.`description` AS `description`
|
2024-01-15 11:31:03 +00:00
|
|
|
FROM (
|
|
|
|
(
|
|
|
|
(
|
|
|
|
`vn`.`ticket` `t`
|
|
|
|
LEFT JOIN `vn`.`expedition` `e` ON(`e`.`ticketFk` = `t`.`id`)
|
|
|
|
)
|
|
|
|
JOIN `vn`.`routesMonitor` `rm` ON(`rm`.`routeFk` = `t`.`routeFk`)
|
|
|
|
)
|
2024-05-27 07:07:23 +00:00
|
|
|
JOIN `vn`.`roadmapStop` `rs` ON(`rs`.`id` = `rm`.`roadmapStopFk`)
|
2024-01-15 11:31:03 +00:00
|
|
|
)
|
|
|
|
WHERE `e`.`id` IS NULL
|
2024-04-30 09:48:18 +00:00
|
|
|
AND `rs`.`eta` > `util`.`VN_CURDATE`()
|