Removed custom fields from AssignedSearch to prevent confusing data in selectlist

Fixes [ch9193]
This commit is contained in:
snipe 2019-05-24 13:50:11 -07:00
parent c5a23e8f5e
commit 1e6c85da41

View file

@ -1038,9 +1038,7 @@ class Asset extends Depreciable
->orWhere('assets.order_number', 'LIKE', '%'.$search.'%')
->orWhere('assets.notes', 'LIKE', '%'.$search.'%');
}
foreach (CustomField::all() as $field) {
$query->orWhere('assets.'.$field->db_column_name(), 'LIKE', "%$search%");
}
})->withTrashed()->whereNull("assets.deleted_at"); //workaround for laravel bug
}