Merge remote-tracking branch 'origin/develop'

This commit is contained in:
snipe 2021-08-20 17:30:52 -07:00
commit 9285697611
2 changed files with 5 additions and 1 deletions

View file

@ -42,6 +42,10 @@ class ConsumablesController extends Controller
$consumables->where('category_id','=',$request->input('category_id'));
}
if ($request->filled('model_number')) {
$consumables->where('model_number','=',$request->input('model_number'));
}
if ($request->filled('manufacturer_id')) {
$consumables->where('manufacturer_id','=',$request->input('manufacturer_id'));
}

View file

@ -78,7 +78,7 @@ class Consumable extends SnipeModel
*
* @var array
*/
protected $searchableAttributes = ['name', 'order_number', 'purchase_cost', 'purchase_date', 'item_no'];
protected $searchableAttributes = ['name', 'order_number', 'purchase_cost', 'purchase_date', 'item_no', 'model_number'];
/**
* The relations and their attributes that should be included when searching the model.