| ANÁLISIS DE VENTAS Y RENTABILIDAD POR DÍA DE LA SEMANA (Desde: {{ $filtros['fi'] }} Hasta: {{ $filtros['ff'] }}) | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Filtro Tipo de Atención: {{ $filtros['tipoAtencion'] }} | |||||||||||
| Día de la Semana | Ocurrencias en Periodo | Ventas Brutas ($) | Devoluciones ($) | Venta Neta ($) | Costo Neto ($) | Utilidad Bruta ($) | Rentabilidad (%) | Promedio Diario ($) | Cant. Facturas | Ticket Promedio ($) | % Participación |
| {{ $row['nombre'] }} @if($esMejor) 🏆 (MEJOR DÍA) @endif | {{ $row['num_dias_periodo'] }} | {{ round($row['ventas_brutas']) }} | {{ round($row['devoluciones']) }} | {{ round($row['ventas_netas']) }} | {{ round($row['costo'] ?? $row['costo_neto'] ?? 0) }} | {{ round($row['utilidad'] ?? $row['utilidad_neta'] ?? 0) }} | {{ $row['rentabilidad'] ?? $row['rentabilidad_pct'] ?? 0 }}% | {{ round($row['promedio_diario']) }} | {{ $row['cantidad_facturas'] }} | {{ round($row['ticket_promedio']) }} | {{ $row['porcentaje'] }}% |
| TOTALES | - | {{ round($totales['gran_total_bruto'] ?? 0) }} | {{ round($totales['gran_total_dev'] ?? 0) }} | {{ round($totales['gran_total_neto']) }} | {{ round($totales['gran_total_costo'] ?? 0) }} | {{ round($totales['gran_total_utilidad'] ?? 0) }} | {{ $totales['gran_total_rentabilidad'] ?? 0 }}% | - | {{ $totales['gran_total_facturas'] }} | {{ round($totales['ticket_promedio_general']) }} | 100% |
| RENTABILIDAD POR CANAL DE ATENCIÓN (Mostrador, Domicilio, Convenios) | |||||
|---|---|---|---|---|---|
| Canal de Atención | Total Venta Neta ($) | Costo ($) | Utilidad ($) | Rentabilidad (%) | % Participación Venta |
| {{ $canalNombre }} | {{ round($cData['venta']) }} | {{ round($cData['costo']) }} | {{ round($cData['utilidad']) }} | {{ $cData['rentabilidad'] }}% | {{ $pctCanal }}% |
| {{ $tipoNombre }} | {{ round($valorTipo) }} | - | - | - | {{ $pctTipo }}% |
| MATRIZ HORARIA DE VENTAS POR DÍA DE LA SEMANA (DE 00 A 23 HORAS) | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DE_H_ | Lunes | % Lunes | Martes | % Martes | Miércoles | % Miér. | Jueves | % Juev. | Viernes | % Vier. | Sábado | % Sáb. | Domingo | % Dom. | Total H. | % Total |
| {{ $mRow['hora'] ?? $mRow['hora_label'] ?? $mRow['hora_codigo'] }} | @for($d = 1; $d <= 7; $d++) @php $vDiaHora = $mRow['dias'][$d]['venta'] ?? $mRow['dias'][$d]['ventas'] ?? 0; $pctDia = $mRow['dias'][$d]['pct_dia_venta'] ?? 0; if ($pctDia == 0 && isset($totMatrizDias['ventas'][$d]) && $totMatrizDias['ventas'][$d] > 0) { $pctDia = round(($vDiaHora / $totMatrizDias['ventas'][$d]) * 100, 1); } $isPeak = $pctDia >= 8.5; @endphp@if($vDiaHora > 0) {{ round($vDiaHora) }} @else - @endif | {{ $pctDia > 0 ? $pctDia . '%' : '-' }} | @endfor@if(($mRow['total_hora_venta'] ?? $mRow['total_hora'] ?? 0) > 0) {{ round($mRow['total_hora_venta'] ?? $mRow['total_hora']) }} @else - @endif | {{ ($mRow['pct_gran_total_venta'] ?? $mRow['pct_total'] ?? 0) > 0 ? ($mRow['pct_gran_total_venta'] ?? $mRow['pct_total']) . '%' : '-' }} | ||||||||||||
| Total Día | @for($d = 1; $d <= 7; $d++) @php $totDia = $totMatrizDias['ventas'][$d] ?? $totMatrizDias[$d]['ventas'] ?? 0; @endphp{{ round($totDia) }} | 100% | @endfor{{ round($totales['gran_total_neto']) }} | 100% | ||||||||||||
| MATRIZ HORARIA DE UTILIDAD BRUTA POR DÍA DE LA SEMANA (DE 00 A 23 HORAS) | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DE_H_ | Lunes | % Lunes | Martes | % Martes | Miércoles | % Miér. | Jueves | % Juev. | Viernes | % Vier. | Sábado | % Sáb. | Domingo | % Dom. | Total H. | Margen H. |
| {{ $mRow['hora'] ?? $mRow['hora_label'] ?? $mRow['hora_codigo'] }} | @for($d = 1; $d <= 7; $d++) @php $uDiaHora = $mRow['dias'][$d]['utilidad'] ?? 0; $pctDiaU = $mRow['dias'][$d]['pct_dia_utilidad'] ?? 0; if ($pctDiaU == 0 && isset($totMatrizDias['utilidades'][$d]) && $totMatrizDias['utilidades'][$d] > 0) { $pctDiaU = round(($uDiaHora / $totMatrizDias['utilidades'][$d]) * 100, 1); } $isPeakU = $pctDiaU >= 8.5; @endphp@if($uDiaHora > 0) {{ round($uDiaHora) }} @else - @endif | {{ $pctDiaU > 0 ? $pctDiaU . '%' : '-' }} | @endfor@if(($mRow['total_hora_utilidad'] ?? 0) > 0) {{ round($mRow['total_hora_utilidad']) }} @else - @endif | {{ ($mRow['rentabilidad_hora'] ?? 0) > 0 ? ($mRow['rentabilidad_hora']) . '%' : '-' }} | ||||||||||||
| Total Día | @for($d = 1; $d <= 7; $d++) @php $totDiaU = $totMatrizDias['utilidades'][$d] ?? $totMatrizDias[$d]['utilidad'] ?? 0; @endphp{{ round($totDiaU) }} | 100% | @endfor{{ round($totales['gran_total_utilidad']) }} | {{ $totales['gran_total_rentabilidad'] }}% | ||||||||||||