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);
  }
Ejemplo n.º 2
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);
  }