#7896 - 24.36 Dev To Test #2884

Merged
jsegarra merged 118 commits from dev into test 2024-08-27 10:32:53 +00:00
6 changed files with 15 additions and 5 deletions
Showing only changes of commit 8d35e95731 - Show all commits

View File

@ -3,4 +3,5 @@ apps:
name: salix-back
instances: 1
max_restarts: 0
autorestart: false
node_args: --tls-min-v1.0 --openssl-legacy-provider

View File

@ -21,6 +21,7 @@ BEGIN
AND a.id IS NULL
AND u.active
AND c.created < util.VN_CURDATE() - INTERVAL vMonths MONTH
AND NOT u.role = (SELECT id FROM `role` WHERE name = 'supplier')
AND u.id NOT IN (
SELECT DISTINCT c.id
FROM client c

View File

@ -12,7 +12,7 @@ BEGIN
DECLARE vSaleFk INT;
DECLARE vSectorFk INT;
DECLARE vSales CURSOR FOR
SELECT s.id
SELECT DISTINCT s.id
FROM sectorCollectionSaleGroup sc
JOIN saleGroupDetail sg ON sg.saleGroupFk = sc.saleGroupFk
JOIN sale s ON sg.saleFk = s.id

View File

@ -38,7 +38,7 @@
</vn-icon-button>
</div>
<a
ui-sref="worker.card.summary({id: $root.user.id})"
ng-click="$ctrl.redirect($root.user.id)"
class="vn-button colored"
translate>
My account

View File

@ -82,6 +82,9 @@ class Controller {
? {id: $search}
: {bank: {like: '%' + $search + '%'}};
}
async redirect(id) {
window.location.href = await this.vnConfig.vnApp.getUrl(`worker/${id}`);
}
}
Controller.$inject = ['$scope', '$translate', 'vnConfig', 'vnAuth', 'vnToken'];

View File

@ -83,9 +83,14 @@ module.exports = Self => {
LEFT JOIN account.user u ON u.id = c.salesPersonFk
LEFT JOIN account.user uw ON uw.id = co.workerFk
LEFT JOIN (
SELECT MAX(started), clientFk, finished
FROM recovery
GROUP BY clientFk
SELECT r1.started, r1.clientFk, r1.finished
FROM recovery r1
JOIN (
SELECT MAX(started) AS maxStarted, clientFk
FROM recovery
GROUP BY clientFk
) r2 ON r1.clientFk = r2.clientFk
AND r1.started = r2.maxStarted
) r ON r.clientFk = c.id
LEFT JOIN workerDepartment wd ON wd.workerFk = u.id
JOIN department dp ON dp.id = wd.departmentFk