From befcf895342d6d8f57eb3bda53f0d2af9434e9ce Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 13 Aug 2024 11:18:23 +0000 Subject: [PATCH] fix(salix): #7867 apply SQL conventions --- db/routines/vn/procedures/client_userDisable.sql | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/db/routines/vn/procedures/client_userDisable.sql b/db/routines/vn/procedures/client_userDisable.sql index da3c0efa1..779ffd688 100644 --- a/db/routines/vn/procedures/client_userDisable.sql +++ b/db/routines/vn/procedures/client_userDisable.sql @@ -21,9 +21,7 @@ BEGIN AND a.id IS NULL AND u.active AND c.created < util.VN_CURDATE() - INTERVAL vMonths MONTH - AND u.role NOT IN ( - SELECT id FROM `role` r WHERE r.name = 'supplier' - ) + AND NOT u.role = (SELECT id FROM `role` WHERE name = 'supplier') AND u.id NOT IN ( SELECT DISTINCT c.id FROM client c