refs #6915 test_master24_8 #2067
|
@ -17,19 +17,17 @@ FROM (
|
|||
(
|
||||
(
|
||||
(
|
||||
(
|
||||
`vn`.`ticket` `t`
|
||||
JOIN `vn`.`ticketStateToday` `tst` ON(`tst`.`ticketFk` = `t`.`id`)
|
||||
)
|
||||
JOIN `vn`.`state` `s` ON(`s`.`id` = `tst`.`state`)
|
||||
`vn`.`ticket` `t`
|
||||
JOIN `vn`.`ticketStateToday` `tst` ON(`tst`.`ticketFk` = `t`.`id`)
|
||||
)
|
||||
JOIN `vn`.`saleVolume` `sv` ON(`sv`.`ticketFk` = `t`.`id`)
|
||||
JOIN `vn`.`state` `s` ON(`s`.`id` = `tst`.`state`)
|
||||
)
|
||||
LEFT JOIN `vn`.`lastHourProduction` `lhp` ON(`lhp`.`warehouseFk` = `t`.`warehouseFk`)
|
||||
JOIN `vn`.`saleVolume` `sv` ON(`sv`.`ticketFk` = `t`.`id`)
|
||||
)
|
||||
JOIN `vn`.`warehouse` `w` ON(`w`.`id` = `t`.`warehouseFk`)
|
||||
LEFT JOIN `vn`.`lastHourProduction` `lhp` ON(`lhp`.`warehouseFk` = `t`.`warehouseFk`)
|
||||
)
|
||||
JOIN `vn`.`warehouse` `w` ON(`w`.`id` = `t`.`warehouseFk`)
|
||||
)
|
||||
JOIN `vn`.`warehouseAlias` `wa` ON(`wa`.`id` = `w`.`aliasFk`)
|
||||
) STRAIGHT_JOIN `vn`.`zone` `z` ON(`z`.`id` = `t`.`zoneFk`)
|
||||
)
|
||||
LEFT JOIN `vn`.`zoneClosure` `zc` ON(
|
||||
|
@ -43,6 +41,5 @@ FROM (
|
|||
)
|
||||
)
|
||||
JOIN `vn`.`alertLevel` `al` ON(`al`.`id` = `s`.`alertLevel`)
|
||||
)
|
||||
WHERE `w`.`hasProduction` <> 0
|
||||
AND cast(`t`.`shipped` AS date) = `util`.`VN_CURDATE`()
|
||||
AND cast(`t`.`shipped` AS date) = `util`.`VN_CURDATE`()
|
Loading…
Reference in New Issue