<table class="table table-bordered table-condensed table-striped table-responsive table-hover" style="font-size: xx-small;">
    <thead>
        <tr>
            <th>N.C.</th>
            <th>FECHA</th>
            <th>NOMBRE</th>
            <th>RECIBO</th>
            <th>CONCEPTO</th>
            <th>MONTO</th>
            <th>RECARGOS</th>
            <th>MODO</th>
            <th>PLANTEL</th>
        </tr>
    </thead>
    <tbody>
        {% set registros = ingresosDetalles | length %}
        {% set sumaTotal = 0 %}
        {% set sumaRecargos = 0 %}
        {% for i in ingresosDetalles %}
            <tr>
                <td>{{loop.index}}</td>

                {% if i[0].descripcion == "PAGO DE REINSCRIPCION" or i[0].descripcion == "PAGO DE INSCRIPCION" %}
                    <td>{{i[0].fecMov | date('d-m-Y')}}</td>
                    <td>{{i[0].cveAlu.apePat}} {{i[0].cveAlu.apeMat}} {{i[0].cveAlu.nomAlu}}</td>
                    <td>{{i[0].numRecibo}}
                    <td>{{i[0].descripcion}}
                        {% for x in i[1] %}
                            {% if x.cveAlu.getModalidad == "CUATRIMESTRAL" %}
                                {{x.semestre}}° CUATRIMESTRE {{x.fecIni | date('Y')}}
                            {% else %}
                                {{x.semestre}}° SEMESTRE {{x.fecIni | date('Y')}}
                            {% endif %}
                        {% endfor %}
                    </td>
                    <td class="text-right">$ {{ (i[0].monto - i[0].recargos) | number_format(2,".",",")}}</td>
                    {% set sumaTotal = sumaTotal + (i[0].monto - i[0].recargos) %}
                    <td class="text-right">$ {{i[0].recargos | number_format(2,".",",")}}</td>
                    {% set sumaRecargos = sumaRecargos + i[0].recargos %}
                    {% if i[0].tipPag == 0 %}
                        <td class="text-right">BOUCHER</td>
                    {% elseif i[0].tipPag == 1 %}
                        <td class="text-right"><i style="font-weight: bolder;">EFECTIVO</i></td>
                    {% elseif i[0].tipPag == 2 %}
                        <td class="text-right">TRANSFERENCIA</td>
                    {% elseif i[0].tipPag == 3 %}
                        <td class="text-right">TERMINAL</td>
                    {% elseif i[0].tipPag == 4 %}
                        <td class="text-right">XD</td>
                    {% else %}
                        <td class="text-right">(°O°)</td>
                    {% endif %}
                    <td class="text-right">{{i[0].cvePla.nomPla}}</td>

                {% else %}
                    <td>{{i[0].fecMov | date('d-m-Y')}}</td>
                    <td>{{i[0].cveAlu.apePat}} {{i[0].cveAlu.apeMat}} {{i[0].cveAlu.nomAlu}}</td>
                    <td>{{i[0].numRecibo}}
                    <td>{{i[0].descripcion}}
                        {% if i[0].descripcion == "ABONO CONVENIO" %}
                            #{{i[1].numConvenio}} {{i[1].nomMes}} {{i[1].fecIni | date('d-m-Y')}}
                        {% elseif i[0].descripcion == "PAGO DE TITULACIÓN" %}
                            
                        {% elseif i[0].descripcion == "INSCRIPCIÓN E.U." or i[0].descripcion == "ABONO: COSTO EXAMEN" or i[0].descripcion == "ABONO: PAGO PARCIAL" or i[0].descripcion == "ABONO: ACREDITACIÓN" or i[0].descripcion == "ABONO: CERTIFICACIÓN" or i[0].descripcion == "ABONO: LIQUIDACIÓN"%}
                            : <i style="font-weight: bolder;">{{i[0].cveAlu.cveNumApli.numeroAplicacion}}</i>
                        {% else %}
                            {% for x in i[1] %}
                                {{x.nomMes}} {{x.fecIni | date('Y')}}
                            {% endfor %}
                        {% endif %}
                    </td>
                    <td class="text-right">$ {{ (i[0].monto - i[0].recargos) | number_format(2,".",",")}}</td>
                    {% set sumaTotal = sumaTotal + (i[0].monto - i[0].recargos) %}
                    <td class="text-right">$ {{i[0].recargos | number_format(2,".",",")}}</td>
                    {% set sumaRecargos = sumaRecargos + i[0].recargos %}
                    {% if i[0].tipPag == 0 %}
                        <td class="text-right">BOUCHER</td>
                    {% elseif i[0].tipPag == 1 %}
                        <td class="text-right"><i style="font-weight: bolder;">EFECTIVO</i></td>
                    {% elseif i[0].tipPag == 2 %}
                        <td class="text-right">TRANSFERENCIA</td>
                    {% elseif i[0].tipPag == 3 %}
                        <td class="text-right">TERMINAL</td>
                    {% elseif i[0].tipPag == 4 %}
                        <td class="text-right">XD</td>
                    {% else %}
                        <td class="text-right">(°O°)</td>
                    {% endif %}
                    <td class="text-right">{{i[0].cvePla.nomPla}}</td>
                {% endif %}

                {#{{i[0].fecMov | date('d-m-Y')}} {{i[0].descripcion}}#}
            </tr>
        {% else %}
            <tr>
                <td colspan="7">NO HAY REGISTROS EN EL SISTEMA</td>
            </tr>
        {% endfor %}
        {% if registros == 0 %}
            <tr>
                <td></td>
            </tr>
        {% else %}
            <tr style="background-color: lightskyblue;font-weight: bolder;">
                <td colspan="5" class="text-right">TOTALES</td>
                <td class="text-right">$ {{sumaTotal | number_format(2,".",",") }}</td>
                <td class="text-right">$ {{sumaRecargos | number_format(2,".",",") }}</td>
                <td class="text-right"></td>
            </tr>
        {% endif %}
    </tbody>
</table>
<div class="col-lg-12">
    <div class="col-lg-6 col-xs-12" id="contenedorResumen">

    </div>
    <div class="col-lg-6 col-xs-12" id="graficaResumen">

    </div>
</div>