{{-- ====================================================== Financial Panel: قسم مالي للطالب يعرض: الدفعات + آخر إيصال + المتبقي ====================================================== --}}
البيانات المالية
@if($student->subscriptions()->count()) عرض الاشتراكات @endif
{{-- الملخص المالي السريع --}}

إجمالي الدفعات

{{ count($studentPayments['payments']) }}
{{ number_format($studentPayments['totalPaid'], 2) }} ج

آخر دفعة

@if($studentPayments['lastPayment'])
{{ optional($studentPayments['lastPayment']->payment_date)->format('Y-m-d') }}
{{ $studentPayments['lastPayment']->formatted_amount }} @else
لا توجد دفعات @endif

المتبقي

@php $subscription = $student->subscriptions()->latest()->first(); $remaining = $subscription?->remaining_amount ?? 0; @endphp
{{ number_format($remaining, 2) }} ج
@if($remaining > 0) متبقي @else مكتمل ✓ @endif
{{-- جدول آخر الدفعات --}} @if(count($studentPayments['payments']))
@forelse(array_slice($studentPayments['payments'], 0, 5) as $payment) @empty @endforelse
الإيصال التاريخ المبلغ العملية
{{ $payment['receipt'] }} {{ $payment['date'] }} {{ $payment['amount'] }}
لا توجد دفعات مسجلة
@if(count($studentPayments['payments']) > 5) @endif @else
لا توجد دفعات مسجلة لهذا الطالب
@endif