#7867 - avoid deactivate user when is supplier #2860

Merged
jsegarra merged 2 commits from hotfix_nightTask_supplierDisable into master 2024-08-14 05:52:14 +00:00
1 changed files with 3 additions and 0 deletions
Showing only changes of commit a178c285c0 - Show all commits

View File

@ -21,6 +21,9 @@ 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 u.role NOT IN (
SELECT id FROM `role` r WHERE r.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