mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
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.
This commit is contained in:
parent
fcb5eea951
commit
bc14f225af
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue