Merge pull request #10086 from snipe/fixes_depreciation_report

Fixed extraneous asset search in depreciation report
This commit is contained in:
snipe 2021-09-15 13:54:32 -07:00 committed by GitHub
commit e8ad5dc273
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,11 +102,7 @@ class ReportsController extends Controller
{ {
$this->authorize('reports.view'); $this->authorize('reports.view');
$depreciations = Depreciation::get(); $depreciations = Depreciation::get();
// Grab all the assets return view('reports/depreciation')->with('depreciations',$depreciations);
$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);
} }
/** /**