From 399e70763b668b7d4d1f2bb5d7eb2a0cc3e86bec Mon Sep 17 00:00:00 2001 From: Daniel Meltzer Date: Tue, 26 Jul 2016 18:22:56 -0500 Subject: [PATCH] Scope requestable assets to company as well. Updates to #2206. (#2326) --- app/Models/Asset.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 3a898816b5..0fa8e30ffd 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -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)