Filter by depreciation_id

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-08-28 12:40:12 +01:00
parent 4839181beb
commit c6ddc501c5

View file

@ -78,6 +78,10 @@ class AssetModelsController extends Controller
$assetmodels = $assetmodels->where('models.category_id', '=', $request->input('category_id')); $assetmodels = $assetmodels->where('models.category_id', '=', $request->input('category_id'));
} }
if ($request->filled('depreciation_id')) {
$assetmodels = $assetmodels->where('models.depreciation_id', '=', $request->input('depreciation_id'));
}
if ($request->filled('search')) { if ($request->filled('search')) {
$assetmodels->TextSearch($request->input('search')); $assetmodels->TextSearch($request->input('search'));
} }