@if($viewMode === 'list') Gestión de Colmados @elseif($viewMode === 'billing') Resumen General @else Inventario @endif

@if($viewMode === 'list') @endif
AD
Admin Central
@if (session()->has('message'))
{{ session('message') }}
@endif @if($viewMode === 'list')
@foreach ($businesses as $business)
{{ substr($business->name, 0, 1) }}

{{ $business->name }}

{{ strtoupper($business->status) }}
PWA
HUB
{{ $business->phone ?? 'Sin teléfono' }}
{{ $business->address ?? 'Dirección no especificada' }}

Licencias Activas

@forelse ($business->licenses as $license)

{{ $license->license_key }}

{{ $license->billing_cycle }} • RD$ {{ number_format($license->price, 0) }}

@empty

Sin licencias

@endforelse
@endforeach
@endif @if($viewMode === 'products')

Inventario: {{ $selectedBusiness->name }}

@if($importFile) @endif
@forelse($products as $product) @empty @endforelse
Producto Categoría Unidad Costo Venta Existencia Acciones

{{ $product->name }}

{{ $product->barcode ?: 'S/C' }}

{{ $product->category }} {{ $product->unit ?? 'Un' }} RD$ {{ number_format($product->cost, 2) }} RD$ {{ number_format($product->price, 2) }} {{ $product->stock }} {{ strtolower($product->unit ?? 'un') }}
No hay productos.
@endif @if($viewMode === 'billing')
@php $stats_cards = [ ['label' => 'Colmados', 'value' => $stats['total_businesses'] ?? 0, 'icon' => 'M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16'], ['label' => 'Licencias OK', 'value' => $stats['active_licenses'] ?? 0, 'icon' => 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z'], ['label' => 'Por Cobrar', 'value' => 'RD$ '.number_format($stats['total_invoiced'] ?? 0, 0), 'icon' => 'M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2'], ['label' => 'Pendientes', 'value' => $stats['pending_invoices'] ?? 0, 'icon' => 'M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z'], ['label' => 'Productos', 'value' => $stats['total_products'] ?? 0, 'icon' => 'M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4'], ]; @endphp @foreach($stats_cards as $sc)

{{ $sc['label'] }}

{{ $sc['value'] }}

@endforeach
@if($selectedBusinessId)

Cuentas por Cobrar: {{ $selectedBusiness->name }}

@forelse($invoices as $invoice)
#{{ $invoice->id }} {{ strtoupper($invoice->status) }}

RD$ {{ number_format($invoice->amount, 0) }}

{{ $invoice->period_start->format('d/m') }} - {{ $invoice->period_end->format('d/m/Y') }}

@if($invoice->status === 'pending') @endif
@empty
No hay facturas registradas.
@endforelse
@else

Ingresos Recaudados (Facturas Pagadas)

Este Mes

RD$ {{ number_format($stats['revenue_month'] ?? 0, 0) }}

Este Año

RD$ {{ number_format($stats['revenue_year'] ?? 0, 0) }}

Métricas de Suscripción

MRR Estimado

RD$ {{ number_format($stats['mrr'] ?? 0, 0) }}

ARR Estimado

RD$ {{ number_format($stats['arr'] ?? 0, 0) }}

Próximas Renovaciones

@if(isset($stats['upcoming_renewals']) && count($stats['upcoming_renewals']) > 0) @foreach($stats['upcoming_renewals'] as $renewal)

{{ $renewal->business->name ?? 'Colmado Borrado' }}

••••-{{ substr($renewal->license_key, -4) }} {{ $renewal->billing_cycle }}

RD$ {{ number_format($renewal->price, 0) }}

En {{ \Carbon\Carbon::parse($renewal->expires_at)->diffInDays(now()) }} días

@endforeach @else

No hay renovaciones en los próximos 30 días

@endif
@endif
@endif @if($viewMode === 'profiles')

Perfiles de Negocio & Configuración

Definición de etiquetas predeterminadas por tipo

@php $profileDefaults = [ ['id' => 'colmado', 'name' => 'Colmado', 'pos' => 'Caja / POS', 'inv' => 'Inventario', 'cli' => 'Fiado', 'rep' => 'Reportes'], ['id' => 'cafeteria', 'name' => 'Cafetería', 'pos' => 'Comanda', 'inv' => 'Menú', 'cli' => 'Clientes', 'rep' => 'Reportes'], ['id' => 'farmacia', 'name' => 'Farmacia', 'pos' => 'Caja / POS', 'inv' => 'Catálogo', 'cli' => 'Pacientes', 'rep' => 'Reportes'], ['id' => 'ferreteria', 'name' => 'Ferretería', 'pos' => 'Caja / POS', 'inv' => 'Catálogo', 'cli' => 'Clientes', 'rep' => 'Reportes'], ['id' => 'panaderia', 'name' => 'Panadería', 'pos' => 'Caja / POS', 'inv' => 'Productos', 'cli' => 'Fiado', 'rep' => 'Reportes'], ['id' => 'otros', 'name' => 'Otros / General', 'pos' => 'Caja / POS', 'inv' => 'Inventario', 'cli' => 'Clientes', 'rep' => 'Reportes'], ]; @endphp @foreach($profileDefaults as $p) @endforeach
Tipo de Perfil Label POS Label Inventario Label Clientes Label Reportes Uso Actual
{{ $p['name'] }} {{ $p['pos'] }} {{ $p['inv'] }} {{ $p['cli'] }} {{ $p['rep'] }} {{ \App\Models\Business::where('profile_type', $p['id'])->count() }} Negocios

Nota Informativa

Estas etiquetas se aplican automáticamente a la PWA cuando un negocio elige su tipo. Puedes sobrescribir estas etiquetas para un negocio específico desde la sección de Colmados > Editar.

@endif @if($viewMode === 'reports')

Reportes Financieros: {{ $selectedBusiness->name ?? '' }}

Ventas Mes Actual

RD$ {{ number_format($financialStats['current_month'] ?? 0, 0) }}

Ventas Año Actual ({{ now()->year }})

RD$ {{ number_format($financialStats['current_year'] ?? 0, 0) }}

Desglose por Método ({{ now()->year }})

Efectivo
RD$ {{ number_format($financialStats['by_payment']['cash'] ?? 0, 0) }}
Tarjeta
RD$ {{ number_format($financialStats['by_payment']['card'] ?? 0, 0) }}
Fiado
RD$ {{ number_format($financialStats['by_payment']['credit'] ?? 0, 0) }}

Historial Mensual de Ingresos ({{ now()->year }})

@php $meses = ['01'=>'Ene', '02'=>'Feb', '03'=>'Mar', '04'=>'Abr', '05'=>'May', '06'=>'Jun', '07'=>'Jul', '08'=>'Ago', '09'=>'Sep', '10'=>'Oct', '11'=>'Nov', '12'=>'Dic']; @endphp @foreach($meses as $num => $nombre)

{{ $nombre }}

RD$ {{ number_format($financialStats['monthly'][$num] ?? 0, 0) }}

@endforeach
@endif
@if($isCreatingBusiness)

Registro Maestro

Unión Profesional: Empresa + Administrador

1

Perfil del Negocio

2

Cuenta de Administrador

@endif @if($editingBusinessId)

Editar Perfil Completo

Datos del Negocio

Personalización de Etiquetas (Opcional)

Cuenta Administradora

@endif

Establecer Plan

@foreach($plans as $plan) @endforeach
@if($editingProductId)

{{ $editingProductId === 'new' ? 'Registrar Producto' : 'Actualizar Existencia' }}

@endif