Inventario & Control de Stock

Existencias físicas por tienda y cálculo automático de precio vitrina para no perder por brecha cambiaria

Catálogo Costos & Lotes Cargar Factura IA
@if($feedbackMessage)
✓ {{ $feedbackMessage }}
@endif @if($totalAlertsCount > 0)
Reposición Urgente: {{ $totalAlertsCount }} {{ $totalAlertsCount === 1 ? 'prenda en riesgo' : 'prendas en riesgo' }} @if(count($depletedItems) > 0) {{ count($depletedItems) }} agotadas @endif
@if($showStockAlertsDetails)
@foreach($depletedItems as $item)
@if($item['variant']->image_url) {{ $item['variant']->display_name }} @else 🚫 @endif
Agotado (0 u)

{{ $item['variant']->display_name }}

SKU: {{ $item['variant']->sku }} Mínimo configurado: {{ (int)$item['min'] }} u
@endforeach @foreach($lowStockItems as $item)
@if($item['variant']->image_url) {{ $item['variant']->display_name }} @else ⚠️ @endif
¡Quedan solo {{ (int)$item['stock'] }} u!

{{ $item['variant']->display_name }}

SKU: {{ $item['variant']->sku }} Alerta mínima: {{ (int)$item['min'] }} u • Déficit: {{ (int)$item['deficit'] }} u
@endforeach
@endif
@endif
@if($totalAlertsCount > 0) @endif
🏷️ Categoría: @foreach($rootCategories as $rc) @endforeach
@forelse($variants as $variant) @php $summaries = $variant->stockSummaries; if ($selectedLocationId > 0) { $summaries = $summaries->where('location_id', $selectedLocationId); } $totalQuantity = $summaries->sum(fn ($s) => (float) $s->quantity); $minAlert = (float) $variant->min_stock_alert; $priceBcvVes = (float)$variant->suggested_price_usdt * (float)($rates['VES_BCV'] ?? 1); $semaphore = 'green'; if ($totalQuantity <= 0) { $semaphore = 'red'; } elseif ($totalQuantity <= $minAlert) { $semaphore = 'yellow'; } $activeLots = $variant->lots->where('status', 'active'); @endphp @if($expandedVariantId === $variant->id) @endif @empty @endforelse
0 && count(array_diff($variants->pluck('id')->all(), $selectedVariantIds)) === 0 ? 'checked' : '' }} class="w-4 h-4 rounded text-[#7C2A3A] focus:ring-[#7C2A3A] border-slate-300 cursor-pointer" title="Seleccionar todos los de esta página" /> Estado Stock Existencia Precio en Bolívares (BCV) Lotes Acciones
@if($variant->image_url) @endif
{{ $variant->display_name }}
SKU: {{ $variant->sku }} @if($variant->product?->category) {{ $variant->product->category->fullName() }} @else ⚠️ Sin categoría @endif
@if($semaphore === 'green') En Stock @elseif($semaphore === 'yellow') Stock Bajo @else Agotado @endif {{ number_format($totalQuantity, 0) }} u físicas ${{ number_format($variant->base_price_usd, 2) }} Dólar Efectivo ${{ number_format((float)$variant->suggested_price_usdt, 2) }} Dólar BCV {{ number_format($priceBcvVes, 2) }} Bs Facturación legal {{ $activeLots->count() }} lotes

Lotes Activos (Consumo FIFO Automático):

@forelse($activeLots as $lot)
{{ $lot->lot_number }} ${{ number_format((float)$lot->unit_cost_usdt, 2) }} c/u
Disponible: {{ number_format((float)$lot->remaining_quantity, 0) }} u Ingreso: {{ $lot->created_at->format('d/m/y') }}
@empty

No hay lotes con saldo activo para esta variante.

@endforelse
No se encontraron productos registrados en el inventario.
{{ $variants->links() }}
@if($showQuickProductModal)

Registro Rápido de Prenda

Calcula automáticamente el precio vitrina para no perder por brecha cambiaria

@if($errorMessage)
{{ $errorMessage }}
@endif
$
$
Auto
%
Calculadora de Vitrina (Fórmula Kairos) BCV: {{ number_format((float)($rates['VES_BCV'] ?? 1), 2) }} | Binance P2P: {{ number_format((float)($rates['VES_PARALELO'] ?? 1), 2) }}
Valor Base Real Deseado: ${{ number_format((float)$calculatedBaseUsd, 2) }} USD +${{ number_format((float)$calculatedBaseUsd - (float)($quickCostUsd ?: 0), 2) }} ganancia neta
Precio Vitrina a Fijar: ${{ $quickPreview['precio_vitrina_bcv'] }} USD {{ $quickPreview['precio_bolivares'] }} Bs en caja

💡 Protección: Si el cliente paga a tasa BCV oficial ({{ $quickPreview['precio_bolivares'] }} Bs), al comprar USDT a tasa Binance P2P obtendrás exactamente tus ${{ number_format((float)$calculatedBaseUsd, 2) }} USD netos.

JPG, PNG, WebP, HEIC (iPhone) o Cámara
@endif @if($showReceiveModal)

Entrada de Lote de Mercancía

@if($errorMessage)
{{ $errorMessage }}
@endif
@endif @if($showDeleteModal)

¿Eliminar del inventario?

Estás a punto de eliminar {{ $deletingVariantName }}. Si no tiene ventas registradas, se borrará definitivamente; si ya tiene historial de ventas, se retirará del mostrador y stock activo protegiendo la auditoría financiera.

@endif @if($showImageModal)

Fotografía de la Prenda

{{ $imageVariantName }}

@if($errorMessage)
{{ $errorMessage }}
@endif
@if($currentImageUrl) {{ $imageVariantName }} @else
Sin fotografía asignada
@endif @if($currentImageUrl)
Foto en vitrina
@endif
@error('newProductImage') {{ $message }} @enderror

⚡ Soporte universal activo: fotos de iPhone (.heic), Android, cámara o galería.

@if($currentImageUrl) @endif
@endif @if($showEditModal)

Editar Prenda / Producto

Modifica la información básica, precios y parámetros de alerta

@if($errorMessage)
⚠️ {{ $errorMessage }}
@endif
$
💵 Dólar registrado
$
@php $previewPriceBcv = (float)$editSuggestedPriceUsdt * (float)($rates['VES_BCV'] ?? 1); @endphp ≈ {{ number_format($previewPriceBcv, 2) }} Bs (BCV Oficial)
unidades
Avisará cuando el stock sea menor o igual.
JPG, PNG, WebP, HEIC (iPhone) o Cámara
@if($editImageUrl) Actual @else @endif
@if($editImageUrl) @endif
@endif @if(count($selectedVariantIds) > 0)
{{ count($selectedVariantIds) }} {{ count($selectedVariantIds) === 1 ? 'prenda seleccionada' : 'prendas seleccionadas' }}
Selecciona la categoría
@foreach($rootCategories as $rc) @foreach($rc->children as $ch) @endforeach @endforeach
@endif