<div class="col-lg-12">
    <div class="card border-secondary mb-1">
        <div class="card-header bg-secondary border-secondary text-white">
            <i class="fas fa-building mr-1"></i>
            LISTA DE MATRICULACIÓN DE ALUMNOS POR MES
        </div>
        <div class="card-body">
            <div class="row">
                <div class="col-lg-12 p-2" style="border: solid cadetblue;">
                    <div class="row">
                        <div class="col-lg-6">
                            <label class="control-label" for="ideAlumnoAgregar">Selecciona el Alumno</label>
                            <select class="form-control form-control-sm alumnoPG" data-live-search="true" id="ideAlumnoAgregar" name="ideAlumnoAgregar">
                                <option value="default">Selecciona</option>
                                {% for ap in alumnosPlantel %}
                                    {% if ap.cveLic is not null %}
                                        <option value="{{ ap.ideAlu }}">{{ ap.apePat }} {{ ap.apeMat }} {{ ap.nomAlu }} : {{ ap.cveCtl }} : {{ ap.cveLic.cveNivAca.nombre }} EN {{ ap.cveLic.nomLic }}</option>
                                    {% else %}
                                        <option value="{{ ap.ideAlu }}">{{ ap.apePat }} {{ ap.apeMat }} {{ ap.nomAlu }} : {{ ap.cveCtl }} : POSIBLE REPETIDO</option>
                                    {% endif %}
                                {% else %}
                                    <option value="default">No hay alumnos</option>
                                {% endfor %}
                            </select>
                        </div>
                        <div class="col-lg-2">
                            <label class="control-label" for="noCuatriSemestre">Cuatri/Semestre</label>
                            <select class="form-control form-control-sm text-center" id="noCuatriSemestre" name="noCuatriSemestre">
                                <option value="default">Selecciona</option>
                                {% for indi in 1.. 10 %}
                                    <option value="{{ indi }}">{{ indi }}°</option>
                                {% endfor %}
                            </select>
                        </div>

                        <div class="col-lg-2 text-center">
                            <button type="button" class="btn btn-success btn-xs btn-block" id="mesMatriculacion" onclick="agregarAlumnoAlMesMatriculacion({{pagMat.idePagMat}});">
                                Agregar
                            </button>
                            <button type="button" class="btn btn-warning btn-xs btn-block" onclick="traerOperacionesMasivas({{pagMat.idePagMat}});" data-bs-toggle="modal" data-bs-target="#ventanaModalOperaciones">
                                OPERACIONES
                            </button>
                        </div>
                        <div class="col-lg-2" id="con_res_agregarAlumnoAlMesMatricualcion">

                        </div>
                    </div><!-- FIN row -->
                </div>
                <div class="col-lg-12 mt-2">
                    <div class="row">
                        <div class="col-lg-12 table-responsive" style="height: 350px;">
                            <table class="table table-bordered table-condensed table-hover small">
                                <thead class="thead-light">
                                    <tr class="text-center">
                                        <th class="estatico">#</th>
                                        <th class="estatico">N.C.</th>
                                        <th class="estatico">CLAVE</th>
                                        <th class="estatico">ALUMNO</th>
                                        <th class="estatico">ESPECIALIDAD</th>
                                        <th class="estatico">CUATRI</th>
                                        <th class="estatico">COSTO</th>
                                        <th class="estatico">*</th>
                                        <th class="estatico">*</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {% set totalAlumnos = 0 %}
                                    {% set sumaTotal = 0 %}
                                    {% set numCuatrimestre = 0 %}
                                    {% set especialidad = "" %}

                                    {% for a in alumnos %}
                                        {% if numCuatrimestre == a.numero and especialidad == ( a.cveLic.cveNivAca.nombre ~ ' EN '~a.cveLic.nomLic) %}
                                        {% else %}
                                            {% set numCuatrimestre = a.numero %}
                                            {% set especialidad = ( a.cveLic.cveNivAca.nombre ~ ' EN '~a.cveLic.nomLic) %}
                                            <tr>
                                                <td colspan="9" style="background-color: #e9ecef;"></td>
                                            </tr>
                                        {% endif %}
                                        <tr>
                                            <td class="text-center" style="vertical-align: middle;">
                                                <input type="checkbox" id="checkbox-operMas-{{ a.cveAlu.ideAlu }}" onclick="agregarListaOperacionesMasivas({{ a.cveAlu.ideAlu }});">
                                            </td>
                                            <td class="text-center">{{ loop.index }}</td>
                                            <td class="text-center">
                                                <a class="text-primary" href="{{path('consulta_alumno_dos', {ideAlu: a.cveAlu.ideAlu} )}}" target="_blank" style="color: black;">{{a.cveAlu.cveCtl}}</a>
                                            </td>
                                            <td class="text-left">
                                                {{ a.cveAlu.apePat }} {{ a.cveAlu.apeMat }} {{ a.cveAlu.nomAlu }}
                                            </td>
                                            <td class="text-left">
                                                {{ a.cveLic.cveNivAca.nombre }} EN {{ a.cveLic.nomLic }}
                                            </td>
                                            <td class="text-center" style="white-space: nowrap;">
                                                {#<input class="text-center" type="number" min="1" max="10" value="{{ a.numero }}" id="numCua-{{ a.cveAlu.ideAlu }}"><b>°</b>#}
                                                {{ a.numero }}°
                                            </td>
                                            <td class="text-center" style="white-space: nowrap;">
                                                {#<b>$</b><input class="text-center" type="number" step="any" min="0" value="{{ a.costoMat | number_format(2,".",",") }}" id="costMat-{{a.cveAlu.ideAlu}}">#}
                                                $ {{ a.costoMat | number_format(2,".",",") }}
                                            </td>
                                            <td class="text-center">
                                                <button class="btn btn-danger btn-xs" onclick="quitarAlumnoAlMesMatriculacion({{pagMat.idePagMat}},{{a.cveAlu.ideAlu}} );" style="font-size: xx-small;">
                                                    <i class="fa fa-trash-alt"></i>
                                                </button>
                                            </td>
                                            <td class="text-center" id="con_res_aux_alum_mat{{a.cveAlu.ideAlu}}">
                                            </td>
                                            {% set totalAlumnos = totalAlumnos + 1 %}
                                            {% set sumaTotal = sumaTotal + a.costoMat %}
                                        </tr>
                                    {% endfor %}
                                </tbody>
                                <tfoot>
                                    <tr style="font-weight: bolder;background-color: #e9ecef;">
                                        <td colspan="5" class="text-right">TOTAL</td>
                                        <td class="text-center">{{ totalAlumnos }}</td>
                                        <td class="text-center">${{ sumaTotal | number_format(2,".",",") }}</td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                </tfoot>
                            </table>

                        </div><!-- FIN col-lg-12 -->
                    </div><!-- FIN row -->

                </div><!-- FIN col-lg-12 -->
            </div><!-- FIN row -->
        </div><!-- FIN card-body -->
    </div><!-- FIN card -->
</div><!-- FIN col-lg-12 -->