mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Remove pyrchase cost from accessory search
This commit is contained in:
parent
2df19bcbb4
commit
052132ec37
|
@ -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.'%');
|
||||
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue