@foreach($zonales as $zonal => $resultados)
| Tipo | Condición | Elemento | Cantidad | Tarifa | Total $ | TB | IB | TV | CM |
|---|---|---|---|---|---|---|---|---|---|
| {{ $resultado->tipo }} | {{ $resultado->condicion }} | {{ $resultado->nombre }} | {{ $resultado->total_cantidad }} | {{ $resultado->tarifa }} | {{ $resultado->total_cantidad * $resultado->tarifa }} | @php $total = $resultado->total_cantidad * $resultado->tarifa; $count = 0; if($resultado->TB) $count++; if($resultado->IB) $count++; if($resultado->TV) $count++; if($resultado->CM) $count++; $divided_total = $count > 0 ? $total / $count : 0; @endphp@if($resultado->TB) {{ $divided_total }} @endif | @if($resultado->IB) {{ $divided_total }} @endif | @if($resultado->TV) {{ $divided_total }} @endif | @if($resultado->CM) {{ $divided_total }} @endif |