<div id="contenedor-ingresos" class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding-left: 0px;padding-right: 0px;">
    <div class="col-lg-5 col-md-5 col-sm-5 col-xs-12">
        <div class="panel panel-default">
            {% if fA != "" and fB != "" %}
                <div class="panel-heading">
                    <i class="fa fa-dollar fa-fw"></i> FECHAS-><strong style="color:red;"> {{fA | date('d-m-Y')}} : {{fB | date('d-m-Y')}}</strong>
                </div>
            {% elseif fA != "" and fB == "" %}
                <div class="panel-heading">
                    <i class="fa fa-dollar fa-fw"></i> FECHA-><strong style="color:red;"> {{fA | date('d-m-Y')}}</strong>
                </div>
            {% elseif fA == "" and fB != "" %}
                <div class="panel-heading">
                    <i class="fa fa-dollar fa-fw"></i> FECHA-><strong style="color:red;"> {{fB | date('d-m-Y')}}</strong>
                </div>
            {% endif %}
            <div class="panel-body" style="height: 300px;overflow-y: scroll;">
                <div class="table-responsive">
                    <table class="table table-bordered table-condensed table-striped table-hover" style="font-size: smaller;">
                        <thead>
                            <tr>
                                <th class="text-center" style="vertical-align: middle;">#</th>
                                <th class="text-center" style="vertical-align: middle;">PLANTEL</th>
                                <th class="text-center" style="vertical-align: middle;">REGISTROS</th>
                                <th class="text-center" style="vertical-align: middle;">MONTO TOTAL</th>
                            </tr>
                        </thead>
                        <tbody>
                            {% set registros = 0 %}
                            {% set bandera = 0 %}
                            {% set total = 0 %}
                            {% for ig in ingresosAgrupados %}
                                {% set registros = loop.length %}
                                {% set bandera = 1 %}
                                <tr id="{{ig.cvePla}}" class="filas" onclick="seleccionarFila(this.id);">
                                    <td style="vertical-align: middle;">{{loop.index}}</td>
                                    <td style="vertical-align: middle;">{{ig.cvePla}} : {{ig.nomPla}}</td>
                                    <td class="text-center" style="vertical-align: middle;">{{ig.cantidad}}</td>
                                    <td id="tot-{{ig.cvePla}}" class="text-right" style="vertical-align: middle;">${{ig.total | number_format(2,".",",")}}</td>
                                </tr>
                                {% set total = total + ig.total %}
                            {% else %}
                                <tr>
                                    <td colspan="6" class="text-center">-----------NO HAY DATOS-----------</td>
                                </tr>
                            {% endfor %}
                            {% if bandera == 1 %}
                                <tr>
                                    <td class="text-right" style="vertical-align: middle;" colspan="3">TOTAL</td>
                                    <td class="text-right" style="vertical-align: middle;"><strong>${{total | number_format(2,".",",")}}</strong></td>
                                </tr>
                            {% endif %}
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="panel-footer">
                NUMERO DE REGISTROS: {{registros}}
            </div>
        </div>
    </div>
    <div class="col-lg-7 col-md-7 col-sm-7 col-xs-12">
        <div class="panel panel-default">
            <div class="panel-heading" id="tituloDetalles"><i class="fa fa-list-ol fa-fw"></i> DETALLES DE:<strong></strong></div>
            <div class="panel-body" style="height: 341px;overflow-y: scroll;" id="contenedor-detalles">
                <p><--Selecciones un registro de la tabla de la izquierda.</p>
            </div>
            <!--<div class="panel-footer">
                NUMERO DE REGISTROS
            </div>-->
        </div>
    </div>
</div><!-- div col-lg-12 -->