From b451641d47b314e23955f76be90799ca9546a5e0 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 30 Aug 2024 11:49:39 +0200 Subject: [PATCH 1/5] fix: refs #6897 fix filter --- modules/entry/back/methods/entry/filter.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/entry/back/methods/entry/filter.js b/modules/entry/back/methods/entry/filter.js index dcb1e3158..776544bc6 100644 --- a/modules/entry/back/methods/entry/filter.js +++ b/modules/entry/back/methods/entry/filter.js @@ -109,6 +109,11 @@ module.exports = Self => { arg: 'days', type: 'number', description: `N days interval` + }, + { + arg: 'invoiceAmount', + type: 'number', + description: `The invoice amount` } ], returns: { @@ -192,6 +197,7 @@ module.exports = Self => { e.companyFk, e.gestDocFk, e.invoiceInFk, + e.invoiceAmount, t.landed, s.name supplierName, s.nickname supplierAlias, From e8010d0f18fcbc88a0c1f1150be2142384084020 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 30 Aug 2024 12:10:33 +0200 Subject: [PATCH 2/5] fix: refs #6897 fix json --- modules/entry/back/models/entry.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/entry/back/models/entry.json b/modules/entry/back/models/entry.json index 833edf14d..383585fce 100644 --- a/modules/entry/back/models/entry.json +++ b/modules/entry/back/models/entry.json @@ -74,6 +74,9 @@ }, "observationEditorFk": { "type": "number" + }, + "invoiceAmount": { + "type": "number" } }, "relations": { @@ -108,4 +111,4 @@ "foreignKey": "typeFk" } } -} \ No newline at end of file +} From 26d93ef474cd1f2c1d6e94029f0792fc5ec295f9 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 30 Aug 2024 12:35:10 +0200 Subject: [PATCH 3/5] fix: refs #6897 travel filter --- modules/travel/back/methods/travel/filter.js | 11 +++++++++++ modules/travel/back/models/travel.json | 9 +++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/modules/travel/back/methods/travel/filter.js b/modules/travel/back/methods/travel/filter.js index 3fa1d65f9..b7fadc8f2 100644 --- a/modules/travel/back/methods/travel/filter.js +++ b/modules/travel/back/methods/travel/filter.js @@ -71,7 +71,16 @@ module.exports = Self => { arg: 'continent', type: 'string', description: 'The continent code' + }, { + arg: 'shipmentHour', + type: 'time', + description: 'The shipment hour' }, + { + arg: 'landingHour', + type: 'time', + description: 'The landing hour' + } ], returns: { type: ['Object'], @@ -130,6 +139,8 @@ module.exports = Self => { t.isReceived, t.m3, t.kg, + t.shipmentHour, + t.landingHour, t.cargoSupplierFk, t.totalEntries, am.name agencyModeName, diff --git a/modules/travel/back/models/travel.json b/modules/travel/back/models/travel.json index 701894a76..d0153e044 100644 --- a/modules/travel/back/models/travel.json +++ b/modules/travel/back/models/travel.json @@ -44,8 +44,13 @@ }, "agencyModeFk": { "type": "number" - } - }, + }, + "shipmentHour": { + "type": "time" + }, + "landingHour": { + "type": "time" + }, "relations": { "agency": { "type": "belongsTo", From f65d36011b5ce9a2b5b5aeb4d3fbe9f4a8037bf4 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 30 Aug 2024 12:40:37 +0200 Subject: [PATCH 4/5] fix: refs #6897 back --- modules/travel/back/models/travel.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/travel/back/models/travel.json b/modules/travel/back/models/travel.json index d0153e044..46d24f975 100644 --- a/modules/travel/back/models/travel.json +++ b/modules/travel/back/models/travel.json @@ -46,10 +46,10 @@ "type": "number" }, "shipmentHour": { - "type": "time" + "type": "string" }, "landingHour": { - "type": "time" + "type": "string" }, "relations": { "agency": { @@ -69,3 +69,4 @@ } } } +} From 4a7d81f920570210b370f57856122127e679a2f8 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 30 Aug 2024 12:53:44 +0200 Subject: [PATCH 5/5] fix: refs #6897 back and tests --- modules/travel/back/methods/travel/filter.js | 7 +++---- modules/travel/back/models/travel.json | 5 +++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/travel/back/methods/travel/filter.js b/modules/travel/back/methods/travel/filter.js index b7fadc8f2..9f26423ce 100644 --- a/modules/travel/back/methods/travel/filter.js +++ b/modules/travel/back/methods/travel/filter.js @@ -73,12 +73,11 @@ module.exports = Self => { description: 'The continent code' }, { arg: 'shipmentHour', - type: 'time', + type: 'string', description: 'The shipment hour' - }, - { + }, { arg: 'landingHour', - type: 'time', + type: 'string', description: 'The landing hour' } ], diff --git a/modules/travel/back/models/travel.json b/modules/travel/back/models/travel.json index 46d24f975..0ebf683e7 100644 --- a/modules/travel/back/models/travel.json +++ b/modules/travel/back/models/travel.json @@ -50,7 +50,8 @@ }, "landingHour": { "type": "string" - }, + } + }, "relations": { "agency": { "type": "belongsTo", @@ -69,4 +70,4 @@ } } } -} +