diff --git a/modules/route/back/methods/agency-term/filter.js b/modules/route/back/methods/agency-term/filter.js index 854e8702f..ee79a04a7 100644 --- a/modules/route/back/methods/agency-term/filter.js +++ b/modules/route/back/methods/agency-term/filter.js @@ -18,19 +18,19 @@ module.exports = Self => { description: `If it's and integer searchs by invoiceInFk, otherwise it searchs by the supplierName`, }, { - arg: 'agencyFk', + arg: 'agencyModeFk', type: 'integer', - description: 'The agency route name', + description: 'The agency agencyModeFk id', }, { - arg: 'agencyAgreement', + arg: 'agencyFk', type: 'integer', - description: 'The agencyMode id', + description: 'The agencyFk id', }, { arg: 'from', type: 'date', - description: 'The to date filter', + description: 'The from date filter', }, { arg: 'to', @@ -59,16 +59,16 @@ module.exports = Self => { switch (param) { case 'search': return /^\d+$/.test(value) - ? {'fp.itemFk': {inq: value}} - : {'it.code': {like: `%${value}%`}}; + ? {'invoiceInFk': {inq: value}} + : {'supplierName': {like: `%${value}%`}}; + case 'agencyModeFk': + return {'agencyModeFk': value}; case 'agencyFk': - return {'it.categoryFk': value}; - case 'agencyAgreement': - return {'it.workerFk': value}; + return {'agencyFk': value}; case 'from': + return {'created': {gte: value}}; case 'to': - param = `fp.${param}`; - return {[param]: value}; + return {'created': {lte: value}}; } }); diff --git a/modules/route/front/agency-term-search-panel/index.html b/modules/route/front/agency-term-search-panel/index.html index fb6641a52..fec6bf5eb 100644 --- a/modules/route/front/agency-term-search-panel/index.html +++ b/modules/route/front/agency-term-search-panel/index.html @@ -1,6 +1,6 @@