diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 1ab2f41a7..c8437681e 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -1060,7 +1060,7 @@ class Asset extends Depreciable */ public function scopeOrderLocation($query, $order) { - return $query->join('locations', 'locations.id', '=', 'assets.rtd_location_id')->orderBy('locations.name', $order); + return $query->leftJoin('locations', 'locations.id', '=', 'assets.rtd_location_id')->orderBy('locations.name', $order); }