refs #5688 refactor: muestra un mensaje de error controlado
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2023-05-31 14:53:31 +02:00
parent 38c0dc2e01
commit d5aae8f824
2 changed files with 7 additions and 3 deletions

View File

@ -84,7 +84,7 @@
"The current ticket can't be modified": "El ticket actual no puede ser modificado",
"The current claim can't be modified": "La reclamación actual no puede ser modificada",
"The sales of this ticket can't be modified": "Las lineas de este ticket no pueden ser modificadas",
"The sales do not exists": "La(s) línea(s) seleccionada(s) no existe(n)",
"The sales do not exists": "La(s) línea(s) seleccionada(s) no existe(n)",
"Please select at least one sale": "Por favor selecciona al menos una linea",
"All sales must belong to the same ticket": "Todas las lineas deben pertenecer al mismo ticket",
"NO_ZONE_FOR_THIS_PARAMETERS": "Para este día no hay ninguna zona configurada",
@ -293,5 +293,6 @@
"comercialName": "Comercial",
"Invalid NIF for VIES": "Invalid NIF for VIES",
"Ticket does not exist": "Este ticket no existe",
"Ticket is already signed": "Este ticket ya ha sido firmado"
"Ticket is already signed": "Este ticket ya ha sido firmado",
"This worker does not have a work center": "Este trabajador no tiene centro de trabajo"
}

View File

@ -117,7 +117,10 @@ module.exports = Self => {
absences.push(absence);
}
for (let day of contract.workCenter().holidays()) {
const workCenter = contract.workCenter();
if (!workCenter) throw new UserError(`This worker does not have a work center`);
for (let day of workCenter.holidays()) {
day.dated = new Date(day.dated);
day.dated.setHours(0, 0, 0, 0);