fix: refs #7355 remove and tests accounts #2850
|
@ -3,4 +3,5 @@ apps:
|
|||
name: salix-back
|
||||
instances: 1
|
||||
max_restarts: 0
|
||||
autorestart: false
|
||||
node_args: --tls-min-v1.0 --openssl-legacy-provider
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
</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
|
||||
|
|
|
@ -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'];
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue