From 4818e1b8ca646fc64eb00839216be6b86256cea0 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 6 Nov 2017 10:26:09 -0800 Subject: [PATCH] Fixed sorting for filtered items by location --- app/Models/Asset.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Models/Asset.php b/app/Models/Asset.php index cb5aee97cd..29dd2d6cfe 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -939,8 +939,9 @@ class Asset extends Depreciable } } - if (($fieldname!='category') && ($fieldname!='status_label') && ($fieldname!='model')) { - $query->orWhere('assets.'.$fieldname, 'LIKE', '%' . $search_val . '%'); + if (($fieldname!='category') && ($fieldname!='location') + && ($fieldname!='status_label') && ($fieldname!='model')) { + $query->orWhere('assets.'.$fieldname, 'LIKE', '%' . $search_val . '%'); }