@if( count($ventas) == 0)
{{ $ventas[0]->created_at }}
Num comanda | Detalle | Tipo de pago | Total | Fecha y hora | Borrar | @foreach ($ventas as $venta) @if ($venta->tipo != "Reparto")
---|---|---|---|---|---|
{{ $venta->comanda }} | {{ $venta->detalle }} | {{ $venta->tipo_de_pago }} | {{ $venta->total }} | {{ $venta->created_at }} | delete |
Total | @php $total = 0; for ( $i = 0 ; $i < count($ventas) ; $i++ ){ if ( $ventas[$i]->tipo != "Reparto"){ $total = $total + $ventas[$i]->total; } } @endphp $ {{ number_format($total, 0, ",", ".")}} |
Num comanda | Detalle | Tipo de pago | Total | Fecha y hora | Borrar | @foreach ($ventas as $venta) @if ($venta->tipo == "Reparto")
---|---|---|---|---|---|
{{ $venta->comanda }} | {{ $venta->detalle }} | {{ $venta->tipo_de_pago }} | {{ $venta->total }} | {{ $venta->created_at }} | delete |
Total | @php $total = 0; for ( $i = 0 ; $i < count($ventas) ; $i++ ){ if ( $ventas[$i]->tipo == "Reparto"){ $total = $total + $ventas[$i]->total; } } @endphp $ {{ number_format($total, 0, ",", ".")}} |