Skip to content

A free open source IT asset/license management system

Only use location currency if it's actually set. (#4904)

Tim Bishopbc14f225affe
diff --git a/resources/views/reports/depreciation.blade.php b/resources/views/reports/depreciation.blade.php
index f36f24483a..792f75c8d6 100644
--- a/resources/views/reports/depreciation.blade.php
+++ b/resources/views/reports/depreciation.blade.php
@@ -99,7 +99,7 @@
@if ($asset->purchase_cost > 0)
<td class="align-right">
- @if ($asset->location )
+ @if ($asset->location && $asset->location->currency)
{{ $asset->location->currency }}
@else
{{ $snipeSettings->default_currency }}
@@ -107,7 +107,7 @@
{{ \App\Helpers\Helper::formatCurrencyOutput($asset->purchase_cost) }}
</td>
<td class="align-right">
- @if ($asset->location )
+ @if ($asset->location && $asset->location->currency)
{{ $asset->location->currency }}
@else
{{ $snipeSettings->default_currency }}
@@ -116,7 +116,7 @@
{{ \App\Helpers\Helper::formatCurrencyOutput($asset->getDepreciatedValue()) }}
</td>
<td class="align-right">
- @if ($asset->location)
+ @if ($asset->location && $asset->location->currency)
{{ $asset->location->currency }}
@else
{{ $snipeSettings->default_currency }}