@php
$previousLider = null;
$totalPolizas = 0;
$totalVentas = 0;
$totalTotales = 0;
$totalPolizasTotal = 0;
$totalVentasTotal = 0;
$totalTotalesTotal = 0;
@endphp
@foreach($data as $row)
@if($row->lider != $previousLider)
@if($previousLider != null)
| Total |
{{ $totalPolizas }} |
$ {{ number_format($totalVentas, 2, '.', ',') }} |
$ {{ number_format($totalTotales, 2, '.', ',') }} |
@endif
| {{ $row->lider }} |
| Honorario base |
@php
$previousLider = $row->lider;
$totalPolizas = 0;
$totalVentas = 0;
$totalTotales = 0;
@endphp
@endif
| {{ $row->nombre_completo }} |
{{ $row->conceptos }} |
{{ $row->porcentajes }} |
{{ $row->total_polizas }} |
$ {{ number_format($row->total_venta, 2, '.', ',') }} |
$ {{ number_format($row->sub_total, 2, '.', ',') }} |
@php
$totalPolizas += $row->total_polizas;
$totalVentas += $row->total_venta;
$totalTotales += $row->sub_total;
$totalPolizasTotal += $row->total_polizas;
$totalVentasTotal += $row->total_venta;
$totalTotalesTotal += $row->sub_total;
@endphp
@endforeach
| Total |
{{ $totalPolizas }} |
$ {{ number_format($totalVentas, 2, '.', ',') }} |
$ {{ number_format($totalTotales, 2, '.', ',') }} |
| Total |
{{ $totalPolizasTotal }} |
$ {{ number_format($totalVentasTotal, 2, '.', ',') }} |
$ {{ number_format($totalTotalesTotal, 2, '.', ',') }} |