@Override
  public void bindView(View view, Context context, Cursor cursor) {

    TextView textViewNombreEstablecimiento =
        (TextView) view.findViewById(R.id.textViewCobroTotalEstablecimiento);
    TextView textViewFecha = (TextView) view.findViewById(R.id.textViewCobroTotalFecha);
    TextView textViewDocumento = (TextView) view.findViewById(R.id.textViewCobroTotalDocumento);
    LinearLayout linearLayoutColor =
        (LinearLayout) view.findViewById(R.id.linearLayoutCobroTotalColor);

    TextView textViewDeuda = (TextView) view.findViewById(R.id.textViewCobroTotalMontoDeuda);

    if (cursor.getCount() > 0) {

      String factotales = cursor.getString(cursor.getColumnIndexOrThrow("cc_te_doc"));

      String localCobro =
          cursor.getString(cursor.getColumnIndexOrThrow(DbAdaptert_Evento_Establec.EE_nom_cliente));
      String fechpro = cursor.getString(cursor.getColumnIndexOrThrow("cc_te_fecha_programada"));
      Double repagar = cursor.getDouble(cursor.getColumnIndexOrThrow("cc_re_monto_a_pagar"));

      textViewNombreEstablecimiento.setText(localCobro);
      textViewFecha.setText("F. Vencimiento: " + fechpro);
      textViewDocumento.setText("Nro Doc.: " + factotales);

      textViewDeuda.setText("Crédito: S/. " + Utils.formatDouble(repagar));

      SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy");
      String fecha_Programada = fechpro;
      try {
        Date dSqlite = df.parse((fecha_Programada));
        Date dSistema = df.parse(getDatePhone());
        if (dSqlite.before(dSistema)) {
          linearLayoutColor.setBackgroundColor(context.getResources().getColor(R.color.rojo));
        }
        if (dSqlite.after(dSistema)) {
          linearLayoutColor.setBackgroundColor(context.getResources().getColor(R.color.amarillo));
        }
        if (dSqlite.equals(dSistema)) {
          linearLayoutColor.setBackgroundColor(context.getResources().getColor(R.color.rojo));
        }
      } catch (ParseException e1) {
        e1.printStackTrace();
      }
    }
  }
  // SLIDING MENU
  public void changeDataSlideMenu() {

    // INICIALIZAMOS OTRA VEZ LAS VARIABLES
    slide_emitidoTotal = 0.0;
    slide_pagadoTotal = 0.0;
    slide_cobradoTotal = 0.0;
    slide_totalRuta = 0.0;
    slide_totalPlanta = 0.0;
    slide_ingresosTotales = 0.0;
    slide_gastosTotales = 0.0;
    slide_aRendir = 0.0;

    // AGENTE, RUTA Y ESTABLECIMIENTOS
    Cursor cursorAgente = dbHelperAgente.fetchAgentesByIds(slideIdAgente, slideIdLiquidacion);
    cursorAgente.moveToFirst();

    if (cursorAgente.getCount() > 0) {
      slideNombreRuta =
          cursorAgente.getString(cursorAgente.getColumnIndexOrThrow(dbHelperAgente.AG_nombre_ruta));
      slideNumeroEstablecimientoxRuta =
          cursorAgente.getInt(cursorAgente.getColumnIndexOrThrow(dbHelperAgente.AG_nro_bodegas));
      slideNombreAgente =
          cursorAgente.getString(
              cursorAgente.getColumnIndexOrThrow(dbHelperAgente.AG_nombre_agente));
    }

    // INGRESOS
    Cursor cursorResumen = dbGastosIngresos.listarIngresosGastos(slideIdLiquidacion);
    cursorResumen.moveToFirst();
    for (cursorResumen.moveToFirst(); !cursorResumen.isAfterLast(); cursorResumen.moveToNext()) {
      // int n = cursorResumen.getInt(cursorResumen.getColumnIndexOrThrow("n"));
      Double emitido = cursorResumen.getDouble(cursorResumen.getColumnIndexOrThrow("emitidas"));
      Double pagado = cursorResumen.getDouble(cursorResumen.getColumnIndexOrThrow("pagado"));
      Double cobrado = cursorResumen.getDouble(cursorResumen.getColumnIndexOrThrow("cobrado"));
      // nTotal += n;
      slide_emitidoTotal += emitido;
      slide_pagadoTotal += pagado;
      slide_cobradoTotal += cobrado;
    }
    // GASTOS
    Utils utils = new Utils();
    Cursor cursorTotalGastos = dbAdapter_informe_gastos.resumenInformeGastos(utils.getDayPhone());

    for (cursorTotalGastos.moveToFirst();
        !cursorTotalGastos.isAfterLast();
        cursorTotalGastos.moveToNext()) {
      Double rutaGasto =
          cursorTotalGastos.getDouble(cursorTotalGastos.getColumnIndexOrThrow("RUTA"));
      Double plantaGasto =
          cursorTotalGastos.getDouble(cursorTotalGastos.getColumnIndexOrThrow("PLANTA"));

      slide_totalRuta += rutaGasto;
      slide_totalPlanta += plantaGasto;
    }

    slide_ingresosTotales = slide_cobradoTotal + slide_pagadoTotal;
    slide_gastosTotales = slide_totalRuta;
    slide_aRendir = slide_ingresosTotales - slide_gastosTotales;

    // MOSTRAMOS EN EL SLIDE LOS DATOS OBTENIDOS
    DecimalFormat df = new DecimalFormat("0.00");
    textViewSlideNombreAgente.setText("" + slideNombreAgente);
    textViewSlideNombreRuta.setText("" + slideNombreRuta);
    buttonSlideNroEstablecimiento.setText("" + slideNumeroEstablecimientoxRuta);
    textviewSlideARendir.setText("Efectivo a Rendir S/. " + df.format(slide_aRendir));

    // DATA VENTAS
    Cursor cursorEstablecimiento =
        dbAdaptert_evento_establec.listarEstablecimientosByID(
            slideIdEstablecimiento, slideIdLiquidacion);

    cursorEstablecimiento.moveToFirst();

    if (cursorEstablecimiento.getCount() > 0) {

      String nombre_establecimiento =
          cursorEstablecimiento.getString(
              cursorEstablecimiento.getColumnIndex(dbAdaptert_evento_establec.EE_nom_establec));
      String nombre_cliente =
          cursorEstablecimiento.getString(
              cursorEstablecimiento.getColumnIndex(dbAdaptert_evento_establec.EE_nom_cliente));
      int id_estado_atencion =
          Integer.parseInt(
              cursorEstablecimiento.getString(
                  cursorEstablecimiento.getColumnIndex(
                      dbAdaptert_evento_establec.EE_id_estado_atencion)));
      double deudaTotal =
          cursorEstablecimiento.getDouble(
              cursorEstablecimiento.getColumnIndexOrThrow("cc_re_monto_a_pagar"));

      textViewSlideNombreEstablecimiento.setText("" + nombre_establecimiento);
      buttonSlideDeudaHoy.setText("" + df.format(deudaTotal));
    }

    Cursor cursorVentasTotales =
        dbAdapter_comprob_venta.getTotalVentaByIdEstablecimientoAndLiquidacion(
            slideIdEstablecimiento, slideIdLiquidacion);
    cursorVentasTotales.moveToFirst();
    if (cursorVentasTotales.getCount() > 0) {
      Double total =
          cursorVentasTotales.getDouble(cursorVentasTotales.getColumnIndexOrThrow("total"));
      buttonSlideVentaDeHoy.setText("" + df.format(total));
    }
  }