@extends('admin.admin_dashboard') @section('customcss') @endsection @section('admin')
{{-- Header --}}
{{-- Left: School Header --}}
@if($school && $school->school_logo) School Logo @endif

{{ strtoupper($school->school_name ?? '') }}

{{ $school->address ?? '' }}

Phone: {{ $school->phone ?? '' }} | Email: {{ $school->email ?? '' }}

{{ $exam->exam_name }}

Class: {{ $class->name }} || Section: {{ $section->name }} @if(request()->get('group')) @php $groupName = \App\Models\Group::find(request()->get('group'))->name ?? ''; @endphp || Group: {{ $groupName }} @endif || Subject: {{ $subject->name }}

{{-- Right: Grade Scale Table --}} @foreach($gradeScales as $scale) @php $minMark = ($subjectFullMark * (float) $scale->min_mark) / 100; $maxMark = ($subjectFullMark * (float) $scale->max_mark) / 100; if ((float) $scale->max_mark >= 100) { $displayMax = $subjectFullMark; } else { // epsilon fixes 79.989999 -> 79.99 $displayMax = floor(($maxMark + 0.00001) * 100) / 100; } $displayMin = round($minMark, 2); @endphp @endforeach
Interval Grade Point
{{ number_format($displayMin, 2) }} - {{ number_format($displayMax, 2) }} {{ $scale->grade }} {{ number_format($scale->grade_point, 2) }}
{{-- Marks Table --}} @foreach($components as $c) @endforeach @foreach($students as $key => $s) {{-- Components --}} @foreach($components as $c) @php $mark = $s->marks[$c->id] ?? ''; $style = $mark === 'AB' ? 'color:red;font-weight:bold;' : ''; @endphp @endforeach @endforeach
SL Student Name Roll Full Mark{{ $c->component_name }}Obtained GPA Point Grade Position Created By Updated By
{{ $key + 1 }} {{ $s->student_name }} {{ $s->class_roll }} {{ number_format($components->sum('full_mark')) }}{{ $mark }}{{ $s->total ?? '-' }} {{ $s->grade_point }} {{ $s->grade_letter }} {{ $s->position ?? '-' }} {{ $s->marks['created_by'] ?? '-' }} {{ $s->marks['updated_by'] ?? '-' }}
{{-- ✅ Professional Footer --}} {{-- Print Button --}}
@endsection