feat: refs #6273 required payMethod for internals
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-06-07 13:55:56 +02:00
parent ee1678ebb5
commit 479e4f3f8a
2 changed files with 5 additions and 5 deletions

View File

@ -359,10 +359,11 @@
"Select ticket or client": "Elija un ticket o un client",
"It was not able to create the invoice": "No se pudo crear la factura",
"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",
"You can not use the same password": "No puedes usar la misma contraseña",
"This PDA is already assigned to another user": "Este PDA ya está asignado a otro usuario",
"You can only have one PDA": "Solo puedes tener un PDA",
"It has been invoiced but the PDF could not be generated": "Se ha facturado pero no se ha podido generar el PDF",
"It has been invoiced but the PDF of refund not be generated": "Se ha facturado pero no se ha podido generar el PDF del abono"
}
"It has been invoiced but the PDF of refund not be generated": "Se ha facturado pero no se ha podido generar el PDF del abono",
"Payment method is required": "El método de pago es obligatorio"
}

View File

@ -129,8 +129,7 @@ module.exports = Self => {
const nickname = firstName.concat(' ', lastNames);
const {roleFk, businessTypeFk} = await models.WorkerConfig.findOne({fields: ['roleFk', 'businessTypeFk']});
if (!isFreelance)
if (!payMethodFk) throw new UserError('Payment method is required');
if (!isFreelance && !payMethodFk) throw new UserError('Payment method is required');
if (isFreelance || !client) {
const [{password}] = await models.Worker.rawSql('SELECT account.passwordGenerate() as password;');