fix translations
This commit is contained in:
parent
40ea9805cf
commit
34fb80beec
|
@ -137,5 +137,8 @@
|
||||||
"Claim pickup order sent": "Claim pickup order sent [({{claimId}})]({{{claimUrl}}}) to client *{{clientName}}*",
|
"Claim pickup order sent": "Claim pickup order sent [({{claimId}})]({{{claimUrl}}}) to client *{{clientName}}*",
|
||||||
"You don't have grant privilege": "You don't have grant privilege",
|
"You don't have grant privilege": "You don't have grant privilege",
|
||||||
"You don't own the role and you can't assign it to another user": "You don't own the role and you can't assign it to another user",
|
"You don't own the role and you can't assign it to another user": "You don't own the role and you can't assign it to another user",
|
||||||
"Sale(s) blocked, please contact production": "Sale(s) blocked, please contact production"
|
"Sale(s) blocked, please contact production": "Sale(s) blocked, please contact production",
|
||||||
|
"Receipt's bank was not found": "Receipt's bank was not found",
|
||||||
|
"This receipt was not compensated": "This receipt was not compensated",
|
||||||
|
"Client's email was not found": "Client's email was not found"
|
||||||
}
|
}
|
||||||
|
|
|
@ -243,5 +243,8 @@
|
||||||
"You don't own the role and you can't assign it to another user": "No eres el propietario del rol y no puedes asignarlo a otro usuario",
|
"You don't own the role and you can't assign it to another user": "No eres el propietario del rol y no puedes asignarlo a otro usuario",
|
||||||
"Already has this status": "Ya tiene este estado",
|
"Already has this status": "Ya tiene este estado",
|
||||||
"There aren't records for this week": "No existen registros para esta semana",
|
"There aren't records for this week": "No existen registros para esta semana",
|
||||||
"Empty data source": "Origen de datos vacio"
|
"Empty data source": "Origen de datos vacio",
|
||||||
|
"Receipt's bank was not found": "No se encontró el banco del recibo",
|
||||||
|
"This receipt was not compensated": "Este recibo no ha sido compensado",
|
||||||
|
"Client's email was not found": "No se encontró el email del cliente"
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,18 +28,18 @@ module.exports = Self => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const receipt = await models.Receipt.findById(id, {fields: ['clientFk', 'bankFk']});
|
const receipt = await models.Receipt.findById(id, {fields: ['clientFk', 'bankFk']});
|
||||||
|
|
||||||
const bank = await models.Bank.findById(receipt.bankFk, null);
|
const bank = await models.Bank.findById(receipt.bankFk);
|
||||||
if (!bank)
|
if (!bank)
|
||||||
throw new UserError('Receipt\'s bank was not found');
|
throw new UserError(`Receipt's bank was not found`);
|
||||||
|
|
||||||
const accountingType = await models.AccountingType.findById(bank.accountingTypeFk, null);
|
const accountingType = await models.AccountingType.findById(bank.accountingTypeFk);
|
||||||
if (!(accountingType && accountingType.code == 'compensation'))
|
if (!(accountingType && accountingType.code == 'compensation'))
|
||||||
throw new UserError('Receipt\'s type was not compensation');
|
throw new UserError(`This receipt was not compensated`);
|
||||||
|
|
||||||
const client = await models.Client.findById(receipt.clientFk, {fields: ['email']});
|
const client = await models.Client.findById(receipt.clientFk, {fields: ['email']});
|
||||||
|
|
||||||
if (!client.email)
|
if (!client.email)
|
||||||
throw new UserError('Client\'s email was not found');
|
throw new UserError(`Client's email was not found`);
|
||||||
else {
|
else {
|
||||||
const email = new Email('balance-compensation', {
|
const email = new Email('balance-compensation', {
|
||||||
lang: ctx.req.getLocale(),
|
lang: ctx.req.getLocale(),
|
||||||
|
|
Loading…
Reference in New Issue