diff --git a/loopback/locale/en.json b/loopback/locale/en.json index 2ea2b1a3a..23717ba8f 100644 --- a/loopback/locale/en.json +++ b/loopback/locale/en.json @@ -63,5 +63,6 @@ "MESSAGE_CHANGED_PAYMETHOD": "I have changed the pay method for client [{{clientName}} (#{{clientId}})]({{{url}}})", "MESSAGE_CLAIM_ITEM_REGULARIZE": "I sent *{{quantity}}* units of [{{concept}} (#{{itemId}})]({{{itemUrl}}}) to {{nickname}} coming from ticket id [#{{ticketId}}]({{{ticketUrl}}})", "Customs agent is required for a non UEE member": "Customs agent is required for a non UEE member", - "Incoterms is required for a non UEE member": "Incoterms is required for a non UEE member" + "Incoterms is required for a non UEE member": "Incoterms is required for a non UEE member", + "Client checked as validated despite of duplication": "Client checked as validated despite of duplication from client id {{clientId}}" } \ No newline at end of file diff --git a/loopback/locale/es.json b/loopback/locale/es.json index a3490b372..d2f2882bc 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -124,5 +124,6 @@ "MESSAGE_BOUGHT_UNITS": "Se ha comprado {{quantity}} unidades de {{concept}} (#{{itemId}}) para el ticket id [#{{ticketId}}]({{{url}}})", "MESSAGE_INSURANCE_CHANGE": "He cambiado el crédito asegurado del cliente [{{clientName}} (#{{clientId}})]({{{url}}}) a *{{credit}} €*", "MESSAGE_CHANGED_PAYMETHOD": "He cambiado la forma de pago del cliente [{{clientName}} (#{{clientId}})]({{{url}}})", - "MESSAGE_CLAIM_ITEM_REGULARIZE": "Envio *{{quantity}}* unidades de [{{concept}} (#{{itemId}})]({{{itemUrl}}}) a {{nickname}} provenientes del ticket id [#{{ticketId}}]({{{ticketUrl}}})" + "MESSAGE_CLAIM_ITEM_REGULARIZE": "Envio *{{quantity}}* unidades de [{{concept}} (#{{itemId}})]({{{itemUrl}}}) a {{nickname}} provenientes del ticket id [#{{ticketId}}]({{{ticketUrl}}})", + "Client checked as validated despite of duplication": "Cliente comprobado a pesar de que existe el cliente id {{clientId}}" } \ No newline at end of file diff --git a/modules/client/back/methods/client/updateFiscalData.js b/modules/client/back/methods/client/updateFiscalData.js index c1bd218d2..e27a6f456 100644 --- a/modules/client/back/methods/client/updateFiscalData.js +++ b/modules/client/back/methods/client/updateFiscalData.js @@ -99,6 +99,7 @@ module.exports = Self => { const args = ctx.args; const userId = ctx.req.accessToken.userId; const isSalesAssistant = await models.Account.hasRole(userId, 'salesAssistant'); + const $t = ctx.req.__; const client = await models.Client.findById(clientId); @@ -106,13 +107,16 @@ module.exports = Self => { throw new UserError(`You can't make changes on a client with verified data`); if (args.despiteOfClient) { + const translatedDescription = $t(`Client checked as validated despite of duplication`, { + clientId: args.despiteOfClient + }); const logRecord = { originFk: clientId, userFk: userId, action: 'update', changedModel: 'Client', changedModelId: clientId, - description: `Cliente comprobado a pesar de que existe el cliente id ${args.despiteOfClient}` + description: translatedDescription }; await models.ClientLog.create(logRecord); diff --git a/modules/client/front/fiscal-data/index.js b/modules/client/front/fiscal-data/index.js index 9e2be7241..98773de75 100644 --- a/modules/client/front/fiscal-data/index.js +++ b/modules/client/front/fiscal-data/index.js @@ -44,7 +44,6 @@ export default class Controller extends Component { else if (equalizatedHasChanged) return this.onAcceptEt(); - return this.$q.resolve(); }