@include('tesoreria.cobradores.pdf.pdf-head')
@php use Illuminate\Support\Str; $totalGeneral = 0; @endphp @foreach($registro->grupos as $grupoIndex => $grupo) @if($grupoIndex > 0)
@endif {{-- Header del cobrador --}}
Cobrador: {{ $grupo['cobrador']->descripcion }} Subtotal a Cobrar: ${{ number_format($grupo['subtotal'], 2, ',', '.') }} Fecha: {{ date('d/m/Y H:i') }}
{{-- Body --}}
@foreach($grupo['registros'] as $key => $item) @php $saldoAcumulado = 0; @endphp @foreach($item['pendientes']['registros'] as $llave => $receipt) @php $saldoAcumulado += $receipt->pendiente; @endphp @if($loop->first) @endif @if($loop->first) @endif @endforeach @endforeach
Empresa F. Emision Comprobantes Debe Haber Saldo
{{ $receipt->person_relationated->codigo }} - {{ Str::limit($receipt->person_relationated->field_name1, 20, '...') }} {{ date("d/m/Y", strtotime($receipt->receipt_date)) }} {{ Str::limit($receipt->type_receipt->name, 15, '...') }} {{ str_pad($receipt->code_ticket, 5, '0', STR_PAD_LEFT) }} -{{ str_pad($receipt->number, 8, '0', STR_PAD_LEFT) }} {{$receipt->type_receipt->credit ? "" : "$" . number_format($receipt->pendiente, 2, '.', ',') }} {{$receipt->type_receipt->credit ? "$" . number_format($receipt->pendiente, 2, '.', ',') : "" }} ${{ number_format($saldoAcumulado, 2, '.', ',') }}
@php $totalGeneral += $grupo['subtotal']; @endphp @endforeach {{-- Footer con total general --}}
Total General: ${{ number_format($totalGeneral, 2, ',', '.') }}
Creado por: {{ $registro->creado_por }}
Observaciones: