@extends('layouts.app') @section('title', 'Rotación de Inventario') @section('content')

Rotación de Inventario

Volver a Reportes Exportar Excel
@if(isset($stats))
Total Productos

{{ number_format($stats['total_products'] ?? 0) }}

@if(isset($comparisonStats)) Comparación: {{ number_format($comparisonStats['total_products'] ?? 0) }} @endif
Ingresos Totales

${{ number_format($stats['total_revenue'] ?? 0, 2) }}

@if(isset($comparisonStats)) Comparación: ${{ number_format($comparisonStats['total_revenue'] ?? 0, 2) }} @php $change = $comparisonStats['change_percentage_revenue'] ?? 0; $badgeClass = $change >= 0 ? 'badge-success' : 'badge-danger'; $icon = $change >= 0 ? 'fa-arrow-up' : 'fa-arrow-down'; @endphp {{ number_format(abs($change), 2) }}% @endif
Unidades Vendidas

{{ number_format($stats['total_sold'] ?? 0, 2) }}

@if(isset($comparisonStats)) Comparación: {{ number_format($comparisonStats['total_sold'] ?? 0, 2) }} @endif
Rotación Promedio

{{ number_format($stats['avg_turnover_rate'] ?? 0, 2) }}x

@if(isset($comparisonStats)) Comparación: {{ number_format($comparisonStats['avg_turnover_rate'] ?? 0, 2) }}x @endif
@endif
Filtros
@if(auth()->check()) @endif
Busca en nombre, SKU, código, categoría o marca del producto
@if(count($turnover) > 0)
Top 10 Rotación de Productos
Días para Rotar (Top 10)
@endif
Análisis de Rotación de Productos {{ $paginatedTurnover->total() ?? count($turnover) }} productos
@forelse(isset($paginatedTurnover) ? $paginatedTurnover : $turnover as $index => $item) @empty @endforelse @if(count($turnover) > 0) @endif
# Producto SKU Ventas (Unidades) Ingresos Stock Promedio Stock Actual Rotación Días para Rotar Costo Promedio Valor Inventario
{{ isset($paginatedTurnover) ? (($paginatedTurnover->currentPage() - 1) * $paginatedTurnover->perPage() + $index + 1) : ($index + 1) }} {{ $item['product']->name }} @if($item['product']->category)
{{ $item['product']->category->name }} @endif
{{ $item['product']->sku ?? 'N/A' }} {{ number_format($item['total_sold'], 2) }} ${{ number_format($item['total_revenue'], 2) }} {{ number_format($item['avg_stock'], 2) }} {{ number_format($item['current_stock'], 2) }} {{ number_format($item['turnover_rate'], 2) }}x {{ number_format($item['days_to_turnover'], 0) }} días ${{ number_format($item['avg_cost'], 2) }} ${{ number_format($item['inventory_value'], 2) }}
No se encontraron productos con ventas en el período seleccionado.
Totales: {{ number_format(array_sum(array_map(function($item) { return $item['total_sold'] ?? 0; }, $turnover)), 2) }} ${{ number_format(array_sum(array_map(function($item) { return $item['total_revenue'] ?? 0; }, $turnover)), 2) }} - - - - - ${{ number_format(array_sum(array_map(function($item) { return $item['inventory_value'] ?? 0; }, $turnover)), 2) }}
@if(isset($paginatedTurnover) && $paginatedTurnover->hasPages()) @endif
Leyenda
Rotación:
  • > 12x Alta rotación (excelente)
  • 6-12x Rotación media (buena)
  • < 6x Baja rotación (requiere atención)
Días para Rotar:
  • < 30 días Rotación rápida
  • 30-60 días Rotación normal
  • > 60 días Rotación lenta
@push('scripts') @if(auth()->check()) @endif @endpush @endsection