{{-- ENCABEZADO CON LOGO DE INSTITUTO --}}
@if(!empty($imagenBase64)) 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

{{ $matricula->codigo_matricula }}
{{-- TÍTULO DE LA FICHA --}}

FICHA OFICIAL DE MATRÍCULA

Constancia de Asignación de Carga Horaria y Registro Lectivo

{{-- DATOS INSTITUCIONALES Y UBICACIÓN GEOGRÁFICA --}}
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' }}
{{-- DATOS DEL ESTUDIANTE Y PERIODO --}}
II. DATOS DE LA MATRÍCULA Y ESTUDIANTE
Estudiante {{ $matricula->postulante ? $matricula->postulante->nombres . ' ' . $matricula->postulante->apellidos : 'No asignado' }} DNI / Doc. {{ $matricula->postulante->dni ?? '---' }}
Plan de Estudios {{ $matricula->planEstudio->nombre ?? '---' }} Periodo Lectivo {{ $matricula->periodo->nombre ?? '---' }}
Ciclo / Semestre {{ $matricula->semestre->nombre ?? '---' }} Fecha Matrícula {{ $matricula->fecha_matricula ? \Carbon\Carbon::parse($matricula->fecha_matricula)->format('d/m/Y') : '---' }}
Estado Matrícula {{ $matricula->estado }} Condición Estudiante {{ $matricula->postulante->grado ?? 'Estudiante' }}
{{-- TABLA DETALLE DE ASIGNATURAS UNIFICADA --}}
III. CARGA HORARIA / ASIGNATURAS REGISTRADAS
@forelse ($cursosUnicos as $index => $item) @empty @endforelse
Asignatura / Curso Sección Turno Docente Horarios / Días Estado
{{ $index + 1 }} {{ $item['curso_nombre'] }} {{ $item['seccion'] }} {{ $item['turno'] }} {{ $item['docente'] }} {{ $item['horarios'] }} {{ $item['estado'] }}
No existen asignaturas inscritas en la presente matrícula.
{{-- FIRMAS REGULATORIAS --}}