@php $fmt = fn($n) => number_format((float)$n, 2, '.', ','); //$fmtRaw = fn($n) => (string) (int) round((float)$n); $fmtRaw = fn($n) => number_format((float)$n, 2, '.', ''); // en vez de (string)(int) round(...) $print = !empty($raw) ? $fmtRaw : $fmt; @endphp
@if(!empty($title))
{{ $title }}
@endif
@foreach($cards as $card)
{{ $card['label'] }}
@if(!is_null($card['usd']))
USD En stock
{{ $print($card['usd']) }}
@endif
{{ $primaryCode ?? 'PRIM' }} En stock
{{ $print($card['primary']) }}
@endforeach