feat: Avisar cuando no hay posibilidad de fichar refs #7669
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
5500a6f085
commit
d65af6aaaa
|
@ -9,6 +9,8 @@ BEGIN
|
|||
*/
|
||||
DECLARE vLastIn DATETIME ;
|
||||
DECLARE vIsMiddleOdd BOOLEAN ;
|
||||
DECLARE vMailTo VARCHAR(50) DEFAULT NULL;
|
||||
DECLARE vUserName VARCHAR(50) DEFAULT NULL;
|
||||
|
||||
IF (vTimed IS NULL) THEN
|
||||
SET vTimed = util.VN_NOW();
|
||||
|
@ -57,5 +59,18 @@ BEGIN
|
|||
VALUES('in', NULL);
|
||||
END IF;
|
||||
|
||||
IF (SELECT option1 IS NULL AND option2 IS NULL FROM tmp.workerTimeControlDirection) THEN
|
||||
SELECT CONCAT(u.name, '@verdnatura.es'), CONCAT(w.firstName, ' ', w.lastName)
|
||||
INTO vMailTo, vUserName
|
||||
FROM account.user u
|
||||
JOIN worker w ON w.bossFk = u.id
|
||||
WHERE w.id = vWorkerFk;
|
||||
|
||||
CALL mail_insert(
|
||||
vMailTo,
|
||||
vMailTo,
|
||||
'Error al fichar',
|
||||
CONCAT(vUserName, ' tiene problemas para fichar');
|
||||
END IF;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
Loading…
Reference in New Issue