Merge pull request 'fixes #4871 socialName-on-client-filter' (!1179) from 4871-socialName-on-client-filter into dev
gitea/salix/pipeline/head There was a failure building this commit Details

Reviewed-on: #1179
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Pau 2022-11-30 06:41:04 +00:00
commit 9d65d42922
1 changed files with 4 additions and 1 deletions

View File

@ -91,7 +91,10 @@ module.exports = Self => {
case 'search':
return /^\d+$/.test(value)
? {'c.id': {inq: value}}
: {'c.name': {like: `%${value}%`}};
: {or: [
{'c.name': {like: `%${value}%`}},
{'c.socialName': {like: `%${value}%`}},
]};
case 'name':
case 'salesPersonFk':
case 'fi':