public void importarCertificacionPresupuestaria() {
    System.out.println("entra a metodo impostar cer. presu");

    set_tramite.getTab_seleccion().setSql(ser_Presupuesto.getTramite("true"));
    set_tramite.getTab_seleccion().ejecutarSql();
    set_tramite.dibujar();
  }
Пример #2
0
 public void buscarRegistro() {
   if (setTabla.getValorSeleccionado() != null) {
     autCompleta.setValor(setTabla.getValorSeleccionado());
     dibujarRegistro();
     setTabla.cerrar();
     utilitario.addUpdate("autCompleta,panOpcion");
   } else {
     utilitario.agregarMensajeInfo("Debe seleccionar una Solicitud", "");
   }
 }
Пример #3
0
  @Override
  public void aceptarReporte() {
    // TODO Auto-generated method stub
    if (rep_reporte.getReporteSelecionado().equals("Perfiles")) {
      if (rep_reporte.isVisible()) {
        map_parametros = new HashMap();
        rep_reporte.cerrar();
        map_parametros.put("titulo", "PERFILES DE USUARIO");
        sel_rep.setSeleccionFormatoReporte(map_parametros, rep_reporte.getPath());
        sel_rep.dibujar();
        utilitario.addUpdate("sel_rep,rep_reporte");
      }
    } else if (rep_reporte.getReporteSelecionado().equals("Usuarios Por Perfil")) {
      if (rep_reporte.isVisible()) {
        map_parametros = new HashMap();
        rep_reporte.cerrar();
        set_perfiles.dibujar();
        //	utilitario.addUpdate("rep_reporte,set_perfiles");
      } else if (set_perfiles.isVisible()) {
        if (set_perfiles.getListaSeleccionados().size() > 0) {
          map_parametros.put("ide_perf", set_perfiles.getSeleccionados());
          set_perfiles.cerrar();
          map_parametros.put("titulo", "USUARIOS POR PERFIL");
          sel_rep.setSeleccionFormatoReporte(map_parametros, rep_reporte.getPath());
          sel_rep.dibujar();
          //	utilitario.addUpdate("sel_rep,set_perfiles");
        } else {
          utilitario.agregarMensajeInfo(
              "Atencion", "Debe seleccionar al menos un perfil de usuario");
        }
      }

    } else if (rep_reporte.getReporteSelecionado().equals("Recursos por Perfil")) {
      if (rep_reporte.isVisible()) {
        map_parametros = new HashMap();
        rep_reporte.cerrar();
        set_perfiles.dibujar();
        //	utilitario.addUpdate("rep_reporte,set_perfiles");
      } else if (set_perfiles.isVisible()) {
        if (set_perfiles.getListaSeleccionados().size() > 0) {
          map_parametros.put("ide_perf", set_perfiles.getSeleccionados());
          set_perfiles.cerrar();
          map_parametros.put("titulo", "PERFILES POR RECURSOS");
          sel_rep.setSeleccionFormatoReporte(map_parametros, rep_reporte.getPath());
          sel_rep.dibujar();
          //	utilitario.addUpdate("sel_rep,set_perfiles");
        } else {
          utilitario.agregarMensajeInfo(
              "Atencion", "Debe seleccionar al menos un perfil de usuario");
        }
      }
    }
  }
  public void aceptarCertificacionPresupuestaria() {
    System.out.println("entra a metodo aceptar cert");

    String str_seleccionado = set_tramite.getValorSeleccionado();
    TablaGenerica tab_tramite = ser_Presupuesto.getTablaGenericaTramite(str_seleccionado);
    if (str_seleccionado != null) {
      tab_comprobante.insertar();
      tab_detalle_movimiento.limpiar();
      tab_detalle_movimiento.setColumnaSuma("haber_codem,debe_codem");
      tab_comprobante.setValor("ide_prtra", tab_tramite.getValor("ide_prtra"));
    }
    set_tramite.cerrar();
    utilitario.addUpdate("tab_comprobante");
  }
  public void aceptarSolicitudCompra() {
    System.out.println("entra a metodo aceptar solicitud");

    String str_seleccionado = set_solicitud.getValorSeleccionado();
    TablaGenerica tab_solicitud = ser_Adquisicion.getTablaGenericaSolicitud(str_seleccionado);
    if (str_seleccionado != null) {
      tab_comprobante.insertar();
      tab_comprobante.setValor("ide_adsoc", str_seleccionado);
      tab_comprobante.setValor("valor_compra_tecpo", tab_solicitud.getValor("total_adfac"));
      tab_comprobante.setValor("valor_iva_tecpo", tab_solicitud.getValor("valor_iva_adfac"));
      tab_comprobante.setValor("ide_prtra", tab_solicitud.getValor("ide_prtra"));
      tab_comprobante.setValor("ide_tepro", tab_solicitud.getValor("ide_tepro"));
    }
    set_solicitud.cerrar();
    utilitario.addUpdate("tab_comprobante");
  }
 //// boton impuesto
 public void importarImpuesto() {
   System.out.println("entra a metodo import impues");
   if (tab_adq_factura.getValor("subtotal_adfac") == null
       || tab_adq_factura.getValor("subtotal_adfac").equals("")) {
     utilitario.agregarMensaje("No puede generar una retencion", "Ingrese un valor de compra");
     return;
   }
   if (tab_adq_factura.getValor("VALOR_IVA_ADFAC") == null
       || tab_adq_factura.getValor("VALOR_IVA_ADFAC").equals("")) {
     utilitario.agregarMensaje("No puede generar una retencion", "Ingrese valor Iva");
     return;
   }
   set_impuesto
       .getTab_seleccion()
       .setSql("select ide_tetii,detalle_tetii from tes_tipo_impuesto order by ide_tetii");
   set_impuesto.getTab_seleccion().ejecutarSql();
   set_impuesto.dibujar();
 }
Пример #7
0
 public void aceptarRegistro() {
   if (calFechaInicio.getValue() != null && calFechaFin.getValue() != null) {
     setTabla
         .getTab_seleccion()
         .setSql(
             "SELECT a.abastecimiento_id, \n"
                 + "a.abastecimiento_fecha, \n"
                 + "a.abastecimiento_numero_vale, \n"
                 + "(case when a.mve_secuencial is not null then v.placa when a.mve_secuencial is null then d.dependencia_descripcion end ) \n"
                 + "FROM mvabactecimiento_combustible AS a \n"
                 + "left JOIN mv_vehiculo v ON a.mve_secuencial = v.mve_secuencial  \n"
                 + "left join mvtipo_dependencias d on a.abastecimiento_cod_dependencia = d.dependencia_codigo \n"
                 + "WHERE a.abastecimiento_tipo_ingreso = 'K'\n"
                 + "and a.abastecimiento_fecha BETWEEN '"
                 + calFechaInicio.getFecha()
                 + "'and'"
                 + calFechaFin.getFecha()
                 + "'\n"
                 + "ORDER BY a.abastecimiento_fecha,a.abastecimiento_numero_vale");
     setTabla.getTab_seleccion().ejecutarSql();
   } else {
     utilitario.agregarMensajeInfo("Debe seleccionar un rago de fechas", "");
   }
 }
Пример #8
0
  public AbastecimientoAutomotor() {

    tabConsulta.setId("tabConsulta");
    tabConsulta.setSql(
        "SELECT u.IDE_USUA,u.NOM_USUA,u.NICK_USUA,u.IDE_PERF,p.NOM_PERF,p.PERM_UTIL_PERF\n"
            + "FROM SIS_USUARIO u,SIS_PERFIL p where u.IDE_PERF = p.IDE_PERF and IDE_USUA="
            + utilitario.getVariable("IDE_USUA"));
    tabConsulta.setCampoPrimaria("IDE_USUA");
    tabConsulta.setLectura(true);
    tabConsulta.dibujar();

    conPostgres.setUnidad_persistencia(utilitario.getPropiedad("poolPostgres"));
    conPostgres.NOMBRE_MARCA_BASE = "postgres";

    panOpcion.setId("panOpcion");
    panOpcion.setTransient(true);
    panOpcion.setHeader("ABASTECIMIENTO DE COMBUSTIBLE");
    agregarComponente(panOpcion);

    Boton botBuscar = new Boton();
    botBuscar.setValue("Buscar Registro");
    botBuscar.setIcon("ui-icon-search");
    botBuscar.setMetodo("abrirCuadro");
    bar_botones.agregarBoton(botBuscar);

    autCompleta.setId("autCompleta");
    autCompleta.setConexion(conPostgres);
    autCompleta.setAutoCompletar(
        "SELECT a.abastecimiento_id,a.abastecimiento_fecha,a.abastecimiento_numero_vale,\n"
            + "(case when a.mve_secuencial is not null then (case when v.placa is not null then v.placa when v.placa is null then v.codigo_activo end )   \n"
            + "when a.mve_secuencial is null then d.dependencia_descripcion end)   \n"
            + "FROM mvabactecimiento_combustible AS a\n"
            + "left JOIN mv_vehiculo v ON a.mve_secuencial = v.mve_secuencial\n"
            + "left join mvtipo_dependencias d on a.abastecimiento_cod_dependencia = d.dependencia_codigo\n"
            + "WHERE a.abastecimiento_tipo_ingreso = 'K'\n"
            + "ORDER BY a.abastecimiento_fecha ASC, a.abastecimiento_numero_vale ASC");
    autCompleta.setMetodoChange("filtrarSolicitud");
    autCompleta.setSize(70);
    bar_botones.agregarComponente(new Etiqueta("Registros Encontrado"));
    bar_botones.agregarComponente(autCompleta);

    Boton botDependencia = new Boton();
    botDependencia.setValue("Dependencias");
    botDependencia.setIcon("ui-icon-plus");
    botDependencia.setMetodo("ingDependencia");
    bar_botones.agregarBoton(botDependencia);

    /*CONFIGURACIÓN DE COMBOS*/
    Grid griBusca = new Grid();
    griBusca.setColumns(2);

    griBusca.getChildren().add(new Etiqueta("FECHA INICIO:"));
    griBusca.getChildren().add(calFechaInicio);
    griBusca.getChildren().add(new Etiqueta("FECHA FINAL:"));
    griBusca.getChildren().add(calFechaFin);

    Boton botAcceso = new Boton();
    botAcceso.setValue("Buscar");
    botAcceso.setIcon("ui-icon-search");
    botAcceso.setMetodo("aceptarRegistro");
    bar_botones.agregarBoton(botAcceso);
    griBusca.getChildren().add(botAcceso);

    setTabla.setId("setTabla");
    setTabla.getTab_seleccion().setConexion(conPostgres);
    setTabla.setSeleccionTabla(
        "SELECT a.abastecimiento_id,a.abastecimiento_fecha,a.abastecimiento_numero_vale, \n"
            + "(case when a.mve_secuencial is not null then v.placa when a.mve_secuencial is null then d.dependencia_descripcion end ) \n"
            + "FROM mvabactecimiento_combustible AS a \n"
            + "left JOIN mv_vehiculo v ON a.mve_secuencial = v.mve_secuencial  \n"
            + "left join mvtipo_dependencias d on a.abastecimiento_cod_dependencia = d.dependencia_codigo \n"
            + "WHERE a.abastecimiento_tipo_ingreso = 'K' \n"
            + "ORDER BY a.abastecimiento_fecha, a.abastecimiento_numero_vale",
        "abastecimiento_id");
    setTabla.getTab_seleccion().setEmptyMessage("No Encuentra Datos");
    setTabla.getTab_seleccion().setRows(10);
    setTabla.setRadio();
    setTabla.getGri_cuerpo().setHeader(griBusca);
    setTabla.getBot_aceptar().setMetodo("buscarRegistro");
    setTabla.setHeader("REPORTES DE DESCUENTOS - SELECCIONE PARAMETROS");
    agregarComponente(setTabla);

    Grid griDependencia = new Grid();
    griDependencia.setColumns(2);
    griDependencia.getChildren().add(new Etiqueta("Dependencia"));
    griDependencia.getChildren().add(taccesorio);
    Boton botDepenIng = new Boton();
    botDepenIng.setValue("Guardar");
    botDepenIng.setIcon("ui-icon-disk");
    botDepenIng.setMetodo("insAccesorio");
    bar_botones.agregarBoton(botDepenIng);
    Boton botDepenBor = new Boton();
    botDepenBor.setValue("Eliminar");
    botDepenBor.setIcon("ui-icon-closethick");
    botDepenBor.setMetodo("endAccesorio");
    bar_botones.agregarBoton(botDepenBor);
    griDependencia.getChildren().add(botDepenIng);
    griDependencia.getChildren().add(botDepenBor);
    dialogoa.setId("dialogoa");
    dialogoa.setTitle("DEPENDENCIA SOLICITA COMBUSTIBLE"); // titulo
    dialogoa.setWidth("35%"); // siempre en porcentajes  ancho
    dialogoa.setHeight("50%"); // siempre porcentaje   alto
    dialogoa.setResizable(false); // para que no se pueda cambiar el tamaño
    dialogoa.getGri_cuerpo().setHeader(griDependencia);
    grid.setColumns(4);
    agregarComponente(dialogoa);

    dibujarRegistro();
  }
Пример #9
0
 public void abrirCuadro() {
   setTabla.dibujar();
 }
Пример #10
0
  public pre_permisos() {

    Boton bot_aprobar_solicitud = new Boton();
    bot_aprobar_solicitud.setValue("APROBAR SOLICITUD");
    bot_aprobar_solicitud.setMetodo("aprobarSolicitud");

    Boton bot_anulado = new Boton();
    bot_anulado.setValue("ANULAR SOLICITUD");
    bot_anulado.setMetodo("anularSolicitud");

    Boton bot_aprobacion_talento_humano = new Boton();
    bot_aprobacion_talento_humano.setValue("APROBACION TALENTO HUMANO");
    bot_aprobacion_talento_humano.setMetodo("aprobacionTalentoHumano");

    // boton limpiar
    Boton bot_limpiar = new Boton();
    bot_limpiar.setIcon("ui-icon-cancel");
    bot_limpiar.setMetodo("limpiar");

    rep_reporte.setId("rep_reporte");
    rep_reporte.getBot_aceptar().setMetodo("aceptarReporte");
    agregarComponente(rep_reporte);

    sef_reporte.setId("sef_reporte");
    agregarComponente(sef_reporte);
    bar_botones.agregarReporte();
    bar_botones.getBot_inicio().setMetodo("inicio");
    bar_botones.getBot_fin().setMetodo("fin");
    bar_botones.getBot_siguiente().setMetodo("siguiente");
    bar_botones.getBot_atras().setMetodo("atras");

    // autocompletar empleado
    aut_empleado.setId("aut_empleado");
    String str_sql_emp = ser_gestion.getSqlEmpleadosAutocompletar();
    aut_empleado.setAutoCompletar(str_sql_emp);
    aut_empleado.setMetodoChange("filtrarAnticiposEmpleado");

    Etiqueta eti_colaborador = new Etiqueta("Empleado:");
    bar_botones.agregarComponente(eti_colaborador);
    bar_botones.agregarComponente(aut_empleado);
    bar_botones.agregarBoton(bot_limpiar);
    bar_botones.agregarBoton(bot_aprobar_solicitud);
    bar_botones.agregarBoton(bot_anulado);
    bar_botones.agregarBoton(bot_aprobacion_talento_humano);

    //  PERMISOS (division 1)

    tab_permisos.setId("tab_permisos");
    tab_permisos.setTabla("ASI_PERMISOS_VACACION_HEXT", "IDE_ASPVH", 1);
    tab_permisos.getColumna("TIPO_ASPVH").setValorDefecto("1"); // 1 permisos
    tab_permisos.agregarRelacion(tab_permiso_justificacion);
    tab_permisos.getColumna("TIPO_ASPVH").setVisible(false);
    tab_permisos.getColumna("IDE_GTEMP").setVisible(false);
    tab_permisos.getColumna("IDE_GEEDP").setVisible(false);

    tab_permisos.getColumna("APROBADO_ASPVH").setCheck();
    tab_permisos.getColumna("FECHA_SOLICITUD_ASPVH").setValorDefecto(utilitario.getFechaActual());
    tab_permisos.getColumna("ACTIVO_ASPVH").setCheck();
    tab_permisos.getColumna("ACTIVO_ASPVH").setValorDefecto("true");
    //		tab_permisos.getColumna("IDE_ASMOT").setCombo("ASI_MOTIVO", "IDE_ASMOT", "DETALLE_ASMOT",
    // "");
    tab_permisos
        .getColumna("IDE_ASMOT")
        .setCombo("select IDE_ASMOT,DETALLE_ASMOT from ASI_MOTIVO order by DETALLE_ASMOT");
    tab_permisos.getColumna("IDE_GEMES").setVisible(false);
    tab_permisos.getColumna("IDE_GEANI").setVisible(false);
    tab_permisos
        .getColumna("GEN_IDE_GEEDP")
        .setCombo(
            "SELECT EPAR.IDE_GEEDP,EMP.DOCUMENTO_IDENTIDAD_GTEMP, "
                + "EMP.APELLIDO_PATERNO_GTEMP || ' ' ||  "
                + " EMP.APELLIDO_MATERNO_GTEMP || ' ' || "
                + "EMP.PRIMER_NOMBRE_GTEMP || ' ' || "
                + "EMP.SEGUNDO_NOMBRE_GTEMP AS NOMBRES_APELLIDOS, "
                + "SUCU.NOM_SUCU, AREA.DETALLE_GEARE, "
                + "DEPA.DETALLE_GEDEP "
                + "FROM GEN_EMPLEADOS_DEPARTAMENTO_PAR EPAR "
                + "LEFT JOIN GTH_EMPLEADO EMP ON EMP.IDE_GTEMP=EPAR.IDE_GTEMP "
                + "LEFT JOIN SIS_SUCURSAL SUCU ON SUCU.IDE_SUCU=EPAR.IDE_SUCU "
                + "LEFT JOIN GEN_DEPARTAMENTO DEPA ON DEPA.IDE_GEDEP=EPAR.IDE_GEDEP "
                + "LEFT JOIN GEN_AREA AREA ON AREA.IDE_GEARE=EPAR.IDE_GEARE "
                + "WHERE EPAR.ACTIVO_GEEDP=true");
    tab_permisos.getColumna("GEN_IDE_GEEDP").setAutoCompletar();
    //		tab_permisos.getColumna("GEN_IDE_GEEDP").setLectura(true);
    tab_permisos
        .getColumna("GEN_IDE_GEEDP2")
        .setCombo(tab_permisos.getColumna("GEN_IDE_GEEDP").getListaCombo());
    //		tab_permisos.getColumna("GEN_IDE_GEEDP2").setLectura(true);
    tab_permisos.getColumna("GEN_IDE_GEEDP2").setAutoCompletar();
    // GERENTE DE AREA GEN_IDE_GEEDP3
    tab_permisos
        .getColumna("GEN_IDE_GEEDP3")
        .setCombo(tab_permisos.getColumna("GEN_IDE_GEEDP").getListaCombo());
    tab_permisos.getColumna("GEN_IDE_GEEDP3").setAutoCompletar();
    tab_permisos.getColumna("REGISTRO_NOVEDAD_ASPVH").setCheck();
    tab_permisos.getColumna("REGISTRO_NOVEDAD_ASPVH").setValorDefecto("false");
    tab_permisos.getColumna("REGISTRO_NOVEDAD_ASPVH").setLectura(true);

    tab_permisos.getColumna("GEN_IDE_GEEDP").setRequerida(true);
    tab_permisos.getColumna("GEN_IDE_GEEDP2").setRequerida(true);
    tab_permisos.getColumna("GEN_IDE_GEEDP3").setRequerida(true);
    tab_permisos.getColumna("IDE_ASMOT").setRequerida(true);
    tab_permisos.getColumna("FECHA_SOLICITUD_ASPVH").setRequerida(true);
    tab_permisos.getColumna("FECHA_DESDE_ASPVH").setRequerida(true);
    tab_permisos.getColumna("FECHA_DESDE_ASPVH").setMetodoChange("CargarFechaHasta");
    tab_permisos.getColumna("FECHA_HASTA_ASPVH").setRequerida(true);
    tab_permisos.getColumna("FECHA_HASTA_ASPVH").setLectura(true);
    tab_permisos.getColumna("HORA_DESDE_ASPVH").setRequerida(true);
    tab_permisos.getColumna("HORA_DESDE_ASPVH").setMetodoChange("calaculahoras");
    tab_permisos.getColumna("HORA_HASTA_ASPVH").setRequerida(true);
    tab_permisos.getColumna("HORA_HASTA_ASPVH").setMetodoChange("calaculahoras");
    tab_permisos.getColumna("NRO_HORAS_ASPVH").setFormatoNumero(2);

    tab_permisos.getColumna("NRO_HORAS_ASPVH").setEtiqueta();
    tab_permisos.getColumna("NRO_HORAS_ASPVH").alinearCentro();
    tab_permisos.getColumna("NRO_DIAS_ASPVH").setRequerida(true);
    tab_permisos.getColumna("NRO_DIAS_ASPVH").setEtiqueta();
    tab_permisos.getColumna("NRO_DIAS_ASPVH").alinearCentro();
    tab_permisos.getColumna("IDE_GEEST").setCombo("gen_estados", "IDE_GEEST", "detalle_geest", "");
    tab_permisos
        .getColumna("IDE_GEEST")
        .setValorDefecto(utilitario.getVariable("p_gen_estado_activo"));
    tab_permisos.getColumna("IDE_GEEST").setVisible(false);

    tab_permisos.getGrid().setColumns(4);
    tab_permisos.setTipoFormulario(true);
    tab_permisos.getColumna("ANULADO_ASPVH").setCheck();
    tab_permisos.getColumna("APROBADO_TTHH_ASPVH").setCheck();
    tab_permisos.setCondicion("TIPO_ASPVH=1 AND IDE_GEEDP=-1");
    tab_permisos.dibujar();

    PanelTabla pat_panel1 = new PanelTabla();
    pat_panel1.setPanelTabla(tab_permisos);
    pat_panel1.setMensajeWarn("SOLICITUD DE PERMISOS POR HORAS");

    // Permiso de Justificacion

    tab_permiso_justificacion.setId("tab_permiso_justificacion");
    tab_permiso_justificacion.setTabla("ASI_PERMISO_JUSTIFICACION", "IDE_ASPEJ", 2);
    tab_permiso_justificacion.getColumna("ACTIVO_ASPEJ").setCheck();
    tab_permiso_justificacion.getColumna(" ACTIVO_ASPEJ").setValorDefecto("true");
    tab_permiso_justificacion.getColumna("ARCHIVO_ASPEJ").setUpload("archivos");
    tab_permiso_justificacion.dibujar();

    PanelTabla pat_panel2 = new PanelTabla();
    pat_panel2.setPanelTabla(tab_permiso_justificacion);
    pat_panel2.setMensajeWarn("JUSTIFICACION DE PERMISOS");

    //  DIVISION DE LA PANTALLA

    Division div_division = new Division();
    div_division.dividir2(pat_panel1, pat_panel2, "50%", "H");
    agregarComponente(div_division);

    // confirmacion para guardar datos
    con_guardar.setId("con_guardar");
    agregarComponente(con_guardar);

    List lista = new ArrayList();
    Object fila1[] = {"0", "INACTIVO"};
    Object fila2[] = {"1", "ACTIVO"};
    lista.add(fila1);
    lista.add(fila2);

    lis_activo.setListaSeleccion(lista);
    lis_activo.setVertical();
    dia_filtro_activo.setId("dia_filtro_activo");
    dia_filtro_activo.setTitle("ESCOGA  EMPLEADO ACTIVO/INACTIVO");
    dia_filtro_activo.getBot_aceptar().setMetodo("aceptarReporte");
    dia_filtro_activo.setDialogo(lis_activo);
    dia_filtro_activo.setDynamic(false);
    agregarComponente(dia_filtro_activo);
    set_empleado_asis.setId("set_empleado_asis");
    set_empleado_asis.setSeleccionTabla(
        "SELECT IDE_GTEMP,DOCUMENTO_IDENTIDAD_GTEMP,  "
            + "APELLIDO_PATERNO_GTEMP || ' ' || "
            + "APELLIDO_MATERNO_GTEMP || ' ' ||  "
            + "PRIMER_NOMBRE_GTEMP || ' ' ||  "
            + "SEGUNDO_NOMBRE_GTEMP AS NOMBRES  "
            + "from GTH_EMPLEADO "
            + "WHERE ACTIVO_GTEMP IN(FALSE,TRUE) "
            + "ORDER BY IDE_GTEMP ASC, "
            + "NOMBRES ASC ",
        "IDE_GTEMP");
    set_empleado_asis.getTab_seleccion().getColumna("NOMBRES").setFiltro(true);
    set_empleado_asis.getTab_seleccion().getColumna("DOCUMENTO_IDENTIDAD_GTEMP").setFiltro(true);
    set_empleado_asis.getBot_aceptar().setMetodo("aceptarReporte");
    set_empleado_asis.setTitle("SELECCION DE EMPLEADOS");
    agregarComponente(set_empleado_asis);
    sel_cal.setId("sel_cal");
    sel_cal.setMultiple(true);
    sel_cal.getBot_aceptar().setMetodo("aceptarReporte");
    agregarComponente(sel_cal);

    /// dialogo de anula

    cal_fecha_anula.setId("cal_fecha_anula");

    are_tex_razon_anula.setId("are_tex_razon_anula");
    are_tex_razon_anula.setStyle("width:300px;");

    Grid gri_anular_horas_extra = new Grid();
    gri_anular_horas_extra.setColumns(2);
    gri_anular_horas_extra.getChildren().add(new Etiqueta("RAZON DE ANULACIÓN"));
    gri_anular_horas_extra.getChildren().add(are_tex_razon_anula);
    gri_anular_horas_extra.getChildren().add(new Etiqueta("DOCUMENTO DE ANULACIÓN"));
    gri_anular_horas_extra.getChildren().add(tex_documento_anula);
    gri_anular_horas_extra.getChildren().add(new Etiqueta("FECHA DE ANULACIÓN"));
    gri_anular_horas_extra.getChildren().add(cal_fecha_anula);

    dia_anulado.setId("dia_anulado");
    dia_anulado.setDialogo(gri_anular_horas_extra);
    dia_anulado.setWidth("60%");
    dia_anulado.setHeight("40%");
    dia_anulado.setTitle("ANULACION DE SOLICITUD DE PERMISOS");
    dia_anulado.getBot_aceptar().setMetodo("aceptarAnulacionHorasPermisos");
    dia_anulado.setDynamic(false);
    gri_anular_horas_extra.setStyle(
        "width:" + (dia_anulado.getAnchoPanel() - 5) + "px;overflow:auto;");
    agregarComponente(dia_anulado);
  }
Пример #11
0
  @Override
  public void aceptarReporte() {
    if (rep_reporte.getReporteSelecionado().equals("Detalle Permisos")) {
      if (tab_permisos.getTotalFilas() > 0) {
        if (rep_reporte.isVisible()) {
          p_parametros = new HashMap();
          rep_reporte.cerrar();
          System.out.println("p_parametro " + ide_geedp_activo);
          p_parametros.put("IDE_GEEDP", Integer.parseInt(ide_geedp_activo));
          p_parametros.put(
              "titulo",
              " BIESS GERENCIA ADMINISTRATIVA - FINANCIERA DEPARTAMENTO DE TALENTO HUMANO PERMISOS");
          sef_reporte.setSeleccionFormatoReporte(p_parametros, rep_reporte.getPath());

          sef_reporte.dibujar();
        }
      } else {
        utilitario.agregarMensajeInfo("No se puede continuar", "No contiene registro de permisos");
      }

    } else if (rep_reporte.getReporteSelecionado().equals("Detalle Permisos Fecha")) {

      if (rep_reporte.isVisible()) {
        p_parametros = new HashMap();
        rep_reporte.cerrar();
        dia_filtro_activo.dibujar();
      } else if (dia_filtro_activo.isVisible()) {
        if (lis_activo.getSeleccionados() != null && !lis_activo.getSeleccionados().isEmpty()) {
          p_parametros.put("ACTIVO_GTEMP", lis_activo.getSeleccionados());
          dia_filtro_activo.cerrar();
          sel_cal.dibujar();
        } else {
          utilitario.agregarMensajeInfo(
              "No se puede continuar", "No ha seleccionado ningun Estado");
        }

      } else if (sel_cal.isVisible()) {
        if (sel_cal.isFechasValidas()) {

          p_parametros.put("APROBACION", sel_cal.getFecha1String());
          p_parametros.put("VENCIMIENTO", sel_cal.getFecha2String());

          //				sel_cal.getBot_aceptar().setMetodo("aceptarReporte");
          set_empleado_asis
              .getTab_seleccion()
              .setSql(
                  "SELECT IDE_GTEMP,DOCUMENTO_IDENTIDAD_GTEMP,  "
                      + "APELLIDO_PATERNO_GTEMP || ' ' || "
                      + "APELLIDO_MATERNO_GTEMP || ' ' ||  "
                      + "PRIMER_NOMBRE_GTEMP || ' ' ||  "
                      + "SEGUNDO_NOMBRE_GTEMP AS NOMBRES  "
                      + "from GTH_EMPLEADO "
                      + "WHERE ACTIVO_GTEMP IN("
                      + lis_activo.getSeleccionados()
                      + ") "
                      + "ORDER BY IDE_GTEMP ASC, "
                      + "NOMBRES ASC ");
          set_empleado_asis
              .getTab_seleccion()
              .getColumna("DOCUMENTO_IDENTIDAD_GTEMP")
              .setFiltro(true);
          set_empleado_asis.getTab_seleccion().getColumna("NOMBRES").setFiltro(true);
          set_empleado_asis.getTab_seleccion().ejecutarSql();

          set_empleado_asis.getBot_aceptar().setMetodo("aceptarReporte");
          sel_cal.cerrar();
          set_empleado_asis.dibujar();
        } else {
          utilitario.agregarMensajeInfo("ERROR AL GENERAR REPORTE", "Las fechas no son validas");
        }
      } else if (set_empleado_asis.isVisible()) {
        if (set_empleado_asis.getSeleccionados() != null
            && !set_empleado_asis.getSeleccionados().isEmpty()) {

          System.out.println("" + set_empleado_asis.getSeleccionados());

          p_parametros.put("IDE_GTEMP", set_empleado_asis.getSeleccionados());
          p_parametros.put(
              "titulo",
              " BIESS GERENCIA ADMINISTRATIVA - FINANCIERA  DEPARTAMENTO DE TALENTO HUMANO PERMISOS POR FECHA");
          System.out.println("path " + rep_reporte.getPath());
          sef_reporte.setSeleccionFormatoReporte(p_parametros, rep_reporte.getPath());
          set_empleado_asis.cerrar();
          sef_reporte.dibujar();

        } else {
          utilitario.agregarMensajeInfo(
              "No se puede continuar", "No ha seleccionado ningun Empleado");
        }
      }
    }
  }
  public pre_adq_factura_retencion() {

    // parametros
    par_impuesto_iva = utilitario.getVariable("p_tes_impuesto_iva");
    par_impuesto_renta = utilitario.getVariable("p_tes_impuesto_renta");
    par_iva = Double.parseDouble(utilitario.getVariable("p_valor_iva"));

    /// tabuladores
    Tabulador tab_tabulador = new Tabulador();
    tab_tabulador.setId("tab_tabulador");

    // tabla factura
    tab_adq_factura.setId("tab_adq_factura");
    tab_adq_factura.setHeader("ADQUISICIÓN FACTURA");
    tab_adq_factura.setTabla("adq_factura", "ide_adfac", 1);
    tab_adq_factura.setCampoOrden("ide_adfac desc");
    tab_adq_factura.getColumna("IDE_ADSOC").setCombo(ser_Adquisicion.getSolicitudCompra("true"));
    tab_adq_factura.getColumna("IDE_ADSOC").setAutoCompletar();
    tab_adq_factura.getColumna("IDE_ADSOC").setLectura(true);
    tab_adq_factura.getColumna("subtotal_adfac").setLectura(true);
    tab_adq_factura.getColumna("valor_iva_adfac").setLectura(true);

    tab_adq_factura.setTipoFormulario(true);
    tab_adq_factura.getGrid().setColumns(4);
    tab_adq_factura.agregarRelacion(tab_retencion);
    tab_adq_factura.dibujar();
    PanelTabla pat_factura = new PanelTabla();
    pat_factura.setPanelTabla(tab_adq_factura);

    /// RETENCION
    tab_retencion.setId("tab_retencion");
    tab_retencion.setIdCompleto("tab_tabulador:tab_retencion");
    // tab_retencion.setHeader("RETENCION");
    tab_retencion.setTabla("tes_retencion", "ide_teret", 2);
    tab_retencion.getColumna("total_ret_teret").setEtiqueta();
    tab_retencion
        .getColumna("total_ret_teret")
        .setEstilo("font-size:15px;font-weight: bold;text-decoration: underline;color:red");
    tab_retencion.getColumna("total_ret_teret").setValorDefecto("0.00");
    tab_retencion.getColumna("activo_teret").setValorDefecto("true");
    tab_retencion.getColumna("activo_teret").setLectura(true);
    tab_retencion.getColumna("fecha_teret").setValorDefecto(utilitario.getFechaActual());
    tab_retencion.setTipoFormulario(true);
    tab_retencion.getGrid().setColumns(4);
    tab_retencion.agregarRelacion(tab_detalle_retencion);
    tab_retencion.dibujar();
    PanelTabla pat_retencion = new PanelTabla();
    pat_retencion.setPanelTabla(tab_retencion);

    ///// etiqueta
    Etiqueta eti_retencion = new Etiqueta();
    eti_retencion.setValue("RETENCION");
    eti_retencion.setStyle("font-size: 13px;color: red;font-weight: bold");
    pat_retencion.setHeader(eti_retencion);

    /// DETALLE RETENCION
    tab_detalle_retencion.setId("tab_detalle_retencion");
    tab_detalle_retencion.setIdCompleto("tab_tabulador:tab_detalle_retencion");
    // tab_detalle_retencion.setHeader("DETALLE RETENCION");
    tab_detalle_retencion.setTabla("tes_detalle_retencion", "ide_teder", 3);
    tab_detalle_retencion
        .getColumna("ide_teimp")
        .setCombo("tes_impuesto", "ide_teimp", "codigo_teimp,porcentaje_teimp,detalle_teimp", "");
    tab_detalle_retencion.getColumna("ide_teimp").setLectura(true);
    tab_detalle_retencion.getColumna("ide_teimp").setAutoCompletar();
    tab_detalle_retencion.getColumna("valor_retenido_teder").setEtiqueta();
    tab_detalle_retencion
        .getColumna("valor_retenido_teder")
        .setEstilo(
            "font-size:15px;font-weight: bold;text-decoration: underline;color:red"); // Estilo
    tab_detalle_retencion.getColumna("valor_retenido_teder").setValorDefecto("0.00");
    tab_detalle_retencion.getColumna("activo_teder").setValorDefecto("true");
    tab_detalle_retencion.getColumna("activo_teder").setLectura(true);
    tab_detalle_retencion.setTipoFormulario(true);
    tab_detalle_retencion.getGrid().setColumns(2);
    tab_detalle_retencion.dibujar();
    PanelTabla pat_detalle_retencion = new PanelTabla();
    pat_detalle_retencion.setPanelTabla(tab_detalle_retencion);

    //// para obteber las dos ventanas retencion y detalla retención
    Etiqueta eti_detalle_retencion = new Etiqueta();
    eti_detalle_retencion.setValue("DETALLE RETENCION");
    eti_detalle_retencion.setStyle("font-size: 13px;color: red;font-weight: bold");
    pat_detalle_retencion.setHeader(eti_detalle_retencion);

    Grid gri = new Grid();
    gri.setColumns(2);
    gri.getChildren().add(pat_retencion);
    gri.getChildren().add(pat_detalle_retencion);

    //      tab_tabulador.agregarTab("DETALLE MOVIMIENTO", pat_detalle_movimiento);//intancia los
    // tabuladores
    tab_tabulador.agregarTab("RETENCION", gri);

    Division div_division = new Division();
    div_division.dividir2(pat_factura, tab_tabulador, "50%", "H");
    agregarComponente(div_division);

    /// boton tipo impuesto
    Boton bot_impuesto = new Boton();
    bot_impuesto.setIcon("ui-icon-person");
    bot_impuesto.setValue("Generar Retencion");
    bot_impuesto.setMetodo("importarImpuesto");
    bar_botones.agregarBoton(bot_impuesto);

    set_impuesto.setId("set_impuesto");
    set_impuesto.setSeleccionTabla("tes_tipo_impuesto", "ide_tetii", "detalle_tetii");
    set_impuesto.setTitle("SELECCIONE UN IMPUESTO");
    set_impuesto.getBot_aceptar().setMetodo("aceptarImpuesto");
    set_impuesto.setRadio();
    agregarComponente(set_impuesto);
    // retencion
    set_retencion.setId("set_retencion");
    set_retencion.setSeleccionTabla(ser_Tesoreria.getImpuesto("true", "1", "0"), "ide_teimp");
    set_retencion.setTitle("SELECCIONE UNA RETENCIÓN");
    set_retencion.getBot_aceptar().setMetodo("aceptarImpuesto");
    set_retencion.getTab_seleccion().getColumna("CODIGO_TEIMP").setFiltro(true);
    set_retencion.getTab_seleccion().getColumna("DETALLE_TEIMP").setFiltro(true);
    set_retencion.setRadio();
    agregarComponente(set_retencion);
  }
  public void aceptarImpuesto() {
    System.out.println("entra a metodo aceptar impues");

    if (set_impuesto.isVisible()) {
      if (set_impuesto.getValorSeleccionado() != null) {
        tab_detalle_retencion.insertar();

        if (set_impuesto.getValorSeleccionado().equals(par_impuesto_iva)) {
          tab_detalle_retencion.setValor(
              "base_imponible_teder", tab_adq_factura.getValor("valor_iva_adfac"));
        } else if (set_impuesto.getValorSeleccionado().equals(par_impuesto_renta)) {
          tab_detalle_retencion.setValor(
              "base_imponible_teder", tab_adq_factura.getValor("subtotal_adfac"));
        }
        str_seleccionado = set_impuesto.getValorSeleccionado();
        System.out.println("probando que valor me llega" + str_seleccionado);
        set_retencion
            .getTab_seleccion()
            .setSql(ser_Tesoreria.getImpuesto("true", "0", str_seleccionado));
        set_retencion.getTab_seleccion().ejecutarSql();
        set_retencion.dibujar();
        set_impuesto.cerrar();

      } else {
        utilitario.agregarMensajeInfo("SELECCIONE OPCION", "Seleccione un registro");
      }

    } else if (set_retencion.isVisible()) {
      str_seleccionado = set_retencion.getValorSeleccionado();
      TablaGenerica tab_rentas =
          utilitario.consultar(ser_Tesoreria.getImpuestoCalculo(str_seleccionado));

      double dou_valor_impuesto = 0;
      double dou_porcentaje_calculo = 0;
      double dou_valor_resultado = 0;

      dou_porcentaje_calculo = Double.parseDouble(tab_rentas.getValor("porcentaje_teimp"));
      dou_valor_impuesto =
          Double.parseDouble(tab_detalle_retencion.getValor("base_imponible_teder"));
      dou_valor_resultado = (dou_porcentaje_calculo * dou_valor_impuesto) / 100;

      if (set_retencion.getValorSeleccionado() != null) {

        tab_detalle_retencion.setValor("ide_teimp", str_seleccionado);
        tab_detalle_retencion.setValor("valor_retenido_teder", dou_valor_resultado + "");
        String valorx = tab_detalle_retencion.getSumaColumna("valor_retenido_teder") + "";
        tab_retencion.setValor("total_ret_teret", valorx);
      }

      set_retencion.cerrar();
      utilitario.addUpdateTabla(
          tab_detalle_retencion, "valor_retenido_teder,base_imponible_teder,ide_teimp", "");
      utilitario.addUpdateTabla(tab_retencion, "total_ret_teret", "");
      calcularValorPago();
      utilitario.addUpdateTabla(tab_comprobante, "valor_pago_tecpo,", "");
    }
  }
Пример #14
0
  public pre_permisos() {
    Tabulador tab_tabulador = new Tabulador();
    tab_tabulador.setId("tab_tabulador");

    tab_tabla1.setId("tab_tabla1");
    tab_tabla1.setTabla("SIS_PERFIL", "IDE_PERF", 1);
    tab_tabla1.getColumna("activo_perf").setCheck();
    tab_tabla1.getColumna("perm_util_perf").setCheck();
    tab_tabla1.agregarRelacion(tab_tabla2);
    tab_tabla1.agregarRelacion(tab_tabla3);
    tab_tabla1.agregarRelacion(tab_tabla4);
    tab_tabla1.agregarRelacion(tab_tabla5);
    tab_tabla1.setRows(20);
    tab_tabla1.dibujar();
    PanelTabla pat_panel1 = new PanelTabla();
    pat_panel1.setPanelTabla(tab_tabla1);

    tab_tabla2.setId("tab_tabla2");
    tab_tabla2.setIdCompleto("tab_tabulador:tab_tabla2");
    tab_tabla2.setTabla("SIS_PERFIL_REPORTE", "IDE_PERE", 2);
    tab_tabla2.getColumna("IDE_REPO").setUnico(true);
    tab_tabla2.getColumna("IDE_PERF").setUnico(true);
    tab_tabla2
        .getColumna("IDE_REPO")
        .setCombo(
            "select repo.ide_repo,nom_repo,nom_opci from sis_reporte repo inner join sis_opcion opcion on repo.ide_opci=opcion.ide_opci order by nom_repo,nom_opci");
    tab_tabla2.getColumna("IDE_REPO").setAutoCompletar();
    tab_tabla2.setRows(20);
    tab_tabla2.dibujar();
    PanelTabla pat_panel2 = new PanelTabla();
    pat_panel2.setPanelTabla(tab_tabla2);

    tab_tabla3.setId("tab_tabla3");
    tab_tabla3.setIdCompleto("tab_tabulador:tab_tabla3");
    tab_tabla3.setTabla("SIS_PERFIL_OPCION", "IDE_PEOP", 3);
    tab_tabla3
        .getColumna("IDE_OPCI")
        .setCombo(
            "select a.ide_opci,a.NOM_OPCI,"
                + "( case when b.sis_ide_opci is null then 'PANTALLA' else 'MENU' end ) as nuevo "
                + "from SIS_OPCION a left join ( "
                + "select DISTINCT sis_ide_opci   from SIS_OPCION  where sis_ide_opci  in (  "
                + "select ide_opci from SIS_OPCION ) ) b on a.IDE_OPCI=b.SIS_IDE_OPCI order by a.NOM_OPCI");
    tab_tabla3.getColumna("LECTURA_PEOP").setCheck();
    tab_tabla3.getColumna("IDE_OPCI").setAutoCompletar();
    tab_tabla3.getColumna("IDE_OPCI").setUnico(true);
    tab_tabla3.getColumna("IDE_PERF").setUnico(true);
    tab_tabla3.setRows(20);
    tab_tabla3.dibujar();
    PanelTabla pat_panel3 = new PanelTabla();
    pat_panel3.setPanelTabla(tab_tabla3);

    tab_tabla4.setId("tab_tabla4");
    tab_tabla4.setIdCompleto("tab_tabulador:tab_tabla4");
    tab_tabla4.setTabla("SIS_PERFIL_OBJETO", "IDE_PEOB", 4);
    tab_tabla4
        .getColumna("IDE_OBOP")
        .setCombo(
            "SELECT IDE_OBOP,NOM_OBOP || ' '|| ID_OBOP,NOM_OPCI FROM SIS_OBJETO_OPCION,SIS_OPCION WHERE SIS_OPCION.IDE_OPCI = SIS_OBJETO_OPCION.IDE_OPCI ORDER BY NOM_OPCI,NOM_OBOP");
    tab_tabla4.getColumna("IDE_OBOP").setAutoCompletar();
    tab_tabla4.getColumna("VISIBLE_PEOB").setCheck();
    tab_tabla4.getColumna("LECTURA_PEOB").setCheck();
    tab_tabla4.getColumna("VISIBLE_PEOB").setValorDefecto("true");
    //   tab_tabla4.getColumna("IDE_PEOB").setUnico(true);
    //   tab_tabla4.getColumna("IDE_PERF").setUnico(true);
    tab_tabla4.setRows(20);
    tab_tabla4.dibujar();
    PanelTabla pat_panel4 = new PanelTabla();
    pat_panel4.setPanelTabla(tab_tabla4);

    tab_tabla5.setId("tab_tabla5");
    tab_tabla5.setIdCompleto("tab_tabulador:tab_tabla5");
    tab_tabla5.setTabla("SIS_PERFIL_CAMPO", "IDE_PECA", 5);
    tab_tabla5
        .getColumna("IDE_CAMP")
        .setCombo(
            "SELECT IDE_CAMP,NOM_CAMP,TABLA_TABL FROM SIS_CAMPO,SIS_TABLA WHERE SIS_CAMPO.IDE_TABL = SIS_TABLA.IDE_TABL ORDER BY TABLA_TABL,NOM_CAMP");
    tab_tabla5.getColumna("IDE_CAMP").setAutoCompletar();
    tab_tabla5.getColumna("VISIBLE_PECA").setValorDefecto("true");
    tab_tabla5.getColumna("VISIBLE_PECA").setCheck();
    tab_tabla5.getColumna("LECTURA_PECA").setCheck();
    tab_tabla5.getColumna("IDE_PERF").setUnico(true);
    tab_tabla5.getColumna("IDE_CAMP").setUnico(true);
    tab_tabla5.setRows(20);
    tab_tabla5.dibujar();
    PanelTabla pat_panel5 = new PanelTabla();
    pat_panel5.setPanelTabla(tab_tabla5);

    tab_tabulador.agregarTab("OPCIONES", pat_panel3);
    tab_tabulador.agregarTab("REPORTES", pat_panel2);
    tab_tabulador.agregarTab("OBJETOS COMPONENTES", pat_panel4);
    tab_tabulador.agregarTab("CAMPOS", pat_panel5);

    Division div_division = new Division();
    div_division.setId("div_division");
    div_division.dividir2(pat_panel1, tab_tabulador, "30%", "H");
    agregarComponente(div_division);

    bar_botones.agregarReporte();
    rep_reporte.setId("rep_reporte");
    rep_reporte.getBot_aceptar().setMetodo("aceptarReporte");
    agregarComponente(rep_reporte);

    sel_rep.setId("sel_rep");
    agregarComponente(sel_rep);

    set_perfiles.setId("set_perfiles");
    set_perfiles.setSeleccionTabla(
        "select IDE_PERF,upper(NOM_PERF) as Perfil,DESCRIPCION_PERF from SIS_PERFIL", "ide_perf");
    set_perfiles.getBot_aceptar().setMetodo("aceptarReporte");
    set_perfiles.setTitle("SELECCION DE PERFILES");
    agregarComponente(set_perfiles);
  }