minorBugs
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
d3b5300553
commit
6acfe7f1cf
|
@ -0,0 +1 @@
|
||||||
|
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Receipt', 'createReceipt', '*', 'ALLOW', 'ROLE', 'administrative');
|
|
@ -82,7 +82,6 @@ describe('Travel descriptor path', () => {
|
||||||
await page.waitToClick('vn-icon[icon="preview"]'); // summary icon
|
await page.waitToClick('vn-icon[icon="preview"]'); // summary icon
|
||||||
await page.waitForState('travel.card.summary');
|
await page.waitForState('travel.card.summary');
|
||||||
await page.waitToClick(selectors.travelDescriptor.dotMenu);
|
await page.waitToClick(selectors.travelDescriptor.dotMenu);
|
||||||
|
|
||||||
await page.waitToClick(selectors.travelDescriptor.dotMenuCloneWithEntries);
|
await page.waitToClick(selectors.travelDescriptor.dotMenuCloneWithEntries);
|
||||||
await page.waitToClick(selectors.travelDescriptor.acceptClonation);
|
await page.waitToClick(selectors.travelDescriptor.acceptClonation);
|
||||||
await page.waitForState('travel.card.basicData');
|
await page.waitForState('travel.card.basicData');
|
||||||
|
|
|
@ -8,6 +8,7 @@ describe('Address updateAddress', () => {
|
||||||
const customAgentOneId = 1;
|
const customAgentOneId = 1;
|
||||||
|
|
||||||
it('should throw the non uee member error if no incoterms is defined', async() => {
|
it('should throw the non uee member error if no incoterms is defined', async() => {
|
||||||
|
let err;
|
||||||
const ctx = {
|
const ctx = {
|
||||||
args: {
|
args: {
|
||||||
provinceFk: provinceId,
|
provinceFk: provinceId,
|
||||||
|
@ -26,6 +27,7 @@ describe('Address updateAddress', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw a non uee member error if no customsAgent is defined', async() => {
|
it('should throw a non uee member error if no customsAgent is defined', async() => {
|
||||||
|
let err;
|
||||||
const ctx = {
|
const ctx = {
|
||||||
args: {
|
args: {
|
||||||
provinceFk: provinceId,
|
provinceFk: provinceId,
|
||||||
|
|
|
@ -92,6 +92,7 @@ module.exports = function(Self) {
|
||||||
],
|
],
|
||||||
options);
|
options);
|
||||||
} else {
|
} else {
|
||||||
|
const description = `${clientOriginal.id} : ${clientOriginal.nickname} - ${accountingType.receiptDescription}`;
|
||||||
const [xdiarioNew] = await Self.rawSql(
|
const [xdiarioNew] = await Self.rawSql(
|
||||||
`SELECT xdiario_new(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ledger;`,
|
`SELECT xdiario_new(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ledger;`,
|
||||||
[
|
[
|
||||||
|
@ -99,7 +100,7 @@ module.exports = function(Self) {
|
||||||
Date(),
|
Date(),
|
||||||
bank.account,
|
bank.account,
|
||||||
clientOriginal.accountingAccount,
|
clientOriginal.accountingAccount,
|
||||||
clientOriginal.id + ':' + clientOriginal.nickname + '-' + accountingType.receiptDescription,
|
description,
|
||||||
args.amountPaid,
|
args.amountPaid,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -119,7 +120,7 @@ module.exports = function(Self) {
|
||||||
Date(),
|
Date(),
|
||||||
clientOriginal.accountingAccount,
|
clientOriginal.accountingAccount,
|
||||||
bank.account,
|
bank.account,
|
||||||
clientOriginal.id + ':' + clientOriginal.nickname + '-' + accountingType.receiptDescription,
|
description,
|
||||||
0,
|
0,
|
||||||
args.amountPaid,
|
args.amountPaid,
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -39,6 +39,7 @@ describe('Receipt createReceipt', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw Invalid account if compensationAccount does not belongs to a client nor a supplier', async() => {
|
it('should throw Invalid account if compensationAccount does not belongs to a client nor a supplier', async() => {
|
||||||
|
let error;
|
||||||
const bankFk = 3;
|
const bankFk = 3;
|
||||||
const ctx = {
|
const ctx = {
|
||||||
args: {
|
args: {
|
||||||
|
@ -55,11 +56,11 @@ describe('Receipt createReceipt', () => {
|
||||||
try {
|
try {
|
||||||
await app.models.Receipt.createReceipt(ctx);
|
await app.models.Receipt.createReceipt(ctx);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
err = e;
|
error = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
expect(err).toBeDefined();
|
expect(error).toBeDefined();
|
||||||
expect(err.message).toEqual('Invalid account');
|
expect(error.message).toEqual('Invalid account');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create a new receipt with a compensation for a client', async() => {
|
it('should create a new receipt with a compensation for a client', async() => {
|
||||||
|
@ -96,7 +97,6 @@ describe('Receipt createReceipt', () => {
|
||||||
expect(receipt).toEqual(jasmine.objectContaining(ctx.args));
|
expect(receipt).toEqual(jasmine.objectContaining(ctx.args));
|
||||||
expect(receipt.amountPaid).toEqual(-receiptCompensated.amountPaid);
|
expect(receipt.amountPaid).toEqual(-receiptCompensated.amountPaid);
|
||||||
|
|
||||||
console.log(till);
|
|
||||||
// restores
|
// restores
|
||||||
await receipt.destroy();
|
await receipt.destroy();
|
||||||
await receiptCompensated.destroy();
|
await receiptCompensated.destroy();
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-vertical ng-show="$ctrl.bankSelection.accountingType.code == 'cash'">
|
<vn-vertical ng-show="$ctrl.bankSelection.accountingType.code == 'cash'">
|
||||||
<h6 traslate>Cash</h6>
|
<h6 translate>Cash</h6>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-input-number
|
<vn-input-number
|
||||||
ng-model="$ctrl.deliveredAmount"
|
ng-model="$ctrl.deliveredAmount"
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
<vn-vertical ng-show="$ctrl.bankSelection.accountingType.code == 'compensation'">
|
<vn-vertical ng-show="$ctrl.bankSelection.accountingType.code == 'compensation'">
|
||||||
<h6 traslate>Compensation</h6>
|
<h6 translate>Compensation</h6>
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
ng-model="$ctrl.receipt.compensationAccount"
|
ng-model="$ctrl.receipt.compensationAccount"
|
||||||
label="Compensation Account"
|
label="Compensation Account"
|
||||||
|
|
Loading…
Reference in New Issue