#7292 - createAddresUEEMember #2489

Merged
carlossa merged 11 commits from 7292-createAddresUEEMember into dev 2024-05-24 06:40:29 +00:00
2 changed files with 4 additions and 7 deletions
Showing only changes of commit ee010a3bb3 - Show all commits

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)
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`);
carlossa marked this conversation as resolved Outdated
Outdated
Review

fica este error asoles

fica este error asoles
delete args.ctx; // Remove unwanted properties
const newAddress = await models.Address.create(args, myOptions);