diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 3466cbffe7..0bbb06aa13 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -1187,7 +1187,9 @@ class Asset extends Depreciable public function scopeRequestableAssets($query) { - return Company::scopeCompanyables($query->where('requestable', '=', 1)) + $table = $query->getModel()->getTable(); + + return Company::scopeCompanyables($query->where($table.'.requestable', '=', 1)) ->whereHas('assetstatus', function ($query) { $query->where(function ($query) { $query->where('deployable', '=', 1) diff --git a/resources/views/account/requestable-assets.blade.php b/resources/views/account/requestable-assets.blade.php index b17fd98e82..18b9232898 100644 --- a/resources/views/account/requestable-assets.blade.php +++ b/resources/views/account/requestable-assets.blade.php @@ -109,8 +109,14 @@ +