diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js
index eb2dce909..72e048772 100644
--- a/e2e/helpers/selectors.js
+++ b/e2e/helpers/selectors.js
@@ -832,7 +832,8 @@ export default {
},
travelExtraCommunity: {
anySearchResult: 'vn-travel-extra-community > vn-data-viewer div > vn-tbody > vn-tr',
- firstTravelReference: 'vn-travel-extra-community vn-card:nth-child(1) vn-td-editable',
+ firstTravelReference: 'vn-travel-extra-community vn-card:nth-child(1) vn-td-editable[name="reference"]',
+ firstTravelLockedKg: 'vn-travel-extra-community vn-card:nth-child(1) vn-td-editable[name="lockedKg"]',
removeContinentFilter: 'vn-searchbar > form > vn-textfield > div.container > div.prepend > prepend > div > span:nth-child(3) > vn-icon > i'
},
travelBasicData: {
diff --git a/e2e/paths/10-travel/04_extra_community.spec.js b/e2e/paths/10-travel/04_extra_community.spec.js
index 7a37b89e4..d902bb45e 100644
--- a/e2e/paths/10-travel/04_extra_community.spec.js
+++ b/e2e/paths/10-travel/04_extra_community.spec.js
@@ -16,19 +16,22 @@ describe('Travel extra community path', () => {
await browser.close();
});
- it('should edit the travel reference', async() => {
+ it('should edit the travel reference and the locked kilograms', async() => {
await page.waitToClick(selectors.travelExtraCommunity.removeContinentFilter);
await page.waitForSpinnerLoad();
await page.writeOnEditableTD(selectors.travelExtraCommunity.firstTravelReference, 'edited reference');
+ await page.writeOnEditableTD(selectors.travelExtraCommunity.firstTravelLockedKg, '1500');
});
- it('should reload the index and confirm the reference was edited', async() => {
+ it('should reload the index and confirm the reference and locked kg were edited', async() => {
await page.accessToSection('travel.index');
await page.accessToSection('travel.extraCommunity');
await page.waitToClick(selectors.travelExtraCommunity.removeContinentFilter);
await page.waitForTextInElement(selectors.travelExtraCommunity.firstTravelReference, 'edited reference');
const reference = await page.getProperty(selectors.travelExtraCommunity.firstTravelReference, 'innerText');
+ const lockedKg = await page.getProperty(selectors.travelExtraCommunity.firstTravelLockedKg, 'innerText');
expect(reference).toContain('edited reference');
+ expect(lockedKg).toContain(1500);
});
});
diff --git a/modules/ticket/back/methods/ticket/filter.js b/modules/ticket/back/methods/ticket/filter.js
index 6dbe52524..5341de8d1 100644
--- a/modules/ticket/back/methods/ticket/filter.js
+++ b/modules/ticket/back/methods/ticket/filter.js
@@ -10,75 +10,75 @@ module.exports = Self => {
accepts: [
{
arg: 'ctx',
- type: 'Object',
+ type: 'object',
http: {source: 'context'}
}, {
arg: 'filter',
- type: 'Object',
+ type: 'object',
description: `Filter defining where, order, offset, and limit - must be a JSON-encoded string`
}, {
arg: 'search',
- type: 'String',
- description: `If it's and integer searchs by id, otherwise it searchs by nickname`
+ type: 'string',
+ description: `If it's and number searchs by id, otherwise it searchs by nickname`
}, {
arg: 'from',
- type: 'Date',
+ type: 'date',
description: `The from date filter`
}, {
arg: 'to',
- type: 'Date',
+ type: 'date',
description: `The to date filter`
}, {
arg: 'nickname',
- type: 'String',
+ type: 'string',
description: `The nickname filter`
}, {
arg: 'id',
- type: 'Integer',
+ type: 'number',
description: `The ticket id filter`
}, {
arg: 'clientFk',
- type: 'Integer',
+ type: 'number',
description: `The client id filter`
}, {
arg: 'agencyModeFk',
- type: 'Integer',
+ type: 'number',
description: `The agency mode id filter`
}, {
arg: 'warehouseFk',
- type: 'Integer',
+ type: 'number',
description: `The warehouse id filter`
}, {
arg: 'salesPersonFk',
- type: 'Integer',
+ type: 'number',
description: `The salesperson id filter`
}, {
arg: 'provinceFk',
- type: 'Integer',
+ type: 'number',
description: `The province id filter`
}, {
arg: 'stateFk',
- type: 'Number',
+ type: 'number',
description: `The state id filter`
}, {
arg: 'myTeam',
- type: 'Boolean',
+ type: 'boolean',
description: `Whether to show only tickets for the current logged user team (For now it shows only the current user tickets)`
}, {
arg: 'problems',
- type: 'Boolean',
+ type: 'boolean',
description: `Whether to show only tickets with problems`
}, {
arg: 'pending',
- type: 'Boolean',
+ type: 'boolean',
description: `Whether to show only tickets with state 'Pending'`
}, {
arg: 'mine',
- type: 'Boolean',
+ type: 'boolean',
description: `Whether to show only tickets for the current logged user`
}, {
arg: 'orderFk',
- type: 'Number',
+ type: 'number',
description: `The order id filter`
}, {
arg: 'refFk',
@@ -86,12 +86,12 @@ module.exports = Self => {
description: `The invoice reference filter`
}, {
arg: 'alertLevel',
- type: 'Number',
+ type: 'number',
description: `The alert level of the tickets`
}
],
returns: {
- type: ['Object'],
+ type: ['object'],
root: true
},
http: {
diff --git a/modules/travel/back/methods/travel/extraCommunityFilter.js b/modules/travel/back/methods/travel/extraCommunityFilter.js
index 4a49b4401..f4132c631 100644
--- a/modules/travel/back/methods/travel/extraCommunityFilter.js
+++ b/modules/travel/back/methods/travel/extraCommunityFilter.js
@@ -10,68 +10,74 @@ module.exports = Self => {
accepts: [
{
arg: 'filter',
- type: 'Object',
- description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string',
- http: {source: 'query'}
- }, {
+ type: 'object',
+ description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string'
+ },
+ {
arg: 'search',
- type: 'String',
- description: 'Searchs the travel by id',
- http: {source: 'query'}
- }, {
+ type: 'string',
+ description: 'Searchs the travel by id'
+ },
+ {
arg: 'id',
- type: 'Integer',
- description: 'The travel id',
- http: {source: 'query'}
- }, {
+ type: 'number',
+ description: 'The travel id'
+ },
+ {
arg: 'shippedFrom',
- type: 'Date',
- description: 'The shipped from date filter',
- http: {source: 'query'}
- }, {
+ type: 'date',
+ description: 'The shipped from date filter'
+ },
+ {
arg: 'shippedTo',
- type: 'Date',
- description: 'The shipped to date filter',
- http: {source: 'query'}
- }, {
+ type: 'date',
+ description: 'The shipped to date filter'
+ },
+ {
arg: 'landedFrom',
- type: 'Date',
- description: 'The landed from date filter',
- http: {source: 'query'}
- }, {
+ type: 'date',
+ description: 'The landed from date filter'
+ },
+ {
arg: 'landedTo',
- type: 'Date',
- description: 'The landed to date filter',
- http: {source: 'query'}
- }, {
+ type: 'date',
+ description: 'The landed to date filter'
+ },
+ {
arg: 'agencyFk',
- type: 'Number',
- description: 'The agencyModeFk id',
- http: {source: 'query'}
- }, {
+ type: 'number',
+ description: 'The agencyModeFk id'
+ },
+ {
arg: 'warehouseOutFk',
- type: 'Number',
- description: 'The warehouseOutFk filter',
- http: {source: 'query'}
- }, {
+ type: 'number',
+ description: 'The warehouseOutFk filter'
+ },
+ {
arg: 'warehouseInFk',
- type: 'Number',
- description: 'The warehouseInFk filter',
- http: {source: 'query'}
- }, {
+ type: 'number',
+ description: 'The warehouseInFk filter'
+ },
+ {
arg: 'totalEntries',
- type: 'Number',
- description: 'The totalEntries filter',
- http: {source: 'query'}
- }, {
+ type: 'number',
+ description: 'The totalEntries filter'
+ },
+ {
arg: 'ref',
type: 'string',
description: 'The reference'
- }, {
+ },
+ {
arg: 'continent',
type: 'string',
description: 'The continent code'
- }
+ },
+ {
+ arg: 'cargoSupplierFk',
+ type: 'number',
+ description: 'The freighter supplier id'
+ },
],
returns: {
type: ['Object'],
@@ -108,6 +114,7 @@ module.exports = Self => {
case 'warehouseOutFk':
case 'warehouseInFk':
case 'totalEntries':
+ case 'cargoSupplierFk':
param = `t.${param}`;
return {[param]: value};
}
@@ -172,8 +179,8 @@ module.exports = Self => {
e.notes,
CAST(SUM(i.density * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000 ) as DECIMAL(10,0)) as loadedkg,
CAST(SUM(167.5 * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000 ) as DECIMAL(10,0)) as volumeKg
- FROM entry e
- JOIN tmp.travel tr ON tr.id = e.travelFk
+ FROM tmp.travel tr
+ JOIN entry e ON e.travelFk = tr.id
JOIN buy b ON b.entryFk = e.id
JOIN packaging pkg ON pkg.id = b.packageFk
JOIN item i ON i.id = b.itemFk
diff --git a/modules/travel/back/models/travel.json b/modules/travel/back/models/travel.json
index df5b183b1..cd2f1d653 100644
--- a/modules/travel/back/models/travel.json
+++ b/modules/travel/back/models/travel.json
@@ -37,6 +37,9 @@
"m3": {
"type": "Number"
},
+ "kg": {
+ "type": "Number"
+ },
"cargoSupplierFk": {
"type": "Number"
},
diff --git a/modules/travel/front/extra-community-search-panel/index.html b/modules/travel/front/extra-community-search-panel/index.html
index 85a30907a..73c158a03 100644
--- a/modules/travel/front/extra-community-search-panel/index.html
+++ b/modules/travel/front/extra-community-search-panel/index.html
@@ -39,24 +39,28 @@
+ ng-model="filter.shippedFrom"
+ on-change="$ctrl.shippedFrom = value">
+ ng-model="filter.shippedTo"
+ on-change="$ctrl.shippedTo = value">
+ ng-model="filter.landedFrom"
+ on-change="$ctrl.landedFrom = value">
+ ng-model="filter.landedTo"
+ on-change="$ctrl.landedTo = value">
@@ -76,6 +80,13 @@
+
+
-
+
-
+
+
+
+
+
-
+
Id
Supplier
Freighter
@@ -33,14 +41,14 @@
Wh. Out
- Shipped
+ W. Shipped
Wh. In
- Landed
+ W. Landed
-
+