@extends('layouts.yellow') @push('styles') @endpush @section('content') @if(session()->has('error'))
{{ session('error') }}    {{ __('common.backAppointment') }}
@endif

{{ __('common.paymentForAppointment') }}

{{ __('Complete los detalles del pago') }}

{{ __('common.appointmentDetails') }}

{{ $patient->firstname }} {{ $patient->lastname }}

{{ $doctor->name }}

{{ \Carbon\Carbon::parse($appointmentData['date'])->format('d/m/Y') }}

{{ \Carbon\Carbon::parse($appointmentData['date'])->format('h:i A') }}

@if(isset($isChildPayment) && $isChildPayment)
Resumen de Pagos
Pago Principal
Monto: {{ number_format($parentPayment->amount, 2) }} {{ $parentPayment->currency->code ?? '' }}
Referencia: {{ $parentPayment->reference }}
@if($parentPayment->children->isNotEmpty())
Pagos Adicionales ({{ $parentPayment->children->count() }})
@foreach($parentPayment->children as $childPayment)
Monto: {{ number_format($childPayment->amount, 2) }} {{ $childPayment->currency->code ?? '' }}
Referencia: {{ $childPayment->reference }}
@endforeach
Total Pagos Adicionales: {{ number_format($parentPayment->children->sum('amount'), 2) }} {{ $parentPayment->currency->code ?? '' }}
@endif
Total Servicios: {{ number_format($parentPayment->medicalServices->sum('cost'), 2) }} {{ $parentPayment->currency->code ?? '' }}
Total Pagado: {{ number_format($parentPayment->amount + $parentPayment->children->sum('amount'), 2) }} {{ $parentPayment->currency->code ?? '' }}
Saldo Pendiente: {{ number_format($remainingDebt, 2) }} {{ $parentPayment->currency->code ?? '' }}
@else @endif @csrf @if(isset($isChildPayment) && $isChildPayment) @endif @if(isset($isChildPayment) && $isChildPayment)
{{ __('Resumen de Pagos') }}
Pago Principal
Monto: {{ number_format($parentPayment->amount, 2) }} {{ $parentPayment->currency->code ?? '' }}
Referencia: {{ $parentPayment->reference }}
@if($parentPayment->children->isNotEmpty())
Pagos Adicionales ({{ $parentPayment->children->count() }})
@foreach($parentPayment->children as $childPayment)
Monto: {{ number_format($childPayment->amount, 2) }} {{ $childPayment->currency->code ?? '' }}
Referencia: {{ $childPayment->reference }}
@endforeach
Total Pagos Adicionales: {{ number_format($parentPayment->children->sum('amount'), 2) }} {{ $parentPayment->currency->code ?? '' }}
@endif
Total Servicios: {{ number_format($parentPayment->medicalServices->sum('cost'), 2) }} {{ $parentPayment->currency->code ?? '' }}
Total Pagado: {{ number_format($parentPayment->amount + $parentPayment->children->sum('amount'), 2) }} {{ $parentPayment->currency->code ?? '' }}
Saldo Pendiente: {{ number_format($remainingDebt, 2) }} {{ $parentPayment->currency->code ?? '' }}
@endif
@if(!isset($isChildPayment) || !$isChildPayment)
Servicios Médicos
@if(isset($isChildPayment) && $isChildPayment)
Los servicios médicos se heredan del pago principal y no pueden ser modificados.
@foreach($parentPayment->medicalServices as $service) {{ $service->name }} {{ number_format($service->cost, 2) }} {{ $service->currency->title ?? 'USD' }} @endforeach
@else
@endif
@endif
@if(isset($isChildPayment) && $isChildPayment && isset($parentPayment->especiality_id)) @else @endif
@if(isset($doctors)) @endif
{{ __('common.cancel') }}
@if(isset($isChildPayment) && $isChildPayment)
@endif
@push('scripts') @endpush @endsection