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

Reporte de Productos

Productos 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'] ?? 10 }}pt

Lista de Productos
@forelse($data as $product) @empty @endforelse
ID Nombre Código Categoría Marca Precio Básico Precio Intermedio Precio Premium Stock Estado
{{ $product->id }} {{ $product->name }} @if($product->description)
{{ Str::limit($product->description, 50) }} @endif
{{ $product->code }} {{ $product->category->name ?? 'Sin categoría' }} {{ $product->brand->name ?? 'Sin marca' }} ${{ number_format($product->unit_1_con_impuesto_1 ?? 0, 2) }} ${{ number_format($product->unit_1_con_impuesto_2 ?? 0, 2) }} ${{ number_format($product->unit_1_con_impuesto_3 ?? 0, 2) }} @php $totalStock = $product->warehouseStocks->sum('quantity') ?? 0; $stockClass = $totalStock > 50 ? 'text-success' : ($totalStock > 10 ? 'text-warning' : 'text-danger'); @endphp {{ number_format($totalStock, 0) }}
{{ $product->unit ?? 'unidades' }}
@php $isActive = $product->is_active ?? true; $badgeClass = $isActive ? 'bg-success' : 'bg-danger'; $statusText = $isActive ? 'Activo' : 'Inactivo'; @endphp {{ $statusText }}

No hay productos registrados

@if($data->count() > 0)
Total Productos
{{ $data->count() }}
Productos Activos
{{ $data->where('is_active', true)->count() }}
Con Stock
{{ $data->filter(function($product) { return ($product->warehouseStocks->sum('quantity') ?? 0) > 0; })->count() }}
Stock Bajo
{{ $data->filter(function($product) { return ($product->warehouseStocks->sum('quantity') ?? 0) <= 10; })->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