Scope requestable assets to company as well. Updates to #2206. (#2326)

This commit is contained in:
Daniel Meltzer 2016-07-26 18:22:56 -05:00 committed by snipe
parent 9e4ac018ea
commit 399e70763b

View file

@ -645,7 +645,7 @@ class Asset extends Depreciable
public function scopeRequestableAssets($query)
{
return $query->where('requestable', '=', 1)
return Company::scopeCompanyables($query->where('requestable', '=', 1))
->whereHas('assetstatus', function ($query) {
$query->where('deployable', '=', 1)