diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index c8ce28f0c8..e8ef1f3962 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -7,6 +7,7 @@ use App\Models\Actionlog; use App\Models\Asset; use App\Models\AssetMaintenance; use App\Models\CustomField; +use App\Models\Depreciation; use App\Models\License; use App\Models\Setting; use Carbon\Carbon; @@ -221,11 +222,12 @@ class ReportsController extends Controller public function getDeprecationReport() { + $depreciations = Depreciation::get(); // Grab all the assets $assets = Asset::with( 'assignedTo', 'assetstatus', 'defaultLoc', 'location', 'assetlog', 'company', 'model.category', 'model.depreciation') ->orderBy('created_at', 'DESC')->get(); - return view('reports/depreciation', compact('assets')); + return view('reports/depreciation', compact('assets'))->with('depreciations',$depreciations); } /** diff --git a/resources/views/reports/depreciation.blade.php b/resources/views/reports/depreciation.blade.php index a03e4e1206..6d2f4249a3 100644 --- a/resources/views/reports/depreciation.blade.php +++ b/resources/views/reports/depreciation.blade.php @@ -13,6 +13,9 @@