#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 1 additions and 0 deletions

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