@extends('adminlte::page') @section('title', 'Detalle de Guía de Ingreso') @section('plugins.Sweetalert2', true) @section('content_header')

Detalle de Guía de Ingreso

Volver a Guías de Ingreso
@stop @section('content')
Número de Guía {{ $guia['numero_guia'] ?? 'Sin número' }}
Lugar de Procedencia {{ $guia['lugar_procedencia'] ?? 'Sin especificar' }}
Pesos (kg)
Bruto: {{ number_format($guia['peso_bruto'] ?? 0, 2) }}
Tara: {{ number_format($guia['peso_tara'] ?? 0, 2) }}
Neto: {{ number_format($guia['peso_neto'] ?? 0, 2) }}
Información General

ID: {{ $guia['id'] }}

Fecha de Ingreso: {{ $guia['fecha_ingreso'] ?? $guia['fecha'] ?? '-' }}

@php $tipoIngreso = $guia['tipo_ingreso'] ?? 0; $tipoIngresoTexto = match($tipoIngreso) { 1 => 'CAMIÓN', 2 => 'STOCK', default => 'DESCONOCIDO' }; @endphp

Tipo de Ingreso: {{ $tipoIngresoTexto }}

@php $estado = $guia['estado'] ?? 0; $estadoTexto = match($estado) { 0 => 'PENDIENTE', 1 => 'PROCESADA', 2 => 'ANULADA', 'pendiente' => 'PENDIENTE', 'procesado' => 'PROCESADA', 'anulado' => 'ANULADA', default => 'DESCONOCIDO' }; $estadoClass = match($estado) { 0, 'pendiente' => 'badge-warning', 1, 'procesado' => 'badge-success', 2, 'anulado' => 'badge-danger', default => 'badge-secondary' }; @endphp

Estado: {{ $estadoTexto }}

@if(isset($guia['usuario']))

Usuario: {{ $guia['usuario']['nombre'] ?? 'Sin especificar' }}

Email: {{ $guia['usuario']['email'] ?? '-' }}

@endif
Resumen de Totales
@if(isset($guia['totales']))

Total de Aves: {{ $guia['totales']['cantidad_total_pollos'] ?? 0 }}

Peso Bruto Total: {{ number_format($guia['totales']['peso_bruto_total'] ?? 0, 2) }} kg

Peso Neto Total: {{ number_format($guia['totales']['peso_neto_total'] ?? 0, 2) }} kg

Total Jabas: {{ $guia['totales']['cantidad_jabas_total'] ?? 0 }}

Subtotal Total: S/ {{ number_format($guia['totales']['subtotal_total'] ?? 0, 2) }}

@else

Total de Aves: {{ $guia['totales']['cantidad_total_pollos'] ?? 0 }}

Peso Bruto: {{ number_format($guia['peso_bruto'] ?? 0, 2) }} kg

Peso Neto: {{ number_format($guia['peso_neto'] ?? 0, 2) }} kg

@endif
@if(isset($guia['detalle']) && count($guia['detalle']) > 0)
Detalle de Productos
@foreach($guia['detalle'] as $detalle) @endforeach
Presentación Tipo de Pollo Cantidad Pollos Cantidad Jabas Peso Neto (kg) Peso Promedio Precio Subtotal
{{ $detalle['presentacion_pollo']['nombre'] ?? 'Sin especificar' }} {{ $detalle['tipo_pollo']['nombre'] ?? 'Sin especificar' }} {{ $detalle['cantidad_pollos'] ?? 0 }} {{ $detalle['cantidad_jabas'] ?? 0 }} {{ number_format($detalle['peso_neto'] ?? 0, 2) }} {{ number_format($detalle['peso_promedio'] ?? 0, 2) }} S/ {{ number_format($detalle['precio'] ?? 0, 2) }} S/ {{ number_format($detalle['subtotal'] ?? 0, 2) }}
- TOTALES: {{ $guia['totales']['cantidad_total_pollos'] ?? 0 }} {{ $guia['totales']['cantidad_jabas_total'] ?? 0 }} {{ number_format($guia['totales']['peso_neto_total'] ?? 0, 2) }} - - S/ {{ number_format($guia['totales']['subtotal_total'] ?? 0, 2) }}
@else
No hay detalles disponibles para esta guía de ingreso.
@endif
Información de la Sede

Sede: {{ $empresa->razon_social }}

Dominio: {{ $empresa->dominio }}

RUC: {{ $empresa->ruc }}

Período consultado: Desde {{ \Carbon\Carbon::parse($fechaInicio)->format('d/m/Y') }} hasta {{ \Carbon\Carbon::parse($fechaFin)->format('d/m/Y') }}

Lista de Ingresos
@stop