refactor: refs #7146 fix branch conflict
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Ivan Mas 2024-11-25 13:36:18 +01:00
parent 53f0d395aa
commit 25114ff204
1 changed files with 3 additions and 1 deletions

View File

@ -16,7 +16,8 @@ BEGIN
a.nickname,
sub2.itemPackingTypeConcat,
est.code,
es.isScanned
es2.isScanned,
es2.scanOrder
FROM expedition e
JOIN ticket t ON t.id = e.ticketFk
JOIN ticketState ts ON ts.ticketFk = e.ticketFk
@ -38,6 +39,7 @@ BEGIN
SELECT MAX(id)
FROM expeditionState es
WHERE expeditionFk = e.id)
LEFT JOIN expeditionState es2 ON es2.id = es.id
WHERE t.routeFk = vRouteFk AND e.freightItemFk <> FALSE
ORDER BY r.dated, t.priority DESC;
END$$