2024-01-15 11:31:03 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost`
|
|
|
|
SQL SECURITY DEFINER
|
|
|
|
VIEW `vn`.`ticketStateToday`
|
|
|
|
AS SELECT `ts`.`ticketFk` AS `ticket`,
|
|
|
|
`ts`.`state` AS `state`,
|
|
|
|
`ts`.`productionOrder` AS `productionOrder`,
|
|
|
|
`ts`.`alertLevel` AS `alertLevel`,
|
2024-01-25 16:33:54 +00:00
|
|
|
`ts`.`userFk` AS `worker`,
|
2024-01-15 11:31:03 +00:00
|
|
|
`ts`.`code` AS `code`,
|
|
|
|
`ts`.`updated` AS `updated`,
|
|
|
|
`ts`.`isPicked` AS `isPicked`
|
|
|
|
FROM (
|
|
|
|
`vn`.`ticketState` `ts`
|
|
|
|
JOIN `vn`.`ticket` `t` ON(`t`.`id` = `ts`.`ticketFk`)
|
|
|
|
)
|
|
|
|
WHERE `t`.`shipped` BETWEEN `util`.`VN_CURDATE`() AND `MIDNIGHT`(`util`.`VN_CURDATE`())
|