fix: refs #7355 remove and tests accounts #2850
|
@ -3,4 +3,5 @@ apps:
|
||||||
name: salix-back
|
name: salix-back
|
||||||
instances: 1
|
instances: 1
|
||||||
max_restarts: 0
|
max_restarts: 0
|
||||||
|
autorestart: false
|
||||||
node_args: --tls-min-v1.0 --openssl-legacy-provider
|
node_args: --tls-min-v1.0 --openssl-legacy-provider
|
||||||
|
|
|
@ -21,6 +21,7 @@ BEGIN
|
||||||
AND a.id IS NULL
|
AND a.id IS NULL
|
||||||
AND u.active
|
AND u.active
|
||||||
AND c.created < util.VN_CURDATE() - INTERVAL vMonths MONTH
|
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 (
|
AND u.id NOT IN (
|
||||||
SELECT DISTINCT c.id
|
SELECT DISTINCT c.id
|
||||||
FROM client c
|
FROM client c
|
||||||
|
|
|
@ -12,7 +12,7 @@ BEGIN
|
||||||
DECLARE vSaleFk INT;
|
DECLARE vSaleFk INT;
|
||||||
DECLARE vSectorFk INT;
|
DECLARE vSectorFk INT;
|
||||||
DECLARE vSales CURSOR FOR
|
DECLARE vSales CURSOR FOR
|
||||||
SELECT s.id
|
SELECT DISTINCT s.id
|
||||||
FROM sectorCollectionSaleGroup sc
|
FROM sectorCollectionSaleGroup sc
|
||||||
JOIN saleGroupDetail sg ON sg.saleGroupFk = sc.saleGroupFk
|
JOIN saleGroupDetail sg ON sg.saleGroupFk = sc.saleGroupFk
|
||||||
JOIN sale s ON sg.saleFk = s.id
|
JOIN sale s ON sg.saleFk = s.id
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
ALTER TABLE hedera.tpvMerchantEnable
|
||||||
|
DROP FOREIGN KEY tpvMerchantEnable_ibfk_1,
|
||||||
|
DROP PRIMARY KEY,
|
||||||
|
ADD CONSTRAINT tpvMerchantEnable_pk PRIMARY KEY (merchantFk),
|
||||||
|
ADD CONSTRAINT tpvMerchantEnable_tpvMerchant_FK
|
||||||
|
FOREIGN KEY (merchantFk)
|
||||||
|
REFERENCES hedera.tpvMerchant(id)
|
||||||
|
ON DELETE RESTRICT
|
||||||
|
ON UPDATE CASCADE;
|
|
@ -38,7 +38,7 @@
|
||||||
</vn-icon-button>
|
</vn-icon-button>
|
||||||
</div>
|
</div>
|
||||||
<a
|
<a
|
||||||
ui-sref="worker.card.summary({id: $root.user.id})"
|
ng-click="$ctrl.redirect($root.user.id)"
|
||||||
class="vn-button colored"
|
class="vn-button colored"
|
||||||
translate>
|
translate>
|
||||||
My account
|
My account
|
||||||
|
|
|
@ -82,6 +82,9 @@ class Controller {
|
||||||
? {id: $search}
|
? {id: $search}
|
||||||
: {bank: {like: '%' + $search + '%'}};
|
: {bank: {like: '%' + $search + '%'}};
|
||||||
}
|
}
|
||||||
|
async redirect(id) {
|
||||||
|
window.location.href = await this.vnConfig.vnApp.getUrl(`worker/${id}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Controller.$inject = ['$scope', '$translate', 'vnConfig', 'vnAuth', 'vnToken'];
|
Controller.$inject = ['$scope', '$translate', 'vnConfig', 'vnAuth', 'vnToken'];
|
||||||
|
|
||||||
|
|
|
@ -83,9 +83,14 @@ module.exports = Self => {
|
||||||
LEFT JOIN account.user u ON u.id = c.salesPersonFk
|
LEFT JOIN account.user u ON u.id = c.salesPersonFk
|
||||||
LEFT JOIN account.user uw ON uw.id = co.workerFk
|
LEFT JOIN account.user uw ON uw.id = co.workerFk
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT MAX(started), clientFk, finished
|
SELECT r1.started, r1.clientFk, r1.finished
|
||||||
FROM recovery
|
FROM recovery r1
|
||||||
GROUP BY clientFk
|
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
|
) r ON r.clientFk = c.id
|
||||||
LEFT JOIN workerDepartment wd ON wd.workerFk = u.id
|
LEFT JOIN workerDepartment wd ON wd.workerFk = u.id
|
||||||
JOIN department dp ON dp.id = wd.departmentFk
|
JOIN department dp ON dp.id = wd.departmentFk
|
||||||
|
|
Loading…
Reference in New Issue