Check for purchase_cost before adding the “each”

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2025-03-04 19:50:11 +00:00
parent 45317c0959
commit 1dacd25e6d

View file

@ -1211,7 +1211,11 @@
<a href="{{ route('components.show', $component->id) }}">{{ $component->name }}</a>
</td>
<td>{{ $component->pivot->assigned_qty }}</td>
<td>{{ trans('general.cost_each', ['amount' => Helper::formatCurrencyOutput($component->purchase_cost)]) }} </td>
<td>
@if ($component->purchase_cost!='')
{{ trans('general.cost_each', ['amount' => Helper::formatCurrencyOutput($component->purchase_cost)]) }}
@endif
</td>
<td>{{ $component->serial }}</td>
<td>
<a href="{{ route('components.checkin.show', $component->pivot->id) }}" class="btn btn-sm bg-purple hidden-print" data-tooltip="true">{{ trans('general.checkin') }}</a>