7152-devToTest_2414 #2228

Merged
alexm merged 636 commits from 7152-devToTest_2414 into test 2024-03-28 08:26:34 +00:00
1 changed files with 5 additions and 5 deletions
Showing only changes of commit b978833a64 - Show all commits

View File

@ -38,11 +38,11 @@ BEGIN
SELECT sm.id, SELECT sm.id,
st.workerFk, st.workerFk,
ROW_NUMBER() OVER(PARTITION BY sm.id ORDER BY s2.`order`) AS rnk ROW_NUMBER() OVER(PARTITION BY sm.id ORDER BY s2.`order`) AS rnk
FROM saleMistake sm FROM vn.saleMistake sm
JOIN saleTracking st ON sm.saleFk = st.saleFk JOIN vn.saleTracking st ON sm.saleFk = st.saleFk
JOIN `state` s2 ON s2.id = st.stateFk JOIN vn.`state` s2 ON s2.id = st.stateFk
JOIN sale s ON s.id = sm.saleFk JOIN vn.sale s ON s.id = sm.saleFk
JOIN ticket t ON t.id = s.ticketFk JOIN vn.ticket t ON t.id = s.ticketFk
WHERE t.shipped BETWEEN vDatedFrom AND vDatedTo WHERE t.shipped BETWEEN vDatedFrom AND vDatedTo
AND s2.code IN ('OK', 'PREVIOUS_PREPARATION', 'PREPARED', 'CHECKED') AND s2.code IN ('OK', 'PREVIOUS_PREPARATION', 'PREPARED', 'CHECKED')
) )