@php
$coin_simbol =
$cuenta->tipomoneda->nombre == 'DOLARES' ? '$' : 'S/.';
$ingresosTotal = $cuenta->ingresos->sum('monto');
$salidasTotal = $cuenta->salidas->sum('monto');
$difference = $ingresosTotal - $salidasTotal;
@endphp
{{ $coin_simbol }}
@if ($cuenta)
{{ number_format($difference, 2) }}
@else
0
@endif