From 931c13d8ab1fddfd517568b3f5a456f8de6527a0 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 12 Aug 2024 09:06:24 +0200 Subject: [PATCH] feat: refs #7774 #7774 Changes ticket_cloneWeekly --- db/routines/vn/procedures/ticket_cloneWeekly.sql | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/db/routines/vn/procedures/ticket_cloneWeekly.sql b/db/routines/vn/procedures/ticket_cloneWeekly.sql index d5c9939df..e13e7e677 100644 --- a/db/routines/vn/procedures/ticket_cloneWeekly.sql +++ b/db/routines/vn/procedures/ticket_cloneWeekly.sql @@ -178,10 +178,9 @@ BEGIN IF vLanding IS NULL THEN SELECT IFNULL(d.notificationEmail, e.email) INTO vEmail FROM client c - JOIN worker w ON w.id = c.salesPersonFk - JOIN workerDepartment wd ON wd.workerFk = c.salesPersonFk - JOIN department d ON d.id = wd.departmentFk JOIN account.emailUser e ON e.userFk = c.salesPersonFk + LEFT JOIN workerDepartment wd ON wd.workerFk = c.salesPersonFk + LEFT JOIN department d ON d.id = wd.departmentFk WHERE c.id = vClientFk; SET vSubject = CONCAT('Turnos - No se ha podido clonar correctamente el ticket ',