@php use Illuminate\Support\Str; @endphp @if(isset($variables->is_excel)) @endif @php $previousPersonId = null; $previousPerson = null; $sumPendiente = 0; @endphp @foreach($variables->registros as $llave => $receipt) @if($previousPersonId !== null && $previousPersonId !== $receipt->person_relationated->id) @include('tesoreria.cuentas_por_cobrar_pagar.pdf.pdf-body-subtotales') @php $sumPendiente = 0; // Reset sum for the new person @endphp @endif @if(isset($variables->is_excel)) @endif @if(isset($variables->is_excel)) @else @endif @php $sumPendiente += $receipt->pendiente; $previousPersonId = $receipt->person_relationated->id; $previousPerson = $receipt->person_relationated; @endphp @endforeach @if($previousPersonId !== null) @include('tesoreria.cuentas_por_cobrar_pagar.pdf.pdf-body-subtotales') @endif
Empresa Estado F. Emision F Vto ComprobantesObs MonedaMonto Pendiente Total
{{ htmlspecialchars(Str::limit($receipt->person_relationated->field_name1, 20, '...')) }} {{ $receipt->estado }} {{ date("d/m/Y", strtotime($receipt->receipt_date)) }} {!! $receipt->expiration_date ? date("d/m/Y", strtotime($receipt->expiration_date)) : ' ' !!} {{ $receipt->type_receipt ? 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) : "PAGO A CUENTA" }} {{ $receipt->comentario }} {{ optional($receipt->moneda)->simbolo }}{{ $receipt->amount }} {{ $receipt->pendiente }}{{ optional($receipt->moneda)->simbolo }} {{ number_format($receipt->amount, 2, '.', ',') }} {{ optional($receipt->moneda)->simbolo }} {{ number_format($receipt->pendiente, 2, '.', ',') }}