Compare commits

...

4 Commits

Author SHA1 Message Date
Juanjo Breso 4a73bd0133 Merge branch 'dev' into 5167-kk-warehouseAlias-y-warehouseJoined
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-05 07:40:38 +00:00
David Domenech 045dfa2aa1 Merge pull request 'test' (!1995) from test into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #1995
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-02-05 07:00:34 +00:00
David Domenech ab839431db Merge pull request 'refs #6642' (!1994) from 6642-Refactor-ticketStateToday into test
gitea/salix/pipeline/pr-dev This commit looks good Details
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #1994
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-02-05 06:43:35 +00:00
David Domenech d2fec7beee refs #6642
gitea/salix/pipeline/pr-test This commit looks good Details
2024-02-05 07:30:04 +01:00
2 changed files with 7 additions and 8 deletions

View File

@ -1,16 +1,15 @@
CREATE OR REPLACE DEFINER=`root`@`localhost` CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER SQL SECURITY DEFINER
VIEW `vn`.`ticketStateToday` VIEW `vn`.`ticketStateToday`
AS SELECT `ts`.`ticketFk` AS `ticket`, AS SELECT
`ts`.`ticketFk` AS `ticketFk`,
`ts`.`state` AS `state`, `ts`.`state` AS `state`,
`ts`.`productionOrder` AS `productionOrder`, `ts`.`productionOrder` AS `productionOrder`,
`ts`.`alertLevel` AS `alertLevel`, `ts`.`alertLevel` AS `alertLevel`,
`ts`.`userFk` AS `worker`, `ts`.`userFk` AS `userFk`,
`ts`.`code` AS `code`, `ts`.`code` AS `code`,
`ts`.`updated` AS `updated`, `ts`.`updated` AS `updated`,
`ts`.`isPicked` AS `isPicked` `ts`.`isPicked` AS `isPicked`
FROM ( FROM `ticketState` `ts`
`vn`.`ticketState` `ts` JOIN `ticket` `t` ON `t`.`id` = `ts`.`ticketFk`
JOIN `vn`.`ticket` `t` ON(`t`.`id` = `ts`.`ticketFk`) WHERE `t`.`shipped` BETWEEN `util`.`VN_CURDATE`() AND `MIDNIGHT`(`util`.`VN_CURDATE`());
)
WHERE `t`.`shipped` BETWEEN `util`.`VN_CURDATE`() AND `MIDNIGHT`(`util`.`VN_CURDATE`())

View File

@ -9,7 +9,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost`
lhp.m3, lhp.m3,
dl.minSpeed dl.minSpeed
FROM ticket t FROM ticket t
JOIN ticketStateToday tst ON tst.ticket = t.id JOIN ticketStateToday tst ON tst.ticketFk = t.id
JOIN state s ON s.id = tst.state JOIN state s ON s.id = tst.state
JOIN saleVolume sv ON sv.ticketFk = t.id JOIN saleVolume sv ON sv.ticketFk = t.id
LEFT JOIN lastHourProduction lhp ON lhp.warehouseFk = t.warehouseFk LEFT JOIN lastHourProduction lhp ON lhp.warehouseFk = t.warehouseFk