Póliza {{$policy->policy_id}} Compañia {{optional($policy->getInsurance)->name}}
Cliente {{ getClientName($policy->getClient) }} Tipo de seguro @if ($policy->category_policy == 1) Vida @endif @if ($policy->category_policy == 2) Vehiculo @endif @if ($policy->category_policy == 3) Daños @endif
Vigencia {{$policy->start_date->format('d-m-Y')}} - {{$policy->final_date->format('d-m-Y')}}
@foreach ($policyCuotes as $cuote) @endforeach
Cuota Fecha pago Prima proyectada Valor de cuota Valor facturado Saldo pendiente Estado
# {{ $cuote->cuote_number }} {{ $cuote->payment_date_assumption->format('d-m-Y') }} @if($loop->first) {{$policy->currency}} {{number_format($policy->first_quote, 2, '.', ',')}} @else {{$policy->currency}} {{number_format($policy->mensual_quote, 2, '.', ',')}} @endif @php $paymentDetails = json_decode($cuote->getPaymentDetail, true); @endphp @if (!empty($paymentDetails) && isset($paymentDetails[0])) @php $paymentDetail = $paymentDetails[0]; @endphp @if($paymentDetail['payment_status'] == 2) {{$policy->currency}} {{number_format($cuote->total_paid, 2, '.', ',')}} @else {{$policy->currency}} {{number_format($policy->total, 2, '.', ',')}} @endif @endif @if ($cuote->status != 0) {{$policy->currency}} {{number_format($cuote->total_paid, 2, '.', ',')}} @endif @if ($cuote->status != 0) {{$policy->currency}} {{number_format($cuote->total_paid - $policy->total, 2, '.', ',')}} @endif @foreach(statusPayments() as $key => $value) @if($key == $cuote->status) @if($cuote->status == 0) {{$value}} @endif @if($cuote->status == 1) {{$value}} @endif @if($cuote->status == 2) {{$value}} @endif @if($cuote->status == 3) {{$value}} @endif @if($cuote->status == 4) {{$value}} @endif @endif @endforeach