fixes #4547 check compensation and tests #1161

Merged
alexandre merged 6 commits from 4547-fix-compensation into dev 2022-11-24 08:48:42 +00:00
Contributor
No description provided.
alexandre added the
CR / Tests passed
label 2022-11-21 09:51:04 +00:00
alexandre added 1 commit 2022-11-21 09:51:04 +00:00
gitea/salix/pipeline/head This commit looks good Details
40ea9805cf
fixes #4547 check compensation and tests
alexandre requested review from jgallego 2022-11-21 10:44:00 +00:00
alexandre added 1 commit 2022-11-22 10:48:17 +00:00
gitea/salix/pipeline/head This commit looks good Details
5552cd654e
Merge branch 'dev' into 4547-fix-compensation
joan requested changes 2022-11-22 13:14:20 +00:00
@ -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);
Contributor

No es necesario el null si no se le pasa el tercer argumento.

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');
Contributor

Para evitar escapar las comillas se puede poner la cadena entre template strings

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');
Contributor

This receipt was not compensated?

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');
Contributor

Faltan las traducciones en la carpeta loopback

Faltan las traducciones en la carpeta loopback
alexandre added 2 commits 2022-11-22 13:25:05 +00:00
alexandre added 1 commit 2022-11-22 13:31:07 +00:00
gitea/salix/pipeline/head This commit looks good Details
8613b196d8
Merge branch 'dev' into 4547-fix-compensation
alexandre requested review from joan 2022-11-22 13:31:15 +00:00
joan approved these changes 2022-11-24 07:53:07 +00:00
alexandre added 1 commit 2022-11-24 08:42:12 +00:00
gitea/salix/pipeline/head This commit looks good Details
5124b3b681
Merge branch 'dev' into 4547-fix-compensation
alexandre scheduled this pull request to auto merge when all checks succeed 2022-11-24 08:42:40 +00:00
alexandre merged commit a2e08c5907 into dev 2022-11-24 08:48:42 +00:00
alexandre deleted branch 4547-fix-compensation 2022-11-24 08:52:52 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: verdnatura/salix#1161
No description provided.