
<div class="table-responsive" style="height: 199px;">
    <table class="table table-bordered table-condensed table-striped table-hover" style="font-size: smaller;height: 150px;overflow-y: scroll;">
        <thead>
            <tr>
                <th class="text-center" style="vertical-align: middle;">#</th>
                <th class="text-center" style="vertical-align: middle;">Fecha</th>
                <th class="text-center" style="vertical-align: middle;">Usuario</th>
                <th style="width: 80px;" class="text-center">Recibo</th>
                {#<th class="text-center" style="vertical-align: middle;">Cve Ctl</th>#}
                <th class="text-center" style="vertical-align: middle;">Nombre</th>
                <th class="text-center" style="vertical-align: middle;">Monto</th>
                <td class="text-center" style="vertical-align: middle;">*</td>
            </tr>
        </thead>
        <tbody>
            {% set registros = 0 %}
            {% set total = 0 %}
            {% set boucher = 0 %}
            {% set totalBoucher = 0 %}
            {% set efectivo = 0 %}
            {% set totalEfectivo = 0 %}
            {% set transferencia = 0 %}
            {% set totalTransferencia = 0 %}
            {% set terminal = 0 %}
            {% set totalTerminal = 0 %}
            {% for i in ingresos %}
                <tr>
                    <td style="vertical-align: middle" class="text-center">{{loop.index}}</td>
                    <td style="vertical-align: middle" class="text-center">
                        {{i.fecMov | date('d-F-Y') | replace({
                                                'January':'Enero', 
                                                'February':'Febrero', 
                                                'March':'Marzo', 
                                                'April':'Abril', 
                                                'May':'Mayo', 
                                                'June':'Junio', 
                                                'July':'Julio', 
                                                'August':'Agosto', 
                                                'September':'Septiembre', 
                                                'October':'Octubre', 
                                                'November':'Noviembre', 
                                                'December':'Diciembre'
                                                })
                        }}
                    </td>
                    <td style="vertical-align: middle" class="text-left">{{i.cveUsu}}</td>
                    <td style="vertical-align: middle" class="text-center">{{i.numRecibo}}</td>
                    {#<td style="vertical-align: middle" class="text-center">{{i.cveAlu.cveCtl}}</td>#}
                    <td style="vertical-align: middle" class="text-left">
                        <div class="col-lg-10" style="padding-left: 0px;padding-right: 0px;">
                            <strong>{{i.cveAlu.nomAlu}}</strong> {{i.cveAlu.apePat}} {{i.cveAlu.apeMat}} : {{i.cveAlu.cveCtl}}
                        </div>
                        <div class="col-lg-2 text-center" style="padding-left: 0px;padding-right: 0px;vertical-align: middle;padding-top: 5px;">
                            <a href="{{path('vista_pago',{cveCtl:i.cveAlu.cveCtl})}}" class="btn btn-xs btn-success" target="_blank" data-toggle="tooltip" title="Ir a Caja..." data-placement="right">$</a>
                        </div>
                    </td>
                    <td class="text-right" style="vertical-align: middle;">${{i.monto | number_format(2,".",",")}}</td>
                    <td style="vertical-align: middle" class="text-center">
                        {% if i.tipPag == 0 %}
                            <i>BOUCHER</i>
                            {% set boucher = boucher + 1 %}
                            {% set totalBoucher = totalBoucher + i.monto %}
                        {% elseif i.tipPag == 1 %}
                            <strong>EFECTIVO</strong>
                            {% set efectivo = efectivo + 1 %}
                            {% set totalEfectivo = totalEfectivo + i.monto %}
                        {% elseif i.tipPag == 2 %}
                            TRANSFERENCIA
                            {% set transferencia = transferencia + 1 %}
                            {% set totalTransferencia = totalTransferencia + i.monto %}
                        {% elseif i.tipPag == 3 %}
                            TERMINAL
                            {% set terminal = terminal + 1 %}
                            {% set totalTerminal = totalTerminal + i.monto %}
                        {% endif %}
                    </td>
                </tr>
                {% set registros = loop.length %}
                {% set total = total + i.monto %}
            {% else %}
                <tr>
                    <td class="text-center" style="vertical-align: middle;" colspan="5">---------NO HAY DATOS----------</td>
                </tr>
            {% endfor%}
            {% if registros > 0%}
                <tr>
                    <td colspan="6" class="text-right" style="vertical-align: middle;"><strong>TOTAL</strong></td>
                    <td class="text-right" style="vertical-align: middle;font-weight: bolder;background: #286090;color: white;">${{total | number_format(2,".",",")}}</td>
                </tr>
            {% endif %}
        </tbody>
    </table>
</div>
{% if registros > 0%}
    <br>
    <div class="table-responsive">
        <table class="table table-bordered table-condensed" style="font-size: smaller;">
            <thead></thead>
            <tbody>
                <tr>
                    <td style="background: #EFFCE5;" class="text-right"><strong>EFECTIVO = {{efectivo}}</strong></td>
                    <td style="background: #EFFCE5;" class="text-right"><strong>T. EFECTIVO = ${{totalEfectivo | number_format(2,".",",")}}</strong></td>
                    <td style="background: #A5CC8A;" class="text-right">BOUCHER = {{boucher}}</td>
                    <td style="background: #A5CC8A;" class="text-right">T. BOUCHER = ${{totalBoucher | number_format(2,".",",")}}</td>
                </tr>
                <tr>
                    <td style="background: #A5CC8A;" class="text-right">TRANSFERENCIA = {{transferencia}}</td>
                    <td style="background: #A5CC8A;" class="text-right">T. TRANSFERENCIA = ${{totalTransferencia | number_format(2,".",",")}}</td>
                    <td style="background: #EFFCE5;" class="text-right"><strong>TERMINAL = {{terminal}}</strong></td>
                    <td style="background: #EFFCE5;" class="text-right"><strong>T. TERMINAL = ${{totalTerminal | number_format(2,".",",")}}</strong></td>
                </tr>
            </tbody>
        </table>
    </div>
{% endif %}