feat(salix): refs #7648 #7648 add new entries and travels

This commit is contained in:
Javier Segarra 2024-07-11 19:55:19 +02:00
parent a003cd24f6
commit ca48ad9777
4 changed files with 32 additions and 3 deletions

View File

@ -315,4 +315,33 @@ INSERT INTO mysql.roles_mapping (`User`, `Host`, `Role`, `Admin_option`)
FROM mysql.roles_mapping FROM mysql.roles_mapping
WHERE `User` LIKE @prefixedLike AND `Host` = @genRoleHost; WHERE `User` LIKE @prefixedLike AND `Host` = @genRoleHost;
UPDATE account.`user`
SET `role`=131
WHERE id=1102;
UPDATE vn.travel
SET shipped='2001-01-02',landed='2001-01-05'
WHERE id=4;
UPDATE vn.travel
SET shipped='2001-01-01',landed='2001-01-05'
WHERE id=5;
UPDATE vn.travel
SET landed='2001-01-05',shipped='2001-01-03'
WHERE id=6;
UPDATE vn.travel
SET shipped='2001-01-04',landed='2001-01-05'
WHERE id=7;
UPDATE vn.travel
SET shipped='2001-01-05',landed='2001-01-05'
WHERE id=8;
INSERT INTO vn.entry (supplierFk,invoiceNumber,isBooked,isExcludedFromAvailable,isConfirmed,isOrdered,isRaid,commission,created,evaNotes,travelFk,currencyFk,companyFk,isBlocked__,reference,editorFk,locked)
VALUES
(2,'IN2008',0,1,0,0,1,0.0,'2000-12-01 00:00:00.000','',7,1,442,0,'Movement 8',100,'2024-07-11 09:24:48.000'),
(2,'IN2008',0,1,0,0,1,0.0,'2000-12-01 00:00:00.000','',7,1,442,0,'Movement 8',100,'2024-07-11 09:24:48.000'),
(2,'IN2008',0,1,0,0,1,0.0,'2000-12-04 00:00:00.000','',7,1,442,0,'Movement 8',100,'2024-07-11 09:24:48.000'),
(2,'IN2008',0,1,0,0,1,0.0,'2000-12-02 00:00:00.000','',7,1,442,0,'Movement 8',100,'2024-07-11 09:24:48.000'),
(2,'IN2008',0,1,0,0,1,0.0,'2000-12-03 00:00:00.000','',8,1,442,0,'Movement 8',100,'2024-07-11 09:24:48.000');
FLUSH PRIVILEGES; FLUSH PRIVILEGES;

View File

@ -37,7 +37,7 @@ describe('item lastEntriesFilter()', () => {
const filter = {where: {itemFk: 1, landed: {between: [minDate, maxDate]}}}; const filter = {where: {itemFk: 1, landed: {between: [minDate, maxDate]}}};
const result = await models.Item.lastEntriesFilter(filter, options); const result = await models.Item.lastEntriesFilter(filter, options);
expect(result.length).toEqual(5); expect(result.length).toEqual(3);
await tx.rollback(); await tx.rollback();
} catch (e) { } catch (e) {

View File

@ -110,6 +110,6 @@ describe('Travel extraCommunityFilter()', () => {
const result = await app.models.Travel.extraCommunityFilter(ctx, filter); const result = await app.models.Travel.extraCommunityFilter(ctx, filter);
expect(result.length).toEqual(1); expect(result.length).toEqual(6);
}); });
}); });

View File

@ -68,7 +68,7 @@ describe('Travel filter()', () => {
const result = await app.models.Travel.filter(ctx); const result = await app.models.Travel.filter(ctx);
expect(result.length).toEqual(1); expect(result.length).toEqual(3);
}); });
it('should return the travel matching "continent"', async() => { it('should return the travel matching "continent"', async() => {