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

Reporte de Ajustes de Inventario

Ajustes registrados en el 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 Ajustes
@forelse($data as $adjustment) @empty @endforelse
ID Fecha Producto Tipo Almacén Ubicación Antes Después Diferencia Estado Usuario
{{ $adjustment->id }} {{ $adjustment->created_at->format('d/m/Y H:i') }} {{ $adjustment->product->name ?? 'N/A' }}
{{ $adjustment->product->code ?? 'Sin código' }}
{{ $adjustment->adjustment_type_formatted }} {{ $adjustment->warehouse->name ?? 'N/A' }} {{ $adjustment->location->name ?? 'N/A' }} {{ number_format($adjustment->quantity_before ?? 0, 2) }} {{ number_format($adjustment->quantity_after ?? 0, 2) }} @php $difference = ($adjustment->quantity_after ?? 0) - ($adjustment->quantity_before ?? 0); $diffClass = $difference > 0 ? 'text-success' : ($difference < 0 ? 'text-danger' : 'text-muted'); $sign = $difference > 0 ? '+' : ''; @endphp {{ $sign }}{{ number_format($difference, 2) }} @php $status = $adjustment->status ?? 'pendiente'; $badgeClass = match($status) { 'completado' => 'bg-success', 'aprobado' => 'bg-primary', 'pendiente' => 'bg-warning', 'rechazado' => 'bg-danger', default => 'bg-secondary' }; @endphp {{ ucfirst($status) }} {{ $adjustment->createdBy->name ?? 'N/A' }}

No hay ajustes registrados

@if($data->count() > 0)
Total Ajustes
{{ $data->count() }}
Completados
{{ $data->where('status', 'completado')->count() }}
Pendientes
{{ $data->where('status', 'pendiente')->count() }}
Aprobados
{{ $data->where('status', 'aprobado')->count() }}
@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