@push('css') @endpush
{{__('Loading...')}}
@if($from_date && $to_date && $student_id) @foreach($fullRecords as $studentId => $studentData) @foreach($studentData as $groupId => $groupData)
{{__('Group')}} {{ $groupData['group']->name }} {{__('Study Class')}} {{ $groupData['group']->study_class->name }}
{{__('Attendance Days')}} {{ $groupData['attendance_count'] }} {{__('Absence Days')}} {{ $groupData['absence_count'] }}
@if (!empty($groupData['sessions']) && isset($groupData['sessions'][0]) && $groupData['sessions'][0]['attendance'] != null) @foreach ($groupData['sessions'] as $record) @endforeach @else @endif
{{ __('Session Date Time') }} {{ __('Teacher') }} {{ __('Subject') }} {{ __('Name') }} {{ __('Attendance') }} {{ __('Homework Status') }} {{ __('Student Behavior') }} {{ __('Notes') }}
{{ $record['session_date']->format('Y-m-d H:i') }} {{ $record['teacher']->name }} {{ $record['subject']->name }} {{ $record['student']->name }} @if ($record['attendance']?->active == 1) @else @endif {{ $record['daily_follow_up']?->homeworkStatus->name ?? '-' }} {{ $record['daily_follow_up']?->studentBehavior->name ?? '-' }} {{ $record['daily_follow_up']?->note ?? '-' }}
{{ __('No records to show.') }}
@if(isset($gradesRecords[$studentId][$groupId])) @forelse ($gradesRecords[$studentId][$groupId]['grades'] as $record) @empty @endforelse @if (count($gradesRecords[$studentId][$groupId]['grades']) > 0) @endif
{{ __('Exam Name') }} {{ __('Date') }} {{ __('Teacher') }} {{ __('Subject') }} {{ __('Name') }} {{ __('Final Grade') }} {{ __('Grade') }} {{ __('Value') }}
{{ $record->exam_grade->exam_enrollment->name }} {{ $record->exam_date }} {{ $record->exam_grade->exam_enrollment->teacher->name }} {{ $record->exam_grade->exam_enrollment->subject->name }} {{ $record->student->name }} {{ $record->final_grade }} {{ $record->grade_value === 0 ? '-' : $record->grade_value }} {{ $record->grade_name }}
{{ __('No Grades Found') }}
{{__('Total')}}: {{ collect($gradesRecords[$studentId][$groupId]['grades'])->sum('final_grade') }} {{ collect($gradesRecords[$studentId][$groupId]['grades'])->sum('grade_value') }}
@endif
@endforeach @php $totalFinalGrades = 0; $totalStudentGrades = 0; if (isset($gradesRecords[$studentId])) { foreach ($gradesRecords[$studentId] as $groupId => $groupData) { $totalFinalGrades += collect($groupData['grades'])->sum('final_grade'); $totalStudentGrades += collect($groupData['grades'])->sum('grade_value'); } } @endphp @if ($gradesRecords && isset($gradesRecords[$studentId]))

{{ __('Total Grades') }}

{{ __('Total Final Grades') }} {{ $totalFinalGrades }} {{ __('Total Student Grades') }} {{ $totalStudentGrades }}
@endif @if(isset($paymentRecords[$studentId]))
@forelse ($paymentRecords[$studentId] as $record) @empty @endforelse @if(count($paymentRecords[$studentId]) > 0) @endif
{{ __('Payment Date') }} {{ __('Student Name') }} {{ __('Status') }} {{ __('Amount') }} {{ __('Discounted') }} {{ __('Paid') }} {{ __('Remain') }}
{{ $record->payment_date->format('Y-m-d') }} {{ $record->student->name }} {{ $record->payment_status->name }} {{ number_format($record->amount, 2) }} {{ number_format($record->discounted, 2) }} {{ number_format($record->paid, 2) }} {{ number_format($record->remain, 2) }}
{{ __('No records to show.') }}
{{__('Total')}}: {{ number_format(collect($paymentRecords[$studentId])->sum('amount'), 2) }} {{ number_format(collect($paymentRecords[$studentId])->sum('discounted'), 2) }} {{ number_format(collect($paymentRecords[$studentId])->sum('paid'), 2) }} {{ number_format(collect($paymentRecords[$studentId])->sum('remain'), 2) }}
@endif @endforeach @endif
@push('js') @endpush