@if($loan->paymentPeriods && $loan->paymentPeriods->count() > 0)
@foreach($loan->paymentPeriods as $index => $period) {{-- --}} {{-- --}} {{-- --}} @endforeach
Período Rango de Fechas Principal Estado Intereses Intereses Vencidos Comisiones Cargos Devengados Total a Pagar Monto Pagado Saldo Pendiente
{{-- --}} #{{ $period->period_number }} {{toDate($period->start_date, isDeleteTime: true)}} - {{ toDate($period->due_date, isDeleteTime: true) }}
{{ \Carbon\Carbon::parse($period->start_date)->diffInDays(\Carbon\Carbon::parse($period->due_date)) + 1 }} días
Principal: {{ toCurrency($period->principal_amount, 2) }}
Principal Debt amount: {{ toCurrency($period->principal_debt_amount, 2) }}
@switch(\App\Models\Collection\Dictionary\PaymentPeriodStatus::findCached($period->status_id)->code) @case(\App\Models\Collection\Dictionary\PaymentPeriodStatus::CODE_OUTLOANTERM) {{strtolower($period->status_text)}} @break @case(\App\Models\Collection\Dictionary\PaymentPeriodStatus::CODE_ACTIVE) {{strtolower($period->status_text)}} @break @case(\App\Models\Collection\Dictionary\PaymentPeriodStatus::CODE_FUTURE) {{strtolower($period->status_text)}} @break @case(\App\Models\Collection\Dictionary\PaymentPeriodStatus::CODE_REPAID) {{strtolower($period->status_text)}} @break @endswitch @if(!is_null($period->dpd))
DPD: {{$period->dpd}}
@endif
{{ toCurrency($period->interest_accrued_amount, 2) }} {{ toCurrency($period->overdue_interest_amount, 2) }} {{ toCurrency($period->fee_amount, 2) }} {{ toCurrency($period->uncovered_accrued_charges_amount, 2) }} {{ toCurrency($period->total_payment_amount, 2) }} {{ toCurrency($period->paid_amount, 2) }} {{ toCurrency($period->initial_payment_amount, 2) }}
--}} {{--
--}} {{--
--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @if(config('polaris.instance') == 'colombia')--}} {{-- --}} {{-- @endif--}} {{-- @if(config('polaris.instance') == 'mexico' || config('polaris.instance') == 'peru')--}} {{-- --}} {{-- --}} {{-- @endif--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @php--}} {{-- // Sample payment data for demonstration--}} {{-- $samplePayments = [--}} {{-- [--}} {{-- 'id' => 'PAY00' . ($index + 1),--}} {{-- 'fecha' => '2024-01-' . (15 + $index),--}} {{-- 'monto' => 150.00 + ($index * 50),--}} {{-- 'observaciones' => $index == 0 ? 'Pago parcial' : 'Pago completo',--}} {{-- 'metodo' => $index % 2 == 0 ? 'Transferencia' : 'Efectivo',--}} {{-- 'referencia' => 'REF' . str_pad($index + 1, 6, '0', STR_PAD_LEFT),--}} {{-- 'estado' => 'Confirmado',--}} {{-- ],--}} {{-- ];--}} {{-- if($index % 3 == 0) {--}} {{-- $samplePayments[] = [--}} {{-- 'id' => 'PAY00' . ($index + 1) . 'B',--}} {{-- 'fecha' => '2024-01-' . (20 + $index),--}} {{-- 'monto' => 100.00,--}} {{-- 'estado' => 'Confirmado',--}} {{-- 'metodo' => 'PSE',--}} {{-- 'referencia' => 'PSE' . str_pad($index + 1, 6, '0', STR_PAD_LEFT),--}} {{-- 'observaciones' => 'Completar período',--}} {{-- ];--}} {{-- }--}} {{-- @endphp--}} {{-- @if(count($samplePayments) > 0)--}} {{-- @foreach($samplePayments as $payment)--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @endforeach--}} {{-- @else--}} {{-- --}} {{-- --}} {{-- --}} {{-- @endif--}} {{-- --}} {{--
PréstamoFecha PagoValor PagoCanalAsesorDPDDPDTipo PagoEstado
{{ $payment['id'] }}{{ \Carbon\Carbon::parse($payment['fecha'])->format('d/m/Y') }}{{ number_format($payment['monto'], 2) }}--}} {{-- {{ $payment['estado'] }}--}} {{-- {{ $payment['metodo'] }}{{ $payment['referencia'] }}{{ $payment['observaciones'] }}
--}} {{-- --}} {{-- No hay pagos registrados para este período--}} {{--
--}} {{--
--}} {{--
--}} {{--
@else
Sin plan de pagos

Actualmente, no hay un plan de pagos establecido para este préstamo.

@endif