{{-- New-Unity ERP | app/Modules/Warehouse/Resources/Views/inventory/index.blade.php | v1.0 | 09/07/2026 23:50:00 --}} {{-- v1.0 — Stock consolidado por producto/almacén/zona con alertas y acceso al Kardex. --}} @extends('layouts.vertical', ['pageTitle' => __('warehouse.inventory')]) @section('page-title')

{{ __('warehouse.inventory') }} {{ __('warehouse.stock-by-product-zone') }}

@can('warehouse.create') @endcan
@endsection @section('content') @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- Filtros --}}
{{-- Tabla de inventario --}}

{{ __('warehouse.stock-summary') }}

{{ $inventory->total() }} {{ __('warehouse.products-lower') }}
{{-- Ayuda contextual --}}
{!! __('warehouse.inventory-help') !!}
@forelse($inventory as $item) @php $alertColor = 'success'; $alertIcon = 'fa-check-circle'; $alertTitle = __('warehouse.ok'); if ($item->quantity_available <= 0) { $alertColor = 'danger'; $alertIcon = 'fa-times-circle'; $alertTitle = __('warehouse.out-of-stock'); } elseif ($item->min_stock > 0 && $item->quantity_available < $item->min_stock) { $alertColor = 'danger'; $alertIcon = 'fa-exclamation-circle'; $alertTitle = __('warehouse.below-min'); } elseif ($item->reorder_point > 0 && $item->quantity_available <= $item->reorder_point) { $alertColor = 'warning'; $alertIcon = 'fa-exclamation-triangle'; $alertTitle = __('warehouse.reorder'); } @endphp @empty @endforelse
{{ __('warehouse.part-num') }} {{ __('warehouse.product') }} {{ __('warehouse.zone') }} {{ __('warehouse.available-cap') }} {{ __('warehouse.reserved') }} {{ __('warehouse.total') }} {{ __('warehouse.avg-cost') }} {{ __('warehouse.alert') }} {{ __('warehouse.actions') }}
{{ $item->product->product_code ?? '—' }} {{ $item->product->product_name ?? '—' }} {{ $item->zone->code ?? '—' }} {{ number_format($item->quantity_available, 2) }} {{ number_format($item->quantity_reserved, 2) }} {{ number_format($item->quantity_total, 2) }} ${{ number_format($item->avg_unit_cost, 2) }} {{ $alertTitle }} @can('warehouse.edit') @endcan
{{ __('warehouse.no-inventory-records') }}
{{ $inventory->links() }}
{{-- Modal: Manual Entry --}} @endsection