refs #7296 fix pr errors, trad
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Carlos Satorres 2024-05-23 14:44:47 +02:00
parent 83f638323a
commit ee010a3bb3
2 changed files with 4 additions and 7 deletions

View File

@ -359,5 +359,6 @@
"It was not able to create the invoice": "No se pudo crear la factura",
"This PDA is already assigned to another user": "This PDA is already assigned to another user",
"ticketCommercial": "El ticket {{ ticket }} para el vendedor {{ salesMan }} está en preparación. (mensaje generado automáticamente)",
"Incoterms and Customs agent are required for a non UEE member": "Se requieren Incoterms y agente de aduanas para un no miembro de la UEE"
"Incoterms and Customs agent are required for a non UEE member": "Se requieren Incoterms y agente de aduanas para un no miembro de la UEE",
"Cannot add holidays on this day": "No se pueden agregar vacaciones en este día"
}

View File

@ -92,12 +92,8 @@ module.exports = function(Self) {
}, myOptions);
const isUeeMember = province.country().isUeeMember;
if (!isUeeMember && (!args.incotermsFk || !args.customsAgentFk)) {
if (!args.incotermsFk)
if (!isUeeMember && (!args.incotermsFk || !args.customsAgentFk))
throw new UserError(`Incoterms and Customs agent are required for a non UEE member`);
else
throw new UserError(`Customs agent is required for a non UEE member`);
}
delete args.ctx; // Remove unwanted properties
const newAddress = await models.Address.create(args, myOptions);