public FacturasClientesBD(ObjectIO bdata) throws Exception {

    idclient = bdata.getStringValue("idclient");
    tpclient = bdata.getStringValue("tpclient");
    idemisor = bdata.getStringValue("idemisor");
    clientea = bdata.getStringValue("clientea");
  }
  public void process(ObjectIO input, ObjectIO output) {

    // Varibales de entrada
    String idemisor = "";
    String tpdocume = "";
    String iddocume = "";
    String filename = "";
    String tipofile = "";
    String directcl = "";
    Grid gdDocumen = null;

    // Varibales de salida

    String txmensaj = "";
    // Otras Variables

    try {

      idemisor = input.getStringValue("idemisor");
      tpdocume = input.getStringValue("tpdocume");
      iddocume = input.getStringValue("iddocume");

      if (tpdocume != null && tpdocume.equals("G")) { // FACTURAS;

        DetalleFacturasBDIn detalleFaBDIn = new DetalleFacturasBDIn();
        detalleFaBDIn.setValue("idfactur", iddocume);
        DetalleFacturasBD detalleFaBD = new DetalleFacturasBD(detalleFaBDIn);
        detalleFaBD.setConnection(con);
        gdDocumen = detalleFaBD.execSelect();
        filename = gdDocumen.getStringCell(0, "filecrea");
        tipofile = "FRA";

      } else { // CLOUD
        ListArchivosBDIn listCloudBDIn = new ListArchivosBDIn();
        listCloudBDIn.setValue("idemisor", idemisor);
        listCloudBDIn.setValue("idinodox", iddocume);
        ListArchivosBD updApuntesBD = new ListArchivosBD(listCloudBDIn);
        updApuntesBD.setConnection(con);
        gdDocumen = updApuntesBD.execSelect();
        filename = gdDocumen.getStringCell(0, "txnombre");
        directcl = gdDocumen.getStringCell(0, "filepath");
        tipofile = "CLO";
      }
      output.setValue("idemisor", idemisor);
      output.setValue("filecrea", filename);
      output.setValue("tipofile", tipofile);
      output.setValue("directcl", directcl);
      output.setValue("txmensaj", txmensaj);

    } catch (Exception e1) {
      e1.printStackTrace();
    }
  }
示例#3
0
  public void recuperaInput(ObjectIO input) {

    try {
      codvalue = input.getStringValue("codvalue");
      anchcdba = input.getFloatValue("anchcdba");
      altocdba = input.getFloatValue("altocdba");
      xposicio = input.getFloatValue("xposicio");
      yposicio = input.getFloatValue("yposicio");
      texto1xx = input.getStringValue("texto1xx");
      xpostex1 = input.getFloatValue("xpostex1");
      ypostex1 = input.getFloatValue("ypostex1");
      texto2xx = input.getStringValue("texto2xx");
      xpostex2 = input.getFloatValue("xpostex2");
      ypostex2 = input.getFloatValue("ypostex2");
      FRAparen.setConexion(this.getConnection());
    } catch (Exception e1) {
      System.err.println(this.getClass().getName() + "- ERROR - " + e1.getMessage());
      e1.printStackTrace();
    }
  }
示例#4
0
  public void process(ObjectIO input, ObjectIO output) {

    // Varibales de entrada
    String idemisor = null;

    try {
      idemisor = input.getStringValue("idemisor");

      output.setValue("idemisor", idemisor);
      output.setValue("txmensaj", "OK");

    } catch (Exception e1) {
      e1.printStackTrace();
    }
  }
示例#5
0
  public void process(ObjectIO input, ObjectIO output) throws Exception {

    // Varibales de entrada

    String idemisor = "";
    String txmarcax = "";
    String txmodelo = "";
    String fhcompra = "";
    String diviscmp = "";
    String pricecmp = "";
    String prusdcmp = "";
    String pricevnt = "";
    String divisvnt = "";
    String prusdvnt = "";
    String txprovid = "";
    String txbuyerx = "";
    String txfundin = "";
    String withboxx = "";
    String withusbx = "";
    String withchar = "";
    String withheph = "";
    String tipocone = "";
    String cdestado = "";
    String imeicode = "";
    String txmensaj = "";
    String idclient = "";
    String tpclient = "";

    try {
      idemisor = input.getStringValue("idemisor");
      tpclient = input.getStringValue("tpclient");
      idclient = input.getStringValue("idclient");

      txmarcax = input.getStringValue("txmarcax");
      txmodelo = input.getStringValue("txmodelo");
      fhcompra = input.getStringValue("fhcompra");
      diviscmp = input.getStringValue("diviscmp");
      pricecmp = input.getStringValue("pricecmp");
      prusdcmp = input.getStringValue("prusdcmp");
      pricevnt = input.getStringValue("pricevnt");
      divisvnt = input.getStringValue("divisvnt");
      prusdvnt = input.getStringValue("prusdvnt");
      txprovid = input.getStringValue("txprovid");
      txbuyerx = input.getStringValue("txbuyerx");
      txfundin = input.getStringValue("txfundin");
      withboxx = input.getStringValue("withboxx");
      withusbx = input.getStringValue("withusbx");
      withchar = input.getStringValue("withchar");
      withheph = input.getStringValue("withheph");
      tipocone = input.getStringValue("tipocone");
      cdestado = input.getStringValue("cdestado");
      imeicode = input.getStringValue("imeicode");

      fhcompra = fechaMySQL(fhcompra);

      // CORREGIR DIVISA EURO, NO LLEGA BIEN
      if (!diviscmp.equals("CHF") && !diviscmp.equals("RD$")) {
        diviscmp = "€";
      }

      if (!divisvnt.equals("CHF") && !divisvnt.equals("RD$")) {
        divisvnt = "€";
      }

      try {
        UpdStockBDIn insStockBDIn = new UpdStockBDIn();
        insStockBDIn.setValue("idemisor", idemisor);
        insStockBDIn.setValue("tpclient", tpclient);
        insStockBDIn.setValue("idclient", idclient);
        insStockBDIn.setValue("txmarcax", txmarcax);
        insStockBDIn.setValue("txmodelo", txmodelo);
        insStockBDIn.setValue("fhcompra", fhcompra);
        insStockBDIn.setValue("diviscmp", diviscmp);
        insStockBDIn.setValue("pricecmp", pricecmp);
        insStockBDIn.setValue("prusdcmp", prusdcmp);

        insStockBDIn.setValue("pricevnt", pricevnt);
        insStockBDIn.setValue("divisvnt", divisvnt);
        insStockBDIn.setValue("prusdvnt", prusdvnt);
        insStockBDIn.setValue("txprovid", txprovid);
        insStockBDIn.setValue("txbuyerx", txbuyerx);
        insStockBDIn.setValue("txfundin", txfundin);

        insStockBDIn.setValue("withboxx", withboxx);
        insStockBDIn.setValue("withusbx", withusbx);
        insStockBDIn.setValue("withheph", withheph);
        insStockBDIn.setValue("withchar", withchar);
        insStockBDIn.setValue("tipocone", tipocone);
        insStockBDIn.setValue("cdestado", cdestado);
        insStockBDIn.setValue("imeicode", imeicode);

        UpdStockBD insStockBD = new UpdStockBD(insStockBDIn);
        insStockBD.setConnection(con);

        int liInsert = insStockBD.execUpdate();

        if (liInsert == 1) {
          txmensaj = "Se han modificado las líneas en el stock correctamente.";
        } else {
          txmensaj = "Se ha producido un error al modificar la línea (" + liInsert + ")";
        }
      } catch (Exception ex) {
        System.out.println("Error al inssertar alguna linea " + ex.getMessage());
        txmensaj = "Se ha producido un error al insertar la línea";
      }

      // variables de salida
      output.setValue("txmensaj", txmensaj);
      output.setValue("idemisor", idemisor);

    } catch (Exception e1) {
      e1.printStackTrace();
    }
  }
示例#6
0
  public ListVendidoBD(ObjectIO bdata) throws Exception {

    idemisor = bdata.getStringValue("idemisor");
    cdestado = bdata.getStringValue("cdestado");
    idclient = bdata.getStringValue("idclient");
  }
示例#7
0
  public void process(ObjectIO input, ObjectIO output) throws Exception {

    // Varibales de entrada
    String idemisor = "";
    String tpclient = "";
    String idinvent = "";
    String imeicode = "";
    String nameinve = "";
    String tpproduc = "";
    Grid gridResu = null;

    // Varibales de salida
    String txmensaj = "";

    // Otras Variables
    String priceusd = "";
    String cotizusd = "";
    double fixinusd = 1;

    DecimalFormat formatDivi = new DecimalFormat("#####0.00");

    try {
      tpclient = input.getStringValue("tpclient");
      idemisor = input.getStringValue("idemisor");
      imeicode = input.getStringValue("idunicox");
      idinvent = input.getStringValue("idinvent");
      nameinve = input.getStringValue("nameinve");
      tpproduc = input.getStringValue("tpproduc");

      try {

        if (idinvent != null) {
          UpdInventBDIn delInvenBDIn = new UpdInventBDIn();
          delInvenBDIn.setValue("idinvent", idinvent);
          UpdInventBD delInvenBD = new UpdInventBD(delInvenBDIn);
          delInvenBD.setConnection(con);

          int liInsert = delInvenBD.execDelete();

          if (liInsert == 1) {
            txmensaj = "Se ha borrado la línea correctamente.";
          } else {
            txmensaj = "Se ha producido un error al borrar la línea (" + liInsert + ")";
          }

        } else {

          UpdInventBDIn insInvenBDIn = new UpdInventBDIn();
          insInvenBDIn.setValue("idemisor", idemisor);
          insInvenBDIn.setValue("cdestado", "N");
          insInvenBDIn.setValue("idunicox", imeicode);
          insInvenBDIn.setValue("tpclient", tpclient);
          insInvenBDIn.setValue("nameinve", nameinve);
          insInvenBDIn.setValue("tpproduc", tpproduc);

          UpdInventBD insInventBD = new UpdInventBD(insInvenBDIn);
          insInventBD.setConnection(con);

          int liInsert = insInventBD.execInsert();

          if (liInsert == 1) {
            txmensaj = "Se ha insertado la línea correctamente.";
          } else {
            txmensaj = "Se ha producido un error al insertar la línea (" + liInsert + ")";
          }
        }

      } catch (Exception e) {
        e.printStackTrace();
      }

      UpdInventBDIn inventBDIn = new UpdInventBDIn();
      inventBDIn.setValue("idemisor", idemisor);
      inventBDIn.setValue("cdestado", "N");
      inventBDIn.setValue("nameinve", nameinve);
      UpdInventBD lineasBD = new UpdInventBD(inventBDIn);
      lineasBD.setConnection(con);
      gridResu = lineasBD.execSelect();

      // variables de salida
      output.setValue("txmensaj", txmensaj);
      output.setValue("idemisor", idemisor);
      output.setValue("nameinve", nameinve);
      output.setGrid("gridLine", gridResu);

    } catch (Exception e1) {
      e1.printStackTrace();
    }
  }