@isset($activo) @php $nombreArchivo = 'Vendedor'; if ($agruparPor == 'usuario') $nombreArchivo = 'Usuario'; elseif ($agruparPor == 'marca') $nombreArchivo = 'Marca'; elseif ($agruparPor == 'categoria') $nombreArchivo = 'Categoria'; header("Cache-Control: maxage=1"); header("Pragma: public"); header('Content-type: application/vnd.ms-excel'); header("Content-Disposition: attachment; filename=Resumen_Ventas_".$nombreArchivo.".xls"); header("Pragma: no-cache"); header("Expires: 0"); @endphp @endisset
| @if($agruparPor == 'usuario') Usuario @elseif($agruparPor == 'marca') Codigo Marca @elseif($agruparPor == 'categoria') Codigo Categoria @else Codigo Vendedor @endif | @if($agruparPor == 'usuario') Nombre Usuario @elseif($agruparPor == 'marca') Nombre Marca @elseif($agruparPor == 'categoria') Nombre Categoria @else Nombre Vendedor @endif | Cant Facturas | Venta Bruta | Devoluciones | Venta Neta | Base IVA | Total IVA |
|---|---|---|---|---|---|---|---|
| {{ $item['codigo'] }} | {{ $item['nombre'] }} | {{ $item['cant_facturas'] }} | {{ round($item['venta_bruta'], 2) }} | {{ round($item['devolucion'], 2) }} | {{ round($item['venta_neta'], 2) }} | {{ round($item['base_iva'], 2) }} | {{ round($item['total_iva'], 2) }} |
| TOTAL GENERAL: | {{ $totFacturas }} | {{ round($totVentaBruta, 2) }} | {{ round($totDevolucion, 2) }} | {{ round($totVentaNeta, 2) }} | {{ round($totBaseIva, 2) }} | {{ round($totTotalIva, 2) }} | |