From 052132ec37a9faec5fe44ba87cde5011c6a20695 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 5 Mar 2018 20:57:50 -0800 Subject: [PATCH] Remove pyrchase cost from accessory search --- app/Models/Accessory.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/Models/Accessory.php b/app/Models/Accessory.php index e743c2efda..a589c8be66 100755 --- a/app/Models/Accessory.php +++ b/app/Models/Accessory.php @@ -167,8 +167,7 @@ class Accessory extends SnipeModel return $query->where(function ($query) use ($search) { $query->whereHas('category', function ($query) use ($search) { - $query->where('categories.name', 'LIKE', '%'.$search.'%') - ->where('categories.category_type', '=', 'accessory'); + $query->where('categories.name', 'LIKE', '%'.$search.'%'); })->orWhere(function ($query) use ($search) { $query->whereHas('company', function ($query) use ($search) { $query->where('companies.name', 'LIKE', '%'.$search.'%'); @@ -179,8 +178,7 @@ class Accessory extends SnipeModel }); })->orWhere('accessories.name', 'LIKE', '%'.$search.'%') ->orWhere('accessories.model_number', 'LIKE', '%'.$search.'%') - ->orWhere('accessories.order_number', 'LIKE', '%'.$search.'%') - ->orWhere('accessories.purchase_cost', '=', $search); + ->orWhere('accessories.order_number', 'LIKE', '%'.$search.'%'); }); }