@if( count($ventas) == 0)
Número de boleta | Cantidad | Detalle de venta | Tipo de pago | Hora | Vendido por | Comisión | @if(Auth::user()->tipo != 'user')IVA a pagar | @endif | Total | @foreach ($ventas as $venta)
---|---|---|---|---|---|---|---|---|
{{ $venta->num_boleta }} | {{ $venta->numero }} | {{ $venta->detalle }} | {{ $venta->tipo_de_pago }} | {{ $venta->created_at }} | {{ $venta->vendido_por }} | ${{ number_format($venta->comision, 0, ",", ".") }} | @if(Auth::user()->tipo != 'user')${{ number_format((($venta->total*19)/119), 0, ",", ".") }} | @endif${{ number_format($venta->total, 0, ",", ".") }} |
@if(Auth::user()->tipo != 'user') | @endif | Total | @php $total = 0; for ( $i = 0 ; $i < count($ventas) ; $i++ ){ $total = $total + $ventas[$i]->total; } @endphp $ {{ number_format($total, 0, ",", ".")}} | @if(Auth::user()->tipo != 'user')@php $iva_total = 0; for ( $i = 0 ; $i < count($ventas) ; $i++ ){ $iva_total = $iva_total + $ventas[$i]->total; } @endphp $ {{ number_format((($iva_total*19)/119), 0, ",", ".")}} | @endif||||
Total final | @php $tf = $total - (($iva_total*19)/119); @endphp $ {{ number_format($tf, 0, ",", ".")}} |