@extends('layouts.app') @section('title', 'Reporte de Productos') @section('content')
Productos registrados en el sistema
{{ $printData['company_info']['address'] ?? 'Dirección de la empresa' }}
Tel: {{ $printData['company_info']['phone'] ?? 'Teléfono' }} | Email: {{ $printData['company_info']['email'] ?? 'email@empresa.com' }}
Fecha de Generación: {{ now()->format('d/m/Y H:i:s') }}
Generado por: {{ Auth::user()->name }}
Total de Registros: {{ $data->count() }}
Papel: {{ $printConfig->paper_size_formatted }}
Orientación: {{ $printConfig->orientation_formatted }}
Fuente: {{ $printConfig->font_config['family'] ?? 'Arial' }} {{ $printConfig->font_config['size'] ?? 10 }}pt
| 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 |
|||||||||