From 061e978a26b8fc448890eb32cb0cc27bde72f9dd Mon Sep 17 00:00:00 2001 From: Bernat Date: Wed, 16 Oct 2019 08:08:10 +0200 Subject: [PATCH] =?UTF-8?q?#1758=20=20A=C3=B1adir=20los=20alias=20como=20p?= =?UTF-8?q?refijos=20en=20los=20filtros?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/invoiceOut/back/methods/invoiceOut/filter.js | 1 + modules/route/back/methods/route/filter.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/invoiceOut/back/methods/invoiceOut/filter.js b/modules/invoiceOut/back/methods/invoiceOut/filter.js index a0da914f8..8b6d00763 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/filter.js +++ b/modules/invoiceOut/back/methods/invoiceOut/filter.js @@ -92,6 +92,7 @@ module.exports = Self => { case 'companyFk': case 'issued': case 'dued': + param = `i.${param}`; return {[param]: value}; } }); diff --git a/modules/route/back/methods/route/filter.js b/modules/route/back/methods/route/filter.js index 1ea962bed..eeeef1dac 100644 --- a/modules/route/back/methods/route/filter.js +++ b/modules/route/back/methods/route/filter.js @@ -85,10 +85,13 @@ module.exports = Self => { return {'r.m3': value}; case 'description': return {'r.description': {like: `%${value}%`}}; - case 'workerFk': case 'warehouseFk': + param = `v.${param}`; + return {[param]: value}; + case 'workerFk': case 'vehicleFk': case 'agencyModeFk': + param = `r.${param}`; return {[param]: value}; } });