Example #1
0
  // generara transacciones contables
  public void generarTransacciones() {
    double dou_valor_debe = 0;
    double dou_valor_haber = 0;
    String str_tipo_concepto = null;
    System.out.println("entre a fromar " + tab_movimiento.getValor("ide_comov"));
    if (com_anio.getValue() == null) {
      utilitario.agregarMensajeError("No se puede insertar", "Debe Seleccionar un Año");
      return;
    }
    if (tab_movimiento.getValor("ide_comov") == null) {
      utilitario.agregarMensajeError(
          "No se puede insertar", "Debe Guardaruna Cabecera de Movimiento Contable");
      return;
    }

    // if(com_tipo_concepto.getValue().toString()!=null){
    // str_tipo_concepto=com_tipo_concepto.getValue().toString();
    // }

    if (dia_movimientos.isVisible()) {

      tab_detalle_movimiento.insertar();
      if (com_lugar_aplica.getValue().equals(p_debe)) {
        dou_valor_debe = Double.parseDouble(txt_valor.getValue().toString());
      }
      if (com_lugar_aplica.getValue().equals(p_haber)) {
        dou_valor_haber = Double.parseDouble(txt_valor.getValue().toString());
      }

      tab_detalle_movimiento.setValor("ide_gelua", com_lugar_aplica.getValue().toString());
      tab_detalle_movimiento.setValor("debe_codem", dou_valor_debe + "");
      tab_detalle_movimiento.setValor("haber_codem", dou_valor_haber + "");
      tab_detalle_movimiento.setValor("ide_cocac", aut_catalogo.getValor());
      tab_detalle_movimiento.setValor("ide_tepro", aut_proveedor.getValor());
      tab_detalle_movimiento.setValor("ide_tetic", com_tipo_concepto.getValue() + "");
      tab_detalle_movimiento.setValor("ide_comov", tab_movimiento.getValor("ide_comov"));
      tab_detalle_movimiento.setValor(
          "transferencia_codem", chk_transferencia.getValue().toString());

      tab_detalle_movimiento.guardar();
      tab_detalle_movimiento.sumarColumnas();
      utilitario.addUpdate("tab_detalle_movimiento");

    } else {
      dia_movimientos.dibujar();
    }
  }
Example #2
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");
        }
      }
    }
  }