@extends('layouts.app') @section('title', 'Resumen de Comisiones por Vendedor') @section('content')

Resumen de Comisiones por Vendedor

@if($summary)
Total Ventas

{{ number_format($summary['total_sales'], 2) }} {{ getMainCurrency() }}

Comisiones Ganadas

{{ number_format($summary['earned_commissions'], 2) }} {{ getMainCurrency() }}

Comisiones Pendientes

{{ number_format($summary['pending_commissions'], 2) }} {{ getMainCurrency() }}

Comisiones Perdidas

{{ number_format($summary['lost_commissions'], 2) }} {{ getMainCurrency() }}

Estadísticas Adicionales
Total de Comisiones: {{ number_format($summary['total_commissions'], 2) }} {{ getMainCurrency() }}
Comisiones Pagadas: {{ number_format($summary['paid_commissions'], 2) }} {{ getMainCurrency() }}
Comisiones Vencidas: {{ $summary['overdue_count'] }}
Rendimiento
@php $performanceRate = $summary['total_sales'] > 0 ? ($summary['earned_commissions'] / $summary['total_sales']) * 100 : 0; $successRate = $summary['total_commissions'] > 0 ? ($summary['earned_commissions'] / $summary['total_commissions']) * 100 : 0; @endphp
Tasa de Rendimiento: {{ number_format($performanceRate, 2) }}%
Tasa de Éxito: {{ number_format($successRate, 2) }}%
Distribución de Comisiones
Ganadas
Ganadas: {{ number_format($summary['earned_commissions'], 2) }}
Pendientes
Pendientes: {{ number_format($summary['pending_commissions'], 2) }}
Perdidas
Perdidas: {{ number_format($summary['lost_commissions'], 2) }}
Pagadas
Pagadas: {{ number_format($summary['paid_commissions'], 2) }}
@else

Selecciona un vendedor para ver su resumen de comisiones

@endif
@endsection