diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php
index d99ad6d3e0..7deac834e4 100644
--- a/app/Http/Controllers/ReportsController.php
+++ b/app/Http/Controllers/ReportsController.php
@@ -95,6 +95,7 @@ class ReportsController extends Controller
*/
public function getAssetsReport()
{
+ $settings = \App\Models\Setting::first();
// Grab all the assets
$assets = Asset::with(
'model',
@@ -109,7 +110,7 @@ class ReportsController extends Controller
->orderBy('created_at', 'DESC')
->get();
- return View::make('reports/asset', compact('assets'));
+ return View::make('reports/asset', compact('assets'))->with('settings',$settings);
}
/**
diff --git a/resources/views/reports/asset.blade.php b/resources/views/reports/asset.blade.php
index 21754c7925..0aee0e7ab5 100644
--- a/resources/views/reports/asset.blade.php
+++ b/resources/views/reports/asset.blade.php
@@ -37,7 +37,7 @@
{{ trans('admin/hardware/form.manufacturer') }} |
{{ trans('admin/hardware/form.model') }} |
{{ trans('general.model_no') }} |
- @if (\App\Models\Setting::getSettings()->display_asset_name)
+ @if ($settings->display_asset_name)
{{ trans('general.name') }} |
@endif
{{ trans('admin/hardware/table.serial') }} |
@@ -63,7 +63,7 @@
{{ $asset->model->name }} |
{{ $asset->model->modelno }} |
- @if (\App\Models\Setting::getSettings()->display_asset_name)
+ @if ($settings->display_asset_name)
{{ $asset->name }} |
@endif
{{ $asset->serial }} |
@@ -76,7 +76,7 @@
@endif
{{ $asset->purchase_date }} |
- {{ \App\Models\Setting::first()->default_currency }}
+ | {{ $settings->default_currency }}
{{ number_format($asset->purchase_cost) }}
|
@@ -134,7 +134,7 @@
iconsPrefix: 'fa',
showRefresh: true,
search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
+ pageSize: {{ $settings->per_page }},
pagination: true,
sidePagination: 'client',
sortable: true,
|