Dashboard {{-- ── Stat cards ── --}}
Cotizaciones
{{ $totalQuotations }}
Clientes
{{ $totalClients }}
Productos
{{ $totalProducts }}
TOTAL ({{ $globalCurrency }})
{{ $globalSym }} {{ number_format($totalAmount,2) }}
{{-- ── Row 1: Line chart + Status list ── --}}
Actividad de Cotizaciones
Últimos 6 meses — monto total emitido
+ Nueva
Por Estado
@php $statusCfg = [ 'Borrador' => ['class'=>'badge-gray', 'color'=>'#a0aec0'], 'Emitida' => ['class'=>'badge-blue', 'color'=>'#4299e1'], 'Aprobada' => ['class'=>'badge-green', 'color'=>'#48bb78'], 'Rechazada' => ['class'=>'badge-red', 'color'=>'#f56565'], ]; @endphp
@foreach($statusCfg as $st => $cfg) @php $cnt = $byStatus[$st] ?? 0; $pct = $totalQuotations > 0 ? round($cnt/$totalQuotations*100) : 0; @endphp
{{ $st }} {{ $cnt }}
@endforeach
{{-- ── Row 2: Quotations table + Bar chart ── --}}
Cotizaciones Recientes
Ver todas
@forelse($recentQuotations as $q) @empty @endforelse
NúmeroClienteTotalEstadoFecha
{{ $q->quotation_number }} {{ $q->client->name ?? '—' }} {{ $q->currency_symbol }} {{ number_format($q->total,2) }} {{ $q->status }} {{ $q->issue_date->format('d/m/Y') }}
Sin cotizaciones aún
Volumen por Estado
Nueva Cotización
@php $jsStatus = json_encode($byStatus); $jsMonthly = json_encode($monthlyData ?? [0,0,0,0,0,0]); $jsLabels = json_encode($monthLabels ?? ['Nov','Dic','Ene','Feb','Mar','Abr']); @endphp