@extends('layouts.app') @section('title', 'Reporte de Almacenes') @section('content')

Reporte de Almacenes

Almacenes y ubicaciones del sistema

Volver
@if($printData['company_info'])

{{ $printData['company_info']['name'] ?? 'Mi Empresa' }}

{{ $printData['company_info']['address'] ?? 'Dirección de la empresa' }}

Tel: {{ $printData['company_info']['phone'] ?? 'Teléfono' }} | Email: {{ $printData['company_info']['email'] ?? 'email@empresa.com' }}


@endif
Información del Reporte

Fecha de Generación: {{ now()->format('d/m/Y H:i:s') }}

Generado por: {{ Auth::user()->name }}

Total de Registros: {{ $data->count() }}

Configuración de Impresión

Papel: {{ $printConfig->paper_size_formatted }}

Orientación: {{ $printConfig->orientation_formatted }}

Fuente: {{ $printConfig->font_config['family'] ?? 'Arial' }} {{ $printConfig->font_config['size'] ?? 12 }}pt

Lista de Almacenes
@forelse($data as $warehouse) @empty @endforelse
ID Nombre Código Dirección Teléfono Email Capacidad Usado Ubicaciones Estado Principal
{{ $warehouse->id }} {{ $warehouse->name }} @if($warehouse->description)
{{ Str::limit($warehouse->description, 50) }} @endif
{{ $warehouse->code }} {{ $warehouse->address ?? 'Sin dirección' }} {{ $warehouse->phone ?? 'Sin teléfono' }} {{ $warehouse->email ?? 'Sin email' }} {{ number_format($warehouse->capacity ?? 0, 2) }}
@php $usedCapacity = $warehouse->used_capacity ?? 0; $totalCapacity = $warehouse->capacity ?? 1; $percentage = $totalCapacity > 0 ? ($usedCapacity / $totalCapacity) * 100 : 0; $capacityClass = $percentage > 80 ? 'text-danger' : ($percentage > 60 ? 'text-warning' : 'text-success'); @endphp {{ number_format($usedCapacity, 2) }}
{{ number_format($percentage, 1) }}%
{{ $warehouse->locations->count() }}
ubicaciones
@php $isActive = $warehouse->is_active ?? true; $badgeClass = $isActive ? 'bg-success' : 'bg-danger'; $statusText = $isActive ? 'Activo' : 'Inactivo'; @endphp {{ $statusText }} @if($warehouse->is_main ?? false) Principal @else - @endif

No hay almacenes registrados

@if($data->count() > 0)
Detalle de Ubicaciones por Almacén
@foreach($data as $warehouse) @if($warehouse->locations->count() > 0)
{{ $warehouse->name }} {{ $warehouse->locations->count() }} ubicaciones
@foreach($warehouse->locations as $location) @endforeach
Código Nombre Zona Pasillo Estante Capacidad Estado
{{ $location->code }} {{ $location->name }} {{ $location->zone ?? '-' }} {{ $location->aisle ?? '-' }} {{ $location->rack ?? '-' }} {{ number_format($location->capacity ?? 0, 2) }} m² @php $isActive = $location->is_active ?? true; $badgeClass = $isActive ? 'bg-success' : 'bg-danger'; $statusText = $isActive ? 'Activo' : 'Inactivo'; @endphp {{ $statusText }}
@endif @endforeach
@endif @if($data->count() > 0)
Total Almacenes
{{ $data->count() }}
Almacenes Activos
{{ $data->where('is_active', true)->count() }}
Total Ubicaciones
{{ $data->sum(function($warehouse) { return $warehouse->locations->count(); }) }}
Capacidad Total
{{ number_format($data->sum('capacity'), 0) }} m²
@endif

Reporte generado el {{ now()->format('d/m/Y H:i:s') }} por {{ Auth::user()->name }} | Página 1 de 1
@endsection @push('styles') @endpush