7806_devToTest_2332 #2801

Merged
alexm merged 126 commits from 7806_devToTest_2330 into test 2024-07-30 06:14:09 +00:00
1 changed files with 5 additions and 1 deletions
Showing only changes of commit e66d138091 - Show all commits

View File

@ -72,7 +72,9 @@ module.exports = Self => {
cn.name country,
c.countryFk,
pm.name payMethod,
r.finished IS NULL hasRecovery
r.finished IS NULL hasRecovery,
dp.id departmentFk,
dp.name departmentName
FROM defaulter d
JOIN client c ON c.id = d.clientFk
JOIN country cn ON cn.id = c.countryFk
@ -84,6 +86,8 @@ module.exports = Self => {
SELECT MAX(started), clientFk, finished
FROM recovery
) r ON r.clientFk = c.id
LEFT JOIN workerDepartment wd ON wd.workerFk = u.id
JOIN department dp ON dp.id = wd.departmentFk
WHERE
d.created = ?
AND d.amount > 0