{{-- Top Header / Filter --}}

Reporte de Pesajes PRO

Configuración: Tara Fija 6.80 kg / Jaba

{{-- Dashboard Cards --}} @php $totalNetoGuia = $this->comparativo->sum('peso_neto_guia'); $totalNetoVendido = $this->comparativo->sum('peso_neto_vendido'); $totalDif = $totalNetoGuia - $totalNetoVendido; $totalJabasGuia = $this->comparativo->sum('cantidad_jabas_guia'); $totalJabasVenta = $this->comparativo->sum('cantidad_jabas_venta'); @endphp
{{-- Card 1: Peso Guia --}}
Peso Neto Guía
{{ number_format($totalNetoGuia, 2) }} kg
{{ $totalJabasGuia }} jabas enviadas
{{-- Card 2: Peso Comercializado --}}
Peso Neto Pesado
{{ number_format($totalNetoVendido, 2) }} kg
{{ $totalJabasVenta }} jabas pesadas
{{-- Card 3: Diferencia (Merma) --}}
Merma / Diferencia
{{ number_format($totalDif, 2) }} kg
{{ $totalNetoGuia > 0 ? number_format(($totalDif / $totalNetoGuia) * 100, 2) : 0 }}% de pérdida
{{-- Card 4: Status --}}
Estado de Cuadre
@if($totalDif < 15) CUADRE ÓPTIMO @else REVISAR MERMA @endif
{{-- SECCIÓN SUPERIOR: Resumen de Carga --}}

Resumen de Carga

@foreach($this->pesajes as $granja => $items) @endforeach
Granja Total Neto
{{ $granja }}
{{ number_format($items->sum('peso_neto'), 2) }} kg {{ $items->sum('cantidad') }} JABAS
{{-- SECCIÓN CENTRAL: Detalle de Pesajes (Expandido) --}}

Detalle de Pesajes

@foreach($this->pesajes as $granja => $items) @foreach($items as $item) @endforeach {{-- Subtotal por Granja --}} @endforeach
Venta Peso Bruto Jabas Peso Neto
{{ $granja }}
ID VENTA #{{ $item['venta_id'] }} {{ number_format($item['peso'], 2) }} kg {{ $item['cantidad'] }} {{ number_format($item['peso_neto'], 2) }} kg
SUBTOTAL {{ $granja }} {{ number_format($items->sum('peso'), 2) }} kg {{ $items->sum('cantidad') }} {{ number_format($items->sum('peso_neto'), 2) }} kg
{{-- SECCIÓN INFERIOR: Comparativo por Granja --}}

Comparativo por Granja

@foreach($this->comparativo as $row) @endforeach
Granja / Origen Peso Guía Peso Pesado Diferencia Jabas
{{ $row['granja'] }} {{ number_format($row['peso_neto_guia'], 2) }} kg {{ number_format($row['peso_neto_vendido'], 2) }} kg
Ext: {{ number_format($row['peso_externo'], 1) }} Loc: {{ number_format($row['peso_local'], 1) }}
{{ number_format($row['diferencia'], 2) }} kg
{{ $row['cantidad_jabas_venta'] }} / {{ $row['cantidad_jabas_guia'] }} {{ $row['dif_jabas'] == 0 ? 'COMPLETO' : $row['dif_jabas'] . ' FALTANTES' }}