diff --git a/loopback/locale/es.json b/loopback/locale/es.json index 090cfe059..8586301fb 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -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" } diff --git a/modules/client/back/methods/client/createAddress.js b/modules/client/back/methods/client/createAddress.js index cb55025ce..2709632cb 100644 --- a/modules/client/back/methods/client/createAddress.js +++ b/modules/client/back/methods/client/createAddress.js @@ -92,12 +92,8 @@ module.exports = function(Self) { }, myOptions); const isUeeMember = province.country().isUeeMember; - if (!isUeeMember && (!args.incotermsFk || !args.customsAgentFk)) { - if (!args.incotermsFk) - 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`); - } + if (!isUeeMember && (!args.incotermsFk || !args.customsAgentFk)) + throw new UserError(`Incoterms and Customs agent are required for a non UEE member`); delete args.ctx; // Remove unwanted properties const newAddress = await models.Address.create(args, myOptions);