mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Add depreciation name and months to depreciation report
This commit is contained in:
parent
0568e979e8
commit
7ee13113e0
|
@ -232,7 +232,7 @@ class ReportsController extends Controller
|
|||
{
|
||||
|
||||
// Grab all the assets
|
||||
$assets = Asset::with('model', 'assigneduser', 'assetstatus', 'defaultLoc', 'assetlog', 'company')
|
||||
$assets = Asset::with('model', 'assigneduser', 'assetstatus', 'defaultLoc', 'assetlog', 'company', 'depreciation')
|
||||
->orderBy('created_at', 'DESC')->get();
|
||||
|
||||
return View::make('reports/depreciation', compact('assets'));
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
<th class="col-sm-1">{{ trans('general.name') }}</th>
|
||||
@endif
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.serial') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/depreciations/general.depreciation_name') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/depreciations/general.number_of_months') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.checkoutto') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.location') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.purchase_date') }}</th>
|
||||
|
@ -59,6 +61,16 @@
|
|||
<td>{{ $asset->name }}</td>
|
||||
@endif
|
||||
<td>{{ $asset->serial }}</td>
|
||||
<td>
|
||||
@if ($asset->model->depreciation)
|
||||
{{ $asset->model->depreciation->name }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($asset->model->depreciation)
|
||||
{{ $asset->model->depreciation->months }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($asset->assigneduser)
|
||||
@if ($asset->assigneduser->deleted_at!='')
|
||||
|
|
Loading…
Reference in a new issue