fixes #4547 check compensation and tests #1161
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#1161
Loading…
Reference in New Issue
No description provided.
Delete Branch "4547-fix-compensation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -30,1 +29,3 @@
const client = await models.Client.findById(receipt.clientFk, {fields:['email']});
const receipt = await models.Receipt.findById(id, {fields: ['clientFk', 'bankFk']});
const bank = await models.Bank.findById(receipt.bankFk, null);
No es necesario el null si no se le pasa el tercer argumento.
@ -31,0 +30,4 @@
const bank = await models.Bank.findById(receipt.bankFk, null);
if (!bank)
throw new UserError('Receipt's bank was not found');
Para evitar escapar las comillas se puede poner la cadena entre template strings
Receipt's bank was not found
@ -36,1 +35,3 @@
});
const accountingType = await models.AccountingType.findById(bank.accountingTypeFk, null);
if (!(accountingType && accountingType.code == 'compensation'))
throw new UserError('Receipt's type was not compensation');
This receipt was not compensated?
@ -39,0 +39,4 @@
const client = await models.Client.findById(receipt.clientFk, {fields: ['email']});
if (!client.email)
throw new UserError('Client's email was not found');
Faltan las traducciones en la carpeta loopback