{{-- ENCABEZADO CON LOGO DEL INSTITUTO --}}
@if(!empty($logoPath) && file_exists($logoPath)) Logo del Instituto @elseif( $instituto && !empty($instituto->logo) && file_exists( public_path( 'storage/' . $instituto->logo ) ) ) Logo del Instituto @endif

{{ $instituto->nombre ?? 'INSTITUTO EDUCATIVO' }}

Código Modular: {{ $instituto->codigo_modular ?? '---' }} @if(!empty($instituto->dre)) | DRE: {{ $instituto->dre }} @endif

{{ $instituto->direccion ?? '' }} @if(!empty($instituto->telefono)) | Teléfono: {{ $instituto->telefono }} @endif

DNI: {{ $estudiante['dni'] ?? '---' }}
{{-- TÍTULO DEL REPORTE --}}

HISTORIAL ACADÉMICO OFICIAL

Consolidado de Matrículas y Calificaciones Finales

{{-- I. DATOS DEL INSTITUTO --}}
I. DATOS DEL INSTITUTO
Nombre del Instituto {{ $instituto->nombre ?? 'No disponible' }} DRE {{ $instituto->dre ?? 'No disponible' }}
Código Modular {{ $instituto->codigo_modular ?? 'No disponible' }} Teléfono {{ $instituto->telefono ?? 'No registrado' }}
Departamento {{ $instituto->distrito?->provincia?->departamento?->Departamento ?? $instituto->distrito?->provincia?->departamento?->nombre ?? 'No asignado' }} Provincia {{ $instituto->distrito?->provincia?->Provincia ?? $instituto->distrito?->provincia?->nombre ?? 'No asignado' }}
Distrito {{ $instituto->distrito?->nombre ?? $instituto->distrito?->Distrito ?? 'No asignado' }} Dirección {{ $instituto->direccion ?? 'No registrada' }}
Página Web {{ $instituto->pagina_web ?? 'No registrada' }}
{{-- II. DATOS DEL ESTUDIANTE --}}
II. DATOS DEL ESTUDIANTE
Estudiante {{ $estudiante['nombre_completo'] ?? 'No disponible' }} DNI / Doc. {{ $estudiante['dni'] ?? '---' }}
Código Estudiante {{ $estudiante['codigo_postulante'] ?? '---' }} Nota Aprobatoria {{ $notaAprobatoria }}
{{-- III. RESUMEN ACADÉMICO --}}
III. RESUMEN ACADÉMICO
{{ $resumen['total_periodos'] ?? 0 }}
Periodos
{{ $resumen['total_cursos'] ?? 0 }}
Unidades Cursadas
{{ $resumen['aprobados'] ?? 0 }}
Aprobadas
{{ $resumen['desaprobados'] ?? 0 }}
Desaprobadas
{{ $resumen['promedio_general'] ?? '---' }}
Promedio General
{{-- IV. HISTORIAL ACADÉMICO --}}
IV. DETALLE DEL HISTORIAL ACADÉMICO
@forelse($matriculas as $matricula)
PERIODO: {{ $matricula['periodo']['nombre'] ?? '---' }}    |    CICLO / SEMESTRE: {{ $matricula['semestre']['nombre'] ?? '---' }}
Plan de Estudios @if(!empty($matricula['plan']['codigo'])) {{ $matricula['plan']['codigo'] }} - @endif {{ $matricula['plan']['nombre'] ?? '---' }} Matrícula {{ $matricula['codigo_matricula'] ?? '---' }}
Estado {{ $matricula['estado'] ?? '---' }} Fecha Matrícula @if(!empty($matricula['fecha_matricula'])) {{ \Carbon\Carbon::parse( $matricula['fecha_matricula'] )->format('d/m/Y') }} @else --- @endif
@forelse($matricula['cursos'] as $index => $curso) @php $nota = $curso['nota_final']; $aprobado = $nota !== null && $nota >= $notaAprobatoria; @endphp @empty @endforelse
N° Unidad Didáctica Tipo Créditos Nota Final Resultado
{{ $index + 1 }} {{ $curso['nombre'] ?? '---' }} {{ $curso['tipo'] ?? '---' }} {{ $curso['creditos'] ?? '---' }} @if($nota !== null) {{ $nota }} @else --- @endif @if($nota === null) Sin nota @elseif($aprobado) Aprobado @else Desaprobado @endif
No existen unidades didácticas registradas en esta matrícula.
@empty
El estudiante no tiene historial académico registrado.
@endforelse {{-- FIRMAS --}} {{-- PIE --}}