@props(['amount', 'showBoth' => true, 'class' => '', 'currency' => 'USD']) @php $isVenezuela = is_venezuela_company(); $rate = $isVenezuela ? \App\Models\ExchangeRate::getLatestRate('USD') : null; $amountValue = is_numeric($amount) ? (float) $amount : 0; $config = get_regional_config(); $currencySymbol = $config['currency_symbol'] ?? '$'; $decimalSep = $config['decimal_separator'] ?? '.'; $thousandSep = $config['thousand_separator'] ?? ','; $decimals = $config['decimals'] ?? 2; @endphp @if($isVenezuela && $showBoth && $rate) {{-- Para Venezuela: USD como principal + Bs como conversión --}} ${{ number_format($amountValue, 2, '.', ',') }} Bs. {{ number_format($amountValue * $rate, 2, ',', '.') }} @else {{-- Para otros países: usar símbolo y formato regional --}} {{ $currencySymbol }}{{ number_format($amountValue, $decimals, $decimalSep, $thousandSep) }} @endif