mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Use new location method for hardware view
This commit is contained in:
parent
0a114c7daf
commit
3991f79115
|
@ -594,8 +594,8 @@ class AssetsController extends Controller
|
||||||
|
|
||||||
|
|
||||||
if (isset($asset)) {
|
if (isset($asset)) {
|
||||||
if (!is_null($asset->assetloc)) {
|
if ($asset->location) {
|
||||||
$use_currency = $asset->assetloc->currency;
|
$use_currency = $asset->location->currency;
|
||||||
} else {
|
} else {
|
||||||
if ($settings->default_currency!='') {
|
if ($settings->default_currency!='') {
|
||||||
$use_currency = $settings->default_currency;
|
$use_currency = $settings->default_currency;
|
||||||
|
|
|
@ -224,10 +224,10 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ trans('admin/hardware/form.cost') }}</td>
|
<td>{{ trans('admin/hardware/form.cost') }}</td>
|
||||||
<td>
|
<td>
|
||||||
@if (($asset->id) && ($asset->userloc))
|
@if (($asset->id) && ($asset->location))
|
||||||
{{ $asset->userloc->currency }}
|
{{ $asset->location->currency }}
|
||||||
@elseif (($asset->id) && ($asset->assetloc))
|
@elseif (($asset->id) && ($asset->location))
|
||||||
{{ $asset->assetloc->currency }}
|
{{ $asset->location->currency }}
|
||||||
@else
|
@else
|
||||||
{{ $snipeSettings->default_currency }}
|
{{ $snipeSettings->default_currency }}
|
||||||
@endif
|
@endif
|
||||||
|
@ -335,16 +335,16 @@
|
||||||
<td> {!! nl2br(e($asset->notes)) !!}</td>
|
<td> {!! nl2br(e($asset->notes)) !!}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@if ($asset->assetloc)
|
@if ($asset->location)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ trans('general.location') }}</td>
|
<td>{{ trans('general.location') }}</td>
|
||||||
<td>
|
<td>
|
||||||
@can('superuser')
|
@can('superuser')
|
||||||
<a href="{{ route('locations.show', ['location' => $asset->assetloc->id]) }}">
|
<a href="{{ route('locations.show', ['location' => $asset->location->id]) }}">
|
||||||
{{ $asset->assetloc->name }}
|
{{ $asset->location->name }}
|
||||||
</a>
|
</a>
|
||||||
@else
|
@else
|
||||||
{{ $asset->assetloc->name }}
|
{{ $asset->location->name }}
|
||||||
@endcan
|
@endcan
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Reference in a new issue