fix search by string barcode #1381
gitea/salix/dev This commit looks good Details

This commit is contained in:
Joan Sanchez 2019-04-25 13:51:34 +02:00
parent aec46bb855
commit 4465f48afe
1 changed files with 1 additions and 1 deletions

View File

@ -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':