mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Better handling for show/hide columns in depreciation report
This commit is contained in:
parent
7ee13113e0
commit
b0b7cfa999
|
@ -232,7 +232,7 @@ class ReportsController extends Controller
|
|||
{
|
||||
|
||||
// Grab all the assets
|
||||
$assets = Asset::with('model', 'assigneduser', 'assetstatus', 'defaultLoc', 'assetlog', 'company', 'depreciation')
|
||||
$assets = Asset::with('model', 'assigneduser', 'assetstatus', 'defaultLoc', 'assetlog', 'company')
|
||||
->orderBy('created_at', 'DESC')->get();
|
||||
|
||||
return View::make('reports/depreciation', compact('assets'));
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
data-cookie-id-table="depreciationReportTable">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-sm-1">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th class="col-sm-1" data-visible="false">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th class="col-sm-1" data-visible="false">{{ trans('admin/categories/general.category_name') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.asset_tag') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.title') }}</th>
|
||||
@if (\App\Models\Setting::getSettings()->display_asset_name)
|
||||
|
@ -48,6 +49,12 @@
|
|||
@foreach ($assets as $asset)
|
||||
<tr>
|
||||
<td>{{ is_null($asset->company) ? '' : $asset->company->name }}</td>
|
||||
<td>
|
||||
@if ($asset->model)
|
||||
{{ $asset->model->category->name }}
|
||||
@endif
|
||||
|
||||
</td>
|
||||
<td>
|
||||
@if ($asset->deleted_at!='')
|
||||
<del>{{ $asset->asset_tag }}</del>
|
||||
|
@ -68,7 +75,7 @@
|
|||
</td>
|
||||
<td>
|
||||
@if ($asset->model->depreciation)
|
||||
{{ $asset->model->depreciation->months }}
|
||||
{{ $asset->model->depreciation->months }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
|
|
Loading…
Reference in a new issue