diff --git a/db/dump/fixtures.after.sql b/db/dump/fixtures.after.sql index 562ea02d8..dd07b24c0 100644 --- a/db/dump/fixtures.after.sql +++ b/db/dump/fixtures.after.sql @@ -315,4 +315,33 @@ INSERT INTO mysql.roles_mapping (`User`, `Host`, `Role`, `Admin_option`) FROM mysql.roles_mapping 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; diff --git a/modules/item/back/methods/item/specs/lastEntriesFilter.spec.js b/modules/item/back/methods/item/specs/lastEntriesFilter.spec.js index 00488e534..a99402266 100644 --- a/modules/item/back/methods/item/specs/lastEntriesFilter.spec.js +++ b/modules/item/back/methods/item/specs/lastEntriesFilter.spec.js @@ -37,7 +37,7 @@ describe('item lastEntriesFilter()', () => { const filter = {where: {itemFk: 1, landed: {between: [minDate, maxDate]}}}; const result = await models.Item.lastEntriesFilter(filter, options); - expect(result.length).toEqual(5); + expect(result.length).toEqual(3); await tx.rollback(); } catch (e) { diff --git a/modules/travel/back/methods/travel/specs/extraCommunityFilter.spec.js b/modules/travel/back/methods/travel/specs/extraCommunityFilter.spec.js index 599851b55..0553aa58a 100644 --- a/modules/travel/back/methods/travel/specs/extraCommunityFilter.spec.js +++ b/modules/travel/back/methods/travel/specs/extraCommunityFilter.spec.js @@ -110,6 +110,6 @@ describe('Travel extraCommunityFilter()', () => { const result = await app.models.Travel.extraCommunityFilter(ctx, filter); - expect(result.length).toEqual(1); + expect(result.length).toEqual(6); }); }); diff --git a/modules/travel/back/methods/travel/specs/filter.spec.js b/modules/travel/back/methods/travel/specs/filter.spec.js index 1a6ee895c..3f8179c30 100644 --- a/modules/travel/back/methods/travel/specs/filter.spec.js +++ b/modules/travel/back/methods/travel/specs/filter.spec.js @@ -68,7 +68,7 @@ describe('Travel filter()', () => { 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() => {