Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-test This commit looks good Details

This commit is contained in:
Alex Moreno 2024-12-17 10:28:26 +01:00
commit 2cd1991a96
4 changed files with 10 additions and 7 deletions

View File

@ -248,6 +248,6 @@
"Payment method is required": "Payment method is required",
"Sales already moved": "Sales already moved",
"Holidays to past days not available": "Holidays to past days not available",
"There are tickets to be invoiced": "There are tickets to be invoiced for this zone, please delete them first",
"Price cannot be blank": "Price cannot be blank"
"Price cannot be blank": "Price cannot be blank",
"There are tickets to be invoiced": "There are tickets to be invoiced"
}

View File

@ -390,7 +390,6 @@
"The web user's email already exists": "El correo del usuario web ya existe",
"Sales already moved": "Ya han sido transferidas",
"The raid information is not correct": "La información de la redada no es correcta",
"There are tickets to be invoiced": "Hay tickets para esta zona, borralos primero",
"No trips found because input coordinates are not connected": "No se encontraron rutas porque las coordenadas de entrada no están conectadas",
"This request is not supported": "Esta solicitud no es compatible",
"Invalid options or too many coordinates": "Opciones invalidas o demasiadas coordenadas",
@ -398,5 +397,6 @@
"An item type with the same code already exists": "Un tipo con el mismo código ya existe",
"Holidays to past days not available": "Las vacaciones a días pasados no están disponibles",
"All tickets have a route order": "Todos los tickets tienen orden de ruta",
"Price cannot be blank": "Price cannot be blank"
"Price cannot be blank": "Price cannot be blank",
"There are tickets to be invoiced": "La zona tiene tickets por facturar"
}

View File

@ -128,7 +128,10 @@ module.exports = Self => {
const account = await models.VnUser.findById(userId, null, myOptions);
const subordinated = await models.VnUser.findById(id, null, myOptions);
const worker = await models.Worker.findById(subordinated.id, null, myOptions);
const departmentBoss = await models.VnUser.findById(worker.bossFk, null, myOptions);
const receiver = await models.EmailUser.findOne({
fields: ['email'],
where: {userFk: worker.bossFk}
}, myOptions);
const url = await Self.app.models.Url.getUrl();
const body = $t('Created absence', {
author: account.nickname,
@ -140,7 +143,7 @@ module.exports = Self => {
await models.Mail.create({
subject: $t('Absence change notification on the labour calendar'),
body: body,
receiver: departmentBoss.email
receiver: receiver.email
}, myOptions);
if (tx) await tx.commit();

View File

@ -51,7 +51,7 @@ module.exports = Self => {
};
const ticketList = await models.Ticket.find(filter, myOptions);
const hasRefFk = ticketList.some(ticket => ticket.refFk);
const hasRefFk = ticketList.some(ticket => !ticket.refFk);
if (hasRefFk)
throw new UserError('There are tickets to be invoiced');