@php $total = [ 'total_pen' => 0, 'total_usd' => 0, 'total_payment_pen' => 0, 'total_payment_usd' => 0, 'total_to_pay_pen' => 0, 'total_to_pay_usd' => 0, ]; $logo = $company->logo; if ($logo === null && !file_exists(public_path("$logo}"))) { $logo = "{$company->logo}"; } if ($logo) { $logo = "storage/uploads/logos/{$logo}"; $logo = str_replace('storage/uploads/logos/storage/uploads/logos/', 'storage/uploads/logos/', $logo); } @endphp
@if ($company->logo)
@endif
CUENTAS POR COBRAR POR VENCIMIENTO
{{ $company->name }}
{{ $company->number }}
<
@php $date = new \DateTime(); $timeZone = new \DateTimeZone('America/Lima'); @endphp
Fecha: {{ $date->setTimezone($timeZone)->format('Y-m-d') }}
Hora: {{ $date->setTimezone($timeZone)->format('H:i:s') }}
Página

@if (!empty($records))
{{-- --}} {{-- --}} {{-- --}} @foreach ($records as $key => $value) @php $currency_type_id = $value['currency_type_id']; if ($currency_type_id === 'PEN') { $total['total_pen'] += $value['total']; $total['total_payment_pen'] += $value['total_payment']; $total['total_to_pay_pen'] += $value['total_to_pay']; } else { $total['total_usd'] += $value['total']; $total['total_payment_usd'] += $value['total_payment']; $total['total_to_pay_usd'] += $value['total_to_pay']; } $dued = ''; if ($value['delay_payment'] > 0) { $dued = 'text-danger'; } @endphp @if ($value['total_to_pay'] > 0) {{-- --}} {{-- --}} {{-- --}} @endif @endforeach
CLIENTE NÚMERO FECHA EMISIÓN MONEDA TOTAL COBRADO SALDO TELÉFONOCORREOESTADO DIAS ATRASOCÓDIGO INTERNOVENCIMIENTOPOR COBRAR
{{ $value['customer_name'] }} {{ $value['number_full'] }} {{ $value['date_of_issue'] }} ({{ $value['currency_symbol'] }}) {{ $value['total'] }} {{ $value['total_payment'] }} {{ $value['total_to_pay'] }} {{ $value['customer_telephone'] }} {{ $dued ? 'VENCIDO' : 'PENDIENTE' }}{{ $value['customer_email'] }}{{ $value['delay_payment'] }} {{ $value['date_of_due'] }}{{ $value['customer_internal_code'] }}{{ $value['purchase_order'] }}
TOTAL S/ {{ number_format($total['total_pen'] ,2)}} {{ number_format($total['total_payment_pen'] ,2)}} {{ number_format($total['total_to_pay_pen'] ,2)}}
TOTAL $ {{ number_format($total['total_usd'] ,2)}} {{ number_format($total['total_payment_usd'] ,2)}} {{ number_format($total['total_to_pay_usd'] ,2)}}
@else

No se encontraron registros.

@endif