fix: defaulter filter correct sql #2779

Merged
alexm merged 1 commits from 6943-fix_defaulter_filter into dev 2024-07-23 12:47:53 +00:00
1 changed files with 1 additions and 0 deletions

View File

@ -85,6 +85,7 @@ module.exports = Self => {
LEFT JOIN (
SELECT MAX(started), clientFk, finished
FROM recovery
GROUP BY clientFk
Review
@jgallego aixina valdria, pq per a cada client traguem la maxima https://gitea.verdnatura.es/verdnatura/salix/pulls/2754/files#issuecomment-58376
) r ON r.clientFk = c.id
LEFT JOIN workerDepartment wd ON wd.workerFk = u.id
JOIN department dp ON dp.id = wd.departmentFk