@php $total_cant=0; $total_ptotal=0; $total_comision=0; $total_cuota=0; @endphp @foreach($datos as $k=>$row) @php $vendedor=\App\Vendedor::find($k); $subtotal_cant=0; $subtotal_ptotal=0; $subtotal_comision=0; $subtotal_cuota=0; @endphp @foreach($row as $k2=>$v) @php $subtotal_cant+=$v->cont; $subtotal_ptotal+=$v->ptotal; $subtotal_comision+=$v->comision; $subtotal_cuota+=$v->cuota; $total_cant+=$subtotal_cant; $total_ptotal+=$subtotal_ptotal; $total_comision+=$subtotal_comision; $total_cuota+=$subtotal_cuota; @endphp @endforeach @endforeach
EJECUTIVOS DE VENTAS CANT PRECO VENTA PRECIO BASICO CUOTA I. % SALDO COMISION % COMISION
{{$vendedor->nombre_completo}} {{$v->cont}} {{round($v->ptotal,2)}} {{round($v->comision,2)}} {{round($v->cuota,2)}}
TOTAL PRODUCCION {{$vendedor->nombre_completo}} {{$subtotal_cant}} {{ round($subtotal_ptotal,2)}} {{ round($subtotal_comision,2)}} {{ round($subtotal_cuota,2)}}
TOTALES {{round($total_cant,2)}} {{round($total_ptotal,2)}} {{round($total_comision,2)}} {{round($total_cuota,2)}}