Skip to content

A free open source IT asset/license management system

Remove asset call on depreciation report controller method

snipe8a93e1e7963d
diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php
index 4b92634b4d..a8c38d77ab 100644
--- a/app/Http/Controllers/ReportsController.php
+++ b/app/Http/Controllers/ReportsController.php
@@ -102,11 +102,7 @@ class ReportsController extends Controller
{
$this->authorize('reports.view');
$depreciations = Depreciation::get();
- // Grab all the assets
- $assets = Asset::with( 'assignedTo', 'assetstatus', 'defaultLoc', 'location', 'company', 'model.category', 'model.depreciation')
- ->orderBy('created_at', 'DESC')->get();
-
- return view('reports/depreciation', compact('assets'))->with('depreciations',$depreciations);
+ return view('reports/depreciation')->with('depreciations',$depreciations);
}
/**