@extends('layouts.app') @section('titulo', 'Inventario') @section('subtitulo', 'Activos, materiales y almacén') @php $sim = auth()->user()->empresa?->simbolo ?? 'S/'; $q = request('q'); $tipoActual = request('tipo'); $alerta = request('alerta'); @endphp @section('contenido')
@foreach ([ ['Artículos', $kpis['articulos'], 'from-brand-500 to-brand-400', 'box'], ['Unidades', $kpis['unidades'], 'from-violet-500 to-fuchsia-400', 'grid'], ['Stock bajo', $kpis['bajos'], 'from-red-500 to-orange-400', 'clipboard'], ['Valor inventario', $sim.' '.number_format($kpis['valor'], 0), 'from-emerald-500 to-teal-400', 'wallet'], ] as [$label, $valor, $color, $icono])
@include('partials.icon', ['name' => $icono, 'class' => 'h-6 w-6'])

{{ $valor }}

{{ $label }}

@endforeach
@if ($tipoActual)@endif
Nuevo artículo
Todos @foreach (\App\Models\Articulo::TIPOS as $tipo) {{ $tipo }} @endforeach ⚠ Stock bajo
@if ($articulos->count())
@foreach ($articulos as $a)
{{ $a->etiquetaTipo() }} @if ($a->stockBajo()) Stock bajo @endif

{{ $a->nombre }}

{{ $a->codigo }} @if($a->categoria) · {{ $a->categoria }} @endif

{{ $a->stock }}

{{ $a->unidad }}(s) · mín. {{ $a->stock_minimo }}

{{ $sim }} {{ number_format($a->valorInventario(), 2) }}

{{ $a->ubicacion ?? 'sin ubicación' }}

@endforeach
{{ $articulos->links() }}
@else
@include('partials.icon', ['name' => 'box', 'class' => 'h-7 w-7'])

No hay artículos @if($q || $tipoActual || $alerta)con esos filtros @endif

Registrar el primer artículo
@endif @endsection