From 1a3ed42bcde938b670e273f4779ecef36ce9e27b Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 23 Jul 2024 14:37:34 +0200 Subject: [PATCH] fix: defaulter filter correct sql --- modules/client/back/methods/defaulter/filter.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/client/back/methods/defaulter/filter.js b/modules/client/back/methods/defaulter/filter.js index 0bfa7659b..40756b236 100644 --- a/modules/client/back/methods/defaulter/filter.js +++ b/modules/client/back/methods/defaulter/filter.js @@ -85,6 +85,7 @@ module.exports = Self => { LEFT JOIN ( SELECT MAX(started), clientFk, finished FROM recovery + GROUP BY clientFk ) r ON r.clientFk = c.id LEFT JOIN workerDepartment wd ON wd.workerFk = u.id JOIN department dp ON dp.id = wd.departmentFk