@for ($i=0;$i APOPSA EL SALVADOR
DIRECCION FINANCIERA
REPORTE DE VENTAS APROBADAS
DESDE:{{date("d/m/Y", strtotime($request->desde))}} || HASTA:{{date("d/m/Y", strtotime($request->hasta))}}

@php $totalP=0; @endphp @for ($j=0;$j<$ventas->count();$j++) @if ($ventas[$j]->creada_por==$vendedores[$i]) @php $totalP+=$profit[$j]; $num++; @endphp @endif @endfor
{{$vendedores[$i]}}
File Agente HBL/REF AGEN CARRIER SHIPPER CONSIGNEE CLIENTE IMPORT / EXPORT PO ORIGEN DESTINO CANTIDAD COSTO VENTA PROFIT
{{substr($ventas[$j]->file_code, 6)}} {{$ventas[$j]->proveedor}} {{$ventas[$j]->file_code}} {{$ventas[$j]->carrier}} {{$ventas[$j]->shipperht}} {{$ventas[$j]->consigneht}} {{$ventas[$j]->nombre_cliente}} {{$ventas[$j]->nombre_servicio}} {{$ventas[$j]->po}} {{$ventas[$j]->carga}} {{$ventas[$j]->descarga}} {{$cantidad[$j]}} ${{$costos[$j]}} ${{$ingresos[$j]}} ${{$profit[$j]}}

@php $acumuladoP=$totalP*100/20000; if($totalP<20000){ $pendiente=20000-$totalP; $pendienteP=$pendiente*100/20000; } else{ $pendiente=0; $pendienteP=0; } @endphp
Meta $20000 100%
Acumulado ${{$totalP}} {{$acumuladoP}}%
Pendiente ${{$pendiente}} {{$pendienteP}}%
@if ($i+1
@endif @endfor