Better handling for show/hide columns in depreciation report

This commit is contained in:
snipe 2016-05-18 16:06:29 -07:00
parent 7ee13113e0
commit b0b7cfa999
2 changed files with 10 additions and 3 deletions

View file

@ -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'));

View file

@ -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>