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`.`ticketStateToday`
|
2024-02-15 09:04:15 +00:00
|
|
|
AS SELECT `ts`.`ticketFk` AS `ticketFk`,
|
2024-01-15 11:31:03 +00:00
|
|
|
`ts`.`state` AS `state`,
|
|
|
|
`ts`.`productionOrder` AS `productionOrder`,
|
|
|
|
`ts`.`alertLevel` AS `alertLevel`,
|
2024-02-05 06:30:04 +00:00
|
|
|
`ts`.`userFk` AS `userFk`,
|
2024-01-15 11:31:03 +00:00
|
|
|
`ts`.`code` AS `code`,
|
|
|
|
`ts`.`updated` AS `updated`,
|
|
|
|
`ts`.`isPicked` AS `isPicked`
|
2024-02-15 09:04:15 +00:00
|
|
|
FROM (
|
|
|
|
`vn`.`ticketState` `ts`
|
|
|
|
JOIN `vn`.`ticket` `t` ON(`t`.`id` = `ts`.`ticketFk`)
|
|
|
|
)
|
2024-09-17 14:19:09 +00:00
|
|
|
WHERE `t`.`shipped` BETWEEN `util`.`VN_CURDATE`() AND `util`.`midnight`()
|