
 <!-- page break para version impresa -->
<div class="page-break"></div>
<div id="imagen_fidelitas_bancos" class="text-left hidden" style="padding-bottom: 10px;"></div>
<div id="nombre_cuit_seccion_bancos" class="hidden" ></div>
<h4 id="titulo_seccion_bancos" class="text-center titulo-fidelitas hidden"></h4>  
<div class="col-md-12 ">
  <h4 class="text-center titulo-fidelitas ">@traducir('STATUS BANCARIO','STATUS BANCARIO')</h4>
</div>
<div class="col-md-12 padding10 mt20">
  <div class="col-md-3 col-xs-3 ">
    <div class ="padding10 background-fidelitas text-center font15 " style="min-height: 55px;">
      @traducir('CHEQUES RECHAZADOS','CHEQUES RECHAZADOS')
    </div>
    <div class =" padding10 text-center font15"  style="border:1px solid #eee;">
      @if(isset($card_status_bancario->cheques_rechazados)) @if($card_status_bancario->cheques_rechazados  > 0) @traducir('SI','SI') @else @traducir('NO','NO') @endif @else @traducir('No Informa','No Informa') @endif
    </div>
  </div>
  <div class="col-md-3 col-xs-3">
    <div class ="padding10 background-fidelitas text-center font15 " style="min-height: 55px;">
      @traducir('SITUACIÓN DIFERENTE A NORMAL','SITUACIÓN DIFERENTE A NORMAL')
    </div>
    <div class =" padding10 text-center font15"  style="border:1px solid #eee;">
       @if(isset($card_status_bancario->situaciones)) @if($card_status_bancario->situaciones  > 0) @traducir('SI','SI') @else @traducir('NO','NO') @endif @else @traducir('No Informa','No Informa') @endif
    </div>
  </div>
  <div class="col-md-3 col-xs-3">
    <div class ="padding10 background-fidelitas text-center font15 " style="min-height: 55px;">
      @traducir('ÚLTIMA POSICIÓN','ÚLTIMA POSICIÓN')
    </div>
    <div class =" padding10 text-center font15" style="border:1px solid #eee; ">
      @if(isset($card_status_bancario->ultima_posicion)) 
      
        @if($card_status_bancario->ultima_posicion  > 0) 
          $ {{number_format($card_status_bancario->ultima_posicion ,0,',',' ')}} 
        @else
        @traducir('No Informa','No Informa')
        @endif 
      @else 
      @traducir('No Informa','No Informa')
       @endif
    </div>
  </div>
  <div class="col-md-3 col-xs-3">
    <div class ="padding10 background-fidelitas text-center font15 " style="min-height: 55px;">
      @traducir('MÁXIMA POSICIÓN','MÁXIMA POSICIÓN') <div style="font-size:10px;">(@traducir('VALOR MÁX. ÚLTIMOS 24 MESES','VALOR MÁX. ÚLTIMOS 24 MESES'))</div>
    </div>
    <div class =" padding10 text-center font15" style="border:1px solid #eee; ">
       @if(isset($card_status_bancario->maxima_posicion)) @if($card_status_bancario->maxima_posicion  > 0) $ {{number_format($card_status_bancario->maxima_posicion,0,',',' ')}} @endif @else @traducir('No Informa','No Informa') @endif
    </div>
  </div>
</div>

<div class="col-md-12 col-xs-12 padding10">
  <h4 class="text-center titulo-fidelitas ">@traducir('CHEQUES RECHAZADOS','CHEQUES RECHAZADOS')</h4>
</div>

@if(!($persona_fisica) && empty($cheques))
  <h4 class="text-center">@traducir('No se registran Cheques Rechazados','No se registran Cheques Rechazados')</h4>
@endif 


@if(isset($grafico_cheques) && $grafico_cheques['total']>0)
  <div style="" class="col-md-12 col-sm-12 col-xs-12 text-center ">
    <div class="col-md-12 col-sm-12 col-xs-12 background-fidelitas" style="padding:10px;font-size:16px; margin: 0px 0px 5px 0px;">
      @traducir('CHEQUES RECHAZADOS ÚLTIMOS 24 MESES','CHEQUES RECHAZADOS ÚLTIMOS 24 MESES')
    </div>
    <div class="col-md-12 col-sm-12 col-xs-12 text-center" style="margin-top:20px;">
        @if($grafico_cheques_bancos != '')
          <div style="height: 450px; margin-bottom:8px;">
            <img src="{{$grafico_cheques_bancos}}" style="width:95%" />
          </div>
        @else
          @if(isset($grafico_cheques) && $grafico_cheques['total']>0)
          <div class="col-md-12 col-sm-12 col-xs-12" style="height: 300px;">
            <canvas id="cheques_bancos"  class="chartjs-render-monitor"></canvas>
          </div>
          @else
          <div class="col-md-12 col-sm-12 col-xs-12" style="height: 1px;">
          </div>
          @endif  
        @endif
    </div>
  </div>

@endif
  @if(isset($cheques['a_nombre_de_empresa']))
    <div class="col-md-12 col-sm-12 col-xs-12">
      <div style="padding:10px;font-size:16px; margin-bottom: 50px;" class="col-md-12 col-sm-12 col-xs-12  text-center background-fidelitas">
        <span>{{$cheques['cantidad_propios']}}</span> @traducir('CHEQUES RECHAZADOS','CHEQUES RECHAZADOS') @if(isset($mensaje)) {{$mensaje}} @endif
      </div>
      <table data-order='[[ 2, "desc" ]]' class="table table-hover tabla_cheques">
        <thead>
          <tr>
            <th>
              @traducir('Número de Cheque','Número de Cheque')
            </th>
            <th>
              @traducir('Importe','Importe')
            </th>
            <th>
              @traducir('Fecha Rechazo','Fecha Rechazo')
            </th>
            <th>
              @traducir('Fecha Pago','Fecha Pago')
            </th>
            <th>
              @traducir('Fecha Pago Multa','Fecha Pago Multa')
            </th>
            <th>
              @traducir('Causa','Causa')
            </th>
          </tr>
        </thead>
        <tbody>
          @foreach ($cheques['a_nombre_de_empresa'] as $cheque)
            <tr>
              <td>
                {{ $cheque->nro_cheque }}
              </td>
              <td>
                {{ number_format($cheque->importe,2,'.',' ')  }}
              </td>
              <td>
                <span style="display: none;"> {{ substr($cheque->fecha_rechazo, -4) }}/{{ substr($cheque->fecha_rechazo, -7, 2) }}/{{ substr($cheque->fecha_rechazo, -10, 2) }}</span>
                {{ $cheque->fecha_rechazo }}
              </td>
              
              <td>
                {{ $cheque->fecha_levantamiento }}
              </td>
              <td>
                {{ $cheque->fecha_pago }}
              </td>
              <td>
                {{ $cheque->causa }}
              </td>
            </tr>
          @endforeach
        </tbody>
        <tfoot>
          <tr>
            <th>
              @traducir('Número de Cheque','Número de Cheque')
            </th>
            <th>
              @traducir('Importe','Importe')
            </th>
            <th>
              @traducir('Fecha Rechazo','Fecha Rechazo')
            </th>
            <th>
              @traducir('Fecha Pago','Fecha Pago')
            </th>
            <th>
              @traducir('Fecha Pago Multa','Fecha Pago Multa')
            </th>
            <th>
              @traducir('Causa','Causa')
            </th>
          </tr>
        </tfoot>
      </table>
    </div>
    @if(!isset($mostrar_cheques_completos) && isset($cheques['a_nombre_de_empresa']) && sizeof($cheques['a_nombre_de_empresa']) > 499 && !Session::get('html') )
      <div class="col-md-12 text-center">
        <a href="#" class="cheques_500_ver_todos" data-cuit="{{ $cuit }}" data-id_persona="{{ $id_persona }}" data-_token="{{ csrf_token() }}" >@traducir('Ver todos los cheques','Ver todos los cheques')</a>
      </div>
    @endif
    @if(isset($mostrar_cheques_completos))
      <script type="text/javascript">
        $(function(){
          crearDatatable('.tabla_cheques');
        });
      </script>
    @endif
  @endif {{-- end of isset($cheques['a_nombre_de_empresa'] --}}


<!-- persona fisica inicio -->
@if($persona_fisica)
  @if(!isset($cheques['a_nombre_de_empresa']) && !isset($cheques['propio']) && !isset($cheques['empresa']))
    <h4 class="text-center">@traducir('No se registran Cheques Rechazados','No se registran Cheques Rechazados').</h4>
  @else

    @if(isset($cheques['propio']))

      <div style="" class="col-md-12 col-sm-12 col-xs-12 text-center ">
        <div class="col-md-12 col-sm-12 col-xs-12 background-fidelitas" style="padding:10px;font-size:16px; margin: 0px 0px 5px 0px;">
          {{$cheques['cantidad_propios'] or ''}} @traducir('CHEQUES RECHAZADOS EN CUENTAS PERSONALES','CHEQUES RECHAZADOS EN CUENTAS PERSONALES')
        </div>
      <div class="col-md-12 text-center">

        <table class="table table-hover tabla_cheques">
          <thead>
            <tr>
              <th>
                @traducir('Número de Cheque','Número de Cheque')
              </th>
              <th>
                @traducir('Firmante','Firmante')
              </th>
              <th>
                @traducir('Importe','Importe')
              </th>
              <th>
              @traducir('Fecha Rechazo','Fecha Rechazo')
              </th>
              <th>
              @traducir('Fecha Pago','Fecha Pago')
              </th>
              <th>
              @traducir('Fecha Pago Multa','Fecha Pago Multa')
              </th>
              <th>
              @traducir('Causa','Causa')
              </th>
            </tr>
          </thead>
          <tbody>
            @foreach ($cheques['propio'] as $cheque)
            <tr>
              <td>
                {{ $cheque->nro_cheque }}
              </td>
              <td>
                {{ $cheque->nombre_persona_firmante or 'No Informa'}}
              </td>
              <td>
                {{ number_format($cheque->importe,2,',',' ')  }} 
              </td>
              <td>
                {{ $cheque->fecha_rechazo }}
              </td>
              <td>
                {{ $cheque->fecha_levantamiento }}
              </td>
              <td>
                {{ $cheque->fecha_pago }}
              </td>
              <td>
                {{ $cheque->causa }}
              </td>
            </tr>
            @endforeach
          </tbody>
          <tfoot>
            <tr>
              <th>
                @traducir('Número de Cheque','Número de Cheque')
              </th>
              <th>
                @traducir('Firmante','Firmante')
              </th>
              <th>
                @traducir('Importe','Importe')
              </th>
              <th>
              @traducir('Fecha Rechazo','Fecha Rechazo')
              </th>
              <th>
              @traducir('Fecha Pago','Fecha Pago')
              </th>
              <th>
              @traducir('Fecha Pago Multa','Fecha Pago Multa')
              </th>
              <th>
              @traducir('Causa','Causa')
              </th>
            </tr>
          </tfoot>
        </table>
      </div>
      

      @if(!isset($mostrar_cheques_completos) && isset($cheques['propio']) && sizeof($cheques['propio']) > 499 && !Session::get('html') )
        <div class="col-md-12 text-center">
          <a href="#" class="cheques_500_ver_todos" data-cuit="{{ $cuit }}" data-id_persona="{{ $id_persona }}" data-_token="{{ csrf_token() }}" >@traducir('Ver todos los cheques','Ver todos los cheques')</a>
        </div>
      @endif
      @if(isset($mostrar_cheques_completos))
        <script type="text/javascript">
          $(function(){
            crearDatatable('#tabla_cheques');
          });
        </script>
     
      @endif
    @else {{-- else of isset($cheques['propio']) --}}
      <div class="col-md-12 col-sm-12 col-xs-12"><h5 style="padding:10px;" class="text-center alert alert-success">@traducir('No se registran cheques rechazados en cuentas Personales','No se registran cheques rechazados en cuentas Personales')</h5></div>
    @endif

  @endif

@endif
@if(isset($total_cheques['1propio']) && $total_cheques['1propio']['cantidad'] > 0)
<div class="col-md-12 col-sm-12 col-xs-12">
  <div class="col-md-12 col-sm-12 col-xs-12 background-fidelitas" style="padding:10px;font-size:16px; margin: 0px 0px 5px 0px;">
        @if($persona_fisica)
          @traducir('RESUMEN DE CHEQUES RECHAZADOS EN CUENTAS PERSONALES','RESUMEN DE CHEQUES RECHAZADOS EN CUENTAS PERSONALES')
        @else
          @traducir('RESUMEN DE CHEQUES RECHAZADOS','RESUMEN DE CHEQUES RECHAZADOS')
        @endif
        </div>
        <div class="col-md-12 padding10">
          <table class="table table-bordered">
            <thead>
              <tr>
                <td class="background-fidelitas" rowspan="2"></td>
                <td class="background-fidelitas" colspan="4">@traducir('Sin Fondos','Sin Fondos')</td>
                <td class="background-fidelitas" colspan="4">@traducir('Def. Formales','Def. Formales')</td>
              </tr>
              <tr>
                <td class="background-fidelitas">@traducir('Cantidad','Cantidad')</td>
                <td class="background-fidelitas">%</td>
                <td class="background-fidelitas">@traducir('Monto','Monto')</td>
                <td class="background-fidelitas">%</td>
                <td class="background-fidelitas">@traducir('Cantidad','Cantidad')</td>
                <td class="background-fidelitas">%</td>
                <td class="background-fidelitas">@traducir('Monto','Monto')</td>
                <td class="background-fidelitas">%</td>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td class="text-left background-fidelitas">@traducir('Sin Abonar','Sin Abonar')</td>
                @if(isset($cuadro_cheques_totales['1propio']['SIN LEVANTAR']))
                  @if(!isset($cuadro_cheques_totales['1propio']['SIN LEVANTAR']['SIN FONDOS'])) {{-- Si no tiene Sin fondos--}}
                    <td>0</td>
                    <td>0%</td>
                    <td class="text-right">0</td>
                    <td>0%</td>
                  @endif 
                  @foreach($cuadro_cheques_totales['1propio']['SIN LEVANTAR'] as $key => $value)
                      @if ($key == 'SIN FONDOS')
                      <td>{{$value->cantidad}}</td>
                      <td>{{ round(100/ $total_cheques['1propio']['cantidad'] * $value->cantidad)}}%</td>
                      <td class="text-right">{{ number_format($value->monto,2,',',' ') }}</td>
                      <td>{{ round(100/ $total_cheques['1propio']['monto'] * $value->monto)}}%</td>
                      @endif
                  @endforeach
                  @if(!isset($cuadro_cheques_totales['1propio']['SIN LEVANTAR']['DEFECTOS FORMALES'])) {{-- Si no tiene Defectos Formales--}}
                    <td>0</td>
                    <td>0%</td>
                    <td class="text-right">0</td>
                    <td>0%</td>
                  @endif 
                  @foreach($cuadro_cheques_totales['1propio']['SIN LEVANTAR'] as $key => $value)
                      @if ($key == 'DEFECTOS FORMALES')
                      <td>{{$value->cantidad}}</td>
                      <td>{{ round(100/ $total_cheques['1propio']['cantidad'] * $value->cantidad)}}%</td>
                      <td class="text-right">{{ number_format($value->monto,2,',',' ') }}</td>
                      <td>{{ round(100/ $total_cheques['1propio']['monto'] * $value->monto)}}%</td>
                      @endif
                  @endforeach
                @endif
              </tr>
              <tr>
                <td class="text-left background-fidelitas">@traducir('Levantados','Levantados')</td>
                @if(isset($cuadro_cheques_totales['1propio']['LEVANTADOS']))
                 @if(!isset($cuadro_cheques_totales['1propio']['LEVANTADOS']['SIN FONDOS'])) {{-- Si no tiene Sin fondos--}}
                    <td>0</td>
                    <td>0%</td>
                    <td class="text-right">0</td>
                    <td>0%</td>
                  @endif 
                  @foreach($cuadro_cheques_totales['1propio']['LEVANTADOS'] as $key => $value)
                      @if ($key == 'SIN FONDOS')
                      <td>{{$value->cantidad}}</td>
                      <td>{{ round(100/ $total_cheques['1propio']['cantidad'] * $value->cantidad)}}%</td>
                      <td class="text-right">{{ number_format($value->monto,2,',',' ') }}</td>
                      <td>{{ round(100/ $total_cheques['1propio']['monto'] * $value->monto)}}%</td>
                      @endif 
                  @endforeach
                  @if(!isset($cuadro_cheques_totales['1propio']['LEVANTADOS']['DEFECTOS FORMALES'])) {{-- Si no tiene Defectos formales --}}
                    <td>0</td>
                    <td>0%</td>
                    <td class="text-right">0</td>
                    <td>0%</td>
                  @endif 
                  @foreach($cuadro_cheques_totales['1propio']['LEVANTADOS'] as $key => $value)
                      @if ($key == 'DEFECTOS FORMALES')
                      <td>{{$value->cantidad}}</td>
                      <td>{{ round(100/ $total_cheques['1propio']['cantidad'] * $value->cantidad)}}%</td>
                      <td class="text-right">{{ number_format($value->monto,2,',',' ') }}</td>
                      <td>{{ round(100/ $total_cheques['1propio']['monto'] * $value->monto)}}%</td>
                      @endif 
                  @endforeach
                @endif
              </tr>
              <tr>
                <td class="text-left background-fidelitas">Totales</td>
                @if(isset($cuadro_cheques_totales['1propio']['CHEQUES']))
                 @if(!isset($cuadro_cheques_totales['1propio']['CHEQUES']['SIN FONDOS'])) {{-- Si no tiene Sin fondos--}}
                    <td>0</td>
                    <td>0%</td>
                    <td class="text-right">0</td>
                    <td>0%</td>
                  @endif 
                  @foreach($cuadro_cheques_totales['1propio']['CHEQUES'] as $key => $value)
                      @if ($key == 'SIN FONDOS')
                      <!--td>{{$value->cantidad}}</td>
                      <td>100%</td>
                      <td class="text-right">{{ number_format($value->monto,2,',',' ') }}</td>
                      <td>100%</td-->
                      <td>{{$value->cantidad}}</td>
                      <td>{{ round(100/ $total_cheques['1propio']['cantidad'] * $value->cantidad)}}%</td>
                      <td class="text-right">{{ number_format($value->monto,2,',',' ') }}</td>
                      <td>{{ round(100/ $total_cheques['1propio']['monto'] * $value->monto)}}%</td>
                      @endif
                  @endforeach
                  @if(!isset($cuadro_cheques_totales['1propio']['CHEQUES']['DEFECTOS FORMALES'])) {{-- Si no tiene defectos formales --}}
                    <td>0</td>
                    <td>0%</td>
                    <td class="text-right">0</td>
                    <td>0%</td>
                  @endif 
                  @foreach($cuadro_cheques_totales['1propio']['CHEQUES'] as $key => $value)
                      @if ($key == 'DEFECTOS FORMALES')
                      <!--td>{{$value->cantidad}}</td>
                      <td>100%</td>
                      <td class="text-right">{{ number_format($value->monto,2,',',' ') }}</td>
                      <td>100%</td-->
                      <td>{{$value->cantidad}}</td>
                      <td>{{ round(100/ $total_cheques['1propio']['cantidad'] * $value->cantidad)}}%</td>
                      <td class="text-right">{{ number_format($value->monto,2,',',' ') }}</td>
                      <td>{{ round(100/ $total_cheques['1propio']['monto'] * $value->monto)}}%</td>
                      @endif
                  @endforeach
                @endif
              </tr>
            </tbody>
          </table>
        </div>
    </div>
@endif
  </div>
  @if(isset($cheques['empresa']))
    <div class="col-md-12 text-center">

    <div style="padding:10px;font-size:16px; margin: 0px 0px 5px 0px;" class="col-md-12 col-sm-12 col-xs-12 text-center background-fidelitas"><span>{{$cheques['cantidad_empresas']}}</span> @traducir('CHEQUES RECHAZADOS EN CUENTAS DE PERSONAS JURÍDICAS','CHEQUES RECHAZADOS EN CUENTAS DE PERSONAS JURÍDICAS')</div>
    <table class="table table-hover tabla_cheques">
      <thead>
        <tr>
          <th>
            @traducir('Número de Cheque','Número de Cheque')
          </th>
          <th>
            @traducir('Empresa','Empresa')
          </th>
          <th>
            @traducir('Importe','Importe')
          </th>
          <th>
            @traducir('Fecha Rechazo','Fecha Rechazo')
          </th>
          <th>
            @traducir('Fecha Pago','Fecha Pago')
          </th>
          <th>
            @traducir('Fecha Pago Multa','Fecha Pago Multa')
          </th>
          <th>
            @traducir('Causa','Causa')
          </th>
        </tr>
      </thead>
      <tbody>
        @foreach ($cheques['empresa'] as $cheque)
          <tr>
            <td>
              {{ $cheque->nro_cheque }}
            </td>
            <td>
              <form target="iframe{{$cheque->Cuit_relacionado}}" method="POST" action="/informes/compacto" class="text-left">
                <input type="hidden" name="_token" id="token" value="{{ csrf_token() }}">
                <input id="idp" name="idp" value="{{$cheque->idp}}" type="hidden">
                <input id="fcuit" name="cuit" value="{{$cheque->Cuit_relacionado}}" type="hidden">
                <input id="nc" name="nc" value="{{$cheque->nombre_persona_relacionado}} - {{$cheque->Cuit_relacionado}}" type="hidden">
                <input id="rs" name="rs" value="{{$cheque->nombre_persona_relacionado}}" type="hidden">
                <button type="submit" class="nuevo-informe">{{$cheque->nombre_persona_relacionado or ''}}</button>
              </form>
            </td>
            <td>
              {{ number_format($cheque->importe,2,',',' ')  }}
            </td>
            <td>
              {{ $cheque->fecha_rechazo }}
            </td>
            <td>
              {{ $cheque->fecha_levantamiento }}
            </td>
            <td>
              {{ $cheque->fecha_pago }}
            </td>
            <td>
              {{ $cheque->causa }}
            </td>
          </tr>
        @endforeach
      </tbody>
      <tfoot>
        <tr>
          <th>
            @traducir('Número de Cheque','Número de Cheque')
          </th>
          <th>
            @traducir('Empresa','Empresa')
          </th>
          <th>
            @traducir('Importe','Importe')
          </th>
          <th>
            @traducir('Fecha Rechazo','Fecha Rechazo')
          </th>
          <th>
            @traducir('Fecha Pago','Fecha Pago')
          </th>
          <th>
            @traducir('Fecha Pago Multa','Fecha Pago Multa')
          </th> 
          <th>
            @traducir('Causa','Causa')
          </th>
        </tr>
      </tfoot>
    </table>

    @if(!isset($mostrar_cheques_completos) && isset($cheques['empresa']) && sizeof($cheques['empresa']) > 499 && !Session::get('html') )
      <div class="col-md-12 text-center">
        <a href="#" class="cheques_500_ver_todos" data-cuit="{{ $cuit }}" data-id_persona="{{ $id_persona }}" data-_token="{{ csrf_token() }}" >@traducir('Ver todos los cheques','Ver todos los cheques')</a>
      </div>
    @endif
    @if(isset($mostrar_cheques_completos))
      <script type="text/javascript">
        $(function(){
          crearDatatable('.tabla_cheques');
        });
      </script>
    @endif
   
  @endif {{-- end of isset($cheques['empresa'] --}}
  </div>
@if($persona_fisica)
  @if(isset($total_cheques['2empresa']) && $total_cheques['2empresa']['cantidad']  > 0)
 <div class="col-md-12 col-sm-12 col-xs-12 background-fidelitas" style="padding:10px;font-size:16px; margin: 0px 0px 5px 0px;">
        @traducir('RESUMEN DE CHEQUES RECHAZADOS EN CUENTAS DE PERSONAS JURÍDICAS','RESUMEN DE CHEQUES RECHAZADOS EN CUENTAS DE PERSONAS JURÍDICAS')
  </div>
  <div class="col-md-12 padding10">
    <table class="table table-bordered">
      <thead>
        <tr>
          <td class="background-fidelitas" rowspan="2"></td>
          <td class="background-fidelitas" colspan="4">@traducir('Sin Fondos','Sin Fondos')</td>
          <td class="background-fidelitas" colspan="4">@traducir('Def. Formales','Def. Formales')</td>
        </tr>
        <tr>
          <td class="background-fidelitas">@traducir('Cantidad','Cantidad')</td>
          <td class="background-fidelitas">%</td>
          <td class="background-fidelitas">@traducir('Monto','Monto')</td>
          <td class="background-fidelitas">%</td>
          <td class="background-fidelitas">@traducir('Cantidad','Cantidad')</td>
          <td class="background-fidelitas">%</td>
          <td class="background-fidelitas">@traducir('Monto','Monto')</td>
          <td class="background-fidelitas">%</td>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td class="text-left background-fidelitas">Sin Abonar</td>
          @if(isset($cuadro_cheques_totales['2empresa']['SIN LEVANTAR']))
            @if(!isset($cuadro_cheques_totales['2empresa']['SIN LEVANTAR']['SIN FONDOS'])) {{-- Si no tiene Sin fondos--}}
                  <td>0</td>
                  <td>0%</td>
                  <td class="text-right">0</td>
                  <td>0%</td>
            @endif 
            @foreach($cuadro_cheques_totales['2empresa']['SIN LEVANTAR'] as $key => $value)
                @if ($key == 'SIN FONDOS')
                  <td>{{$value->cantidad}}</td>
                  <td>{{ round(100/ $total_cheques['2empresa']['cantidad'] * $value->cantidad)}}%</td>
                  <td class="text-right">{{ number_format($value->monto,2,',',' ') }}</td>
                  <td>{{ round(100/ $total_cheques['2empresa']['monto'] * $value->monto)}}%</td>
                @endif 
            @endforeach
            @if(!isset($cuadro_cheques_totales['2empresa']['SIN LEVANTAR']['DEFECTOS FORMALES'])) {{-- Si no tiene Defectos formales--}}
                  <td>0</td>
                  <td>0%</td>
                  <td class="text-right">0</td>
                  <td>0%</td>
            @endif
            @foreach($cuadro_cheques_totales['2empresa']['SIN LEVANTAR'] as $key => $value)
                @if ($key == 'DEFECTOS FORMALES')
                  <td>{{$value->cantidad}}</td>
                  <td>{{ round(100/ $total_cheques['2empresa']['cantidad'] * $value->cantidad)}}%</td>
                  <td class="text-right">{{ number_format($value->monto,2,',',' ') }}</td>
                  <td>{{ round(100/ $total_cheques['2empresa']['monto'] * $value->monto)}}%</td>
                @endif 
            @endforeach
           @else
          <td>0</td>
          <td>0%</td>
          <td class="text-right">0</td>
          <td>0%</td>
          <td>0</td>
          <td>0%</td>
          <td class="text-right">0</td>
          <td>0%</td>
          @endif
        </tr>
        <tr>
          <td class="text-left background-fidelitas">@traducir('Levantados','Levantados')</td>
          @if(isset($cuadro_cheques_totales['2empresa']['LEVANTADOS']))
            @if(!isset($cuadro_cheques_totales['2empresa']['LEVANTADOS']['SIN FONDOS'])) {{-- Si no tiene Sin fondos--}}
                  <td>0</td>
                  <td>0%</td>
                  <td class="text-right">0</td>
                  <td>0%</td>
            @endif 
            @foreach($cuadro_cheques_totales['2empresa']['LEVANTADOS'] as $key => $value)
                @if ($key == 'SIN FONDOS')
                <td>{{$value->cantidad}}</td>
                <td>{{ round(100/ $total_cheques['2empresa']['cantidad'] * $value->cantidad)}}%</td>
                <td class="text-right">{{ number_format($value->monto,2,',',' ') }}</td>
                <td>{{ round(100/ $total_cheques['2empresa']['monto'] * $value->monto)}}%</td>
                @endif
            @endforeach
            @if(!isset($cuadro_cheques_totales['2empresa']['LEVANTADOS']['DEFECTOS FORMALES'])) {{-- Si no tiene defectos formales--}}
                  <td>0</td>
                  <td>0%</td>
                  <td class="text-right">0</td>
                  <td>0%</td>
            @endif
            @foreach($cuadro_cheques_totales['2empresa']['LEVANTADOS'] as $key => $value)
                @if ($key == 'DEFECTOS FORMALES')
                <td>{{$value->cantidad}}</td>
                <td>{{ round(100/ $total_cheques['2empresa']['cantidad'] * $value->cantidad)}}%</td>
                <td class="text-right">{{ number_format($value->monto,2,',',' ') }}</td>
                <td>{{ round(100/ $total_cheques['2empresa']['monto'] * $value->monto)}}%</td>
                @endif
            @endforeach
          @else
          <td>0</td>
          <td>0%</td>
          <td class="text-right">0</td>
          <td>0%</td>
          <td>0</td>
          <td>0%</td>
          <td class="text-right">0</td>
          <td>0%</td>
          @endif
        </tr>
        <tr>
          <td class="text-left background-fidelitas">@traducir('Totales','Totales')</td>
          @if(isset($cuadro_cheques_totales['2empresa']['CHEQUES']))
              @if(!isset($cuadro_cheques_totales['2empresa']['CHEQUES']['SIN FONDOS'])) {{-- Si no tiene Sin fondos--}}
                  <td>0</td>
                  <td>0%</td>
                  <td class="text-right">0</td>
                  <td>0%</td>
              @endif 
              @foreach($cuadro_cheques_totales['2empresa']['CHEQUES'] as $key => $value)
                @if ($key == 'SIN FONDOS')
                <!--td>{{$value->cantidad}}</td>
                <td>100%</td>
                <td class="text-right">{{ number_format($value->monto,2,',',' ') }}</td>
                <td>100%</td-->
                <td>{{$value->cantidad}}</td>
                <td>{{ round(100/ $total_cheques['2empresa']['cantidad'] * $value->cantidad)}}%</td>
                <td class="text-right">{{ number_format($value->monto,2,',',' ') }}</td>
                <td>{{ round(100/ $total_cheques['2empresa']['monto'] * $value->monto)}}%</td>
                @endif 
              @endforeach
              @if(!isset($cuadro_cheques_totales['2empresa']['CHEQUES']['DEFECTOS FORMALES'])) {{-- Si no tiene Sin fondos--}}
                  <td>0</td>
                  <td>0%</td>
                  <td class="text-right">0</td>
                  <td>0%</td>
              @endif 
              @foreach($cuadro_cheques_totales['2empresa']['CHEQUES'] as $key => $value)
                @if ($key == 'DEFECTOS FORMALES')
                <!--td>{{$value->cantidad}}</td>
                <td>100%</td>
                <td class="text-right">{{ number_format($value->monto,2,',',' ') }}</td>
                <td>100%</td-->
                <td>{{$value->cantidad}}</td>
                <td>{{ round(100/ $total_cheques['2empresa']['cantidad'] * $value->cantidad)}}%</td>
                <td class="text-right">{{ number_format($value->monto,2,',',' ') }}</td>
                <td>{{ round(100/ $total_cheques['2empresa']['monto'] * $value->monto)}}%</td>
                @endif 
              @endforeach
           @else
              <td>0</td>
              <td>100%</td>
              <td class="text-right">0</td>
              <td>100%</td>
              <td>0</td>
              <td>100%</td>
              <td class="text-right">0</td>
              <td>100%</td>
            @endif
        </tr>
      </tbody>
    </table>
  </div>
@endif

@endif
 

  @if (isset($cheques['vinculaciones'])) 
    <div class="col-md-12 col-sm-12 col-xs-12 padding10 vinculado_segun_bcra" style="margin-bottom: 25px">
      <h4 class="text-center titulo-fidelitas">@traducir('VINCULACIONES SEGÚN BCRA','VINCULACIONES SEGÚN BCRA')</h4>
    </div>
    <div class="col-md-12 col-sm-12 col-xs-12 vinculado_segun_bcra">
      <div class="col-md-12 col-sm-12 col-xs-12">
        <table class="table table-hover" id="tabla_vinculaciones">
          <thead>
            <tr>
              <th class="text-center">
                @traducir('Firmante','Firmante')
              </th>
              <th class="text-center">
                @traducir('CUIT','CUIT')
              </th>
              <th class="text-center">
                @traducir('Informado a la fecha','Informado a la fecha')
              </th> 
            </tr>
          </thead>
          <tbody>
            @if (isset($vinculados_segun_bcra) && sizeof($vinculados_segun_bcra) > 0)
              @foreach ($vinculados_segun_bcra as $cheque)
                <tr>
                  <td class="text-left">
                    <form target="iframe{{$cheque->cuit_firmante}}" method="POST" action="/informes/compacto" >
                      <input type="hidden" name="_token" id="token" value="{{ csrf_token() }}">
                      <input id="idp" name="idp" value="{{$cheque->idp}}" type="hidden">
                      <input id="fcuit" name="cuit" value="{{$cheque->cuit_firmante}}" type="hidden">
                      <input id="nc" name="nc" value="{{$cheque->nombre_persona_firmante}} - {{$cheque->cuit_firmante}}" type="hidden">
                      <input id="rs" name="rs" value="{{$cheque->nombre_persona_firmante}}" type="hidden">
                      <button type="submit" class="text-left nuevo-informe">{{$cheque->nombre_persona_firmante or ''}}</button>
                    </form>
                  </td>
                  <td class="@if(Session::get('html')) text-center @else @endif">
                    {{ $cheque->cuit_firmante or '' }}
                  </td>
                  <td class="text-center">
                    {{ $cheque->fecha_relacion or '' }}
                  </td>
                </tr>
              @endforeach
            @endif
          </tbody>
          <tfoot>
            <tr>
              <th class="text-center">
                @traducir('Firmante','Firmante')
              </th>
              <th class="text-center">
                @traducir('CUIT','CUIT')
              </th>
              <th class="text-center">
                @traducir('Informado a la fecha','Informado a la fecha')
              </th>
            </tr>
          </tfoot>
        </table>
      </div>
    </div>
    @if(isset($mostrar_cheques_completos))
      <script type="text/javascript">
        $(function(){
          //crearDatatable('#tabla_vinculaciones');
        });
      </script>
    @endif
  @endif {{-- end of isset($cheques['vinculaciones'] --}}
