From 4465f48afe4ae22fb033906272f874ee345bfc8a Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Thu, 25 Apr 2019 13:51:34 +0200 Subject: [PATCH] fix search by string barcode #1381 --- modules/item/back/methods/item/filter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/item/back/methods/item/filter.js b/modules/item/back/methods/item/filter.js index 0da463ad4..dc4c838c4 100644 --- a/modules/item/back/methods/item/filter.js +++ b/modules/item/back/methods/item/filter.js @@ -73,7 +73,7 @@ module.exports = Self => { case 'search': return /^\d+$/.test(value) ? {or: [{'i.id': value}, {'ib.code': value}]} - : {'i.name': {like: `%${value}%`}}; + : {or: [{'i.name': {like: `%${value}%`}}, {'ib.code': value}]}; case 'id': return {'i.id': value}; case 'description':