From bc14f225affe4d664b5d22c0f9e3183eb6c46aed Mon Sep 17 00:00:00 2001 From: Tim Bishop Date: Wed, 24 Jan 2018 16:55:51 +0000 Subject: [PATCH] Only use location currency if it's actually set. (#4904) This changes the depreciation report to only use the currency on a location if it's actually set to something. Previously, if an asset had a location it would use the currency even if it was blank rather than falling back to the default. --- resources/views/reports/depreciation.blade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) - @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) }} - @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()) }} - @if ($asset->location) + @if ($asset->location && $asset->location->currency) {{ $asset->location->currency }} @else {{ $snipeSettings->default_currency }}