@include('pdf.partials.styles-unified')

REPORTE DE VENTAS | {{ $empresa->name }}

@php $totalPesoNeto = 0; $totalMonto = 0; $totalMontoRecibido = 0; $totalUnidades = 0; foreach($records as $item) { $sum = 0; foreach($item->detalles as $detalle) { $sum += $detalle->cantidad_pollos; } $totalMonto += $item->monto_total; $totalPesoNeto += $item->peso_neto; $totalMontoRecibido += $item->monto_recibido; $totalUnidades += $sum; } $totalPendiente = $totalMonto - $totalMontoRecibido; @endphp

Total de Ventas: {{ $records->count() }}

Total Unidades: {{ number_format($totalUnidades, 0) }} aves

Monto Total: S/ {{ number_format($totalMonto, 2) }}

Monto Recibido: S/ {{ number_format($totalMontoRecibido, 2) }}

Monto Pendiente: S/ {{ number_format($totalPendiente, 2) }}

Generado: {{ now()->format('d/m/Y H:i:s') }}

@php $index = 1; @endphp @forelse($records as $item) @empty @endforelse
Cliente Fecha Serie Producto Unidad Peso Neto Total Recibido
{{ $index++ }} {{ $item->cliente_razon_social }} {{ \Carbon\Carbon::parse($item->fecha_venta)->format('d/m/Y') }} {{ $item->serie_venta }} @if($item->detalles && $item->detalles->count() > 0) @foreach($item->detalles->take(3) as $detalle) {{ $detalle->tipo_pollo }}@if(!$loop->last), @endif @endforeach @if($item->detalles->count() > 3) ... (+{{ $item->detalles->count() - 3 }} más) @endif @else Sin productos @endif @php $sum = 0; foreach($item->detalles as $detalle) { $sum += $detalle->cantidad_pollos; } @endphp {{ number_format($sum, 0) }} {{ number_format($item->peso_neto, 2) }} S/ {{ number_format($item->monto_total, 2) }} S/ {{ number_format($item->monto_recibido, 2) }}
No hay ventas registradas
TOTALES: {{ number_format($totalUnidades, 0) }} {{ number_format($totalPesoNeto, 2) }} S/ {{ number_format($totalMonto, 2) }} S/ {{ number_format($totalMontoRecibido, 2) }}