Beispiel #1
0
  public BigDecimal iznosTroskovaUsluge(String cradnal, int rbsrn) {

    BigDecimal suma = Aus.zero2;
    QueryDataSet rns =
        Rnser.getDataModule().getTempSet("cradnal='" + cradnal + "' and rbsid=" + rbsrn);
    rns.open();
    for (rns.first(); rns.inBounds(); rns.next()) {
      suma = suma.add(rns.getBigDecimal("VRI"));
    }

    if (rns.rowCount() == 0) {
      String selectRN =
          "select cart,kol from stdoki where cradnal = '"
              + cradnal
              + "' and vrdok='RNL' and rbsid="
              + rbsrn;
      QueryDataSet radninalog = hr.restart.util.Util.getNewQueryDataSet(selectRN, true);
      QueryDataSet normativUs =
          Aut.getAut().expandArt(radninalog.getInt("CART"), radninalog.getBigDecimal("KOL"), false);

      for (normativUs.first(); normativUs.inBounds(); normativUs.next()) {
        if (raVart.isUsluga(normativUs.getInt("CART"))) {
          // Aut.getAut().artTipa(normativUs.getInt("CART"),"U")) {
          suma =
              suma.add(dm.getArtikli().getBigDecimal("NC"))
                  .multiply(normativUs.getBigDecimal("KOL"));
        }
      }
    }

    return suma;
  }
 public String getNSPRAVOSOB() {
   String nspo = "";
   if (lookupData
       .getlookupData()
       .raLocate(dm.getOrgstruktura(), "CORG", hr.restart.zapod.OrgStr.getKNJCORG())) {
     nspo =
         dm.getOrgstruktura().getString("NAZIV")
             + ", "
             + dm.getOrgstruktura().getString("ADRESA")
             + ", "
             + dm.getOrgstruktura().getString("HPBROJ")
             + " "
             + dm.getOrgstruktura().getString("MJESTO");
   } else nspo = rpm.getFirstLine() + " " + rpm.getSecondLine() + ", " + rpm.getThirdLine();
   return nspo;
 }
  public String getPRODAVAONICA() {
    String pj = "";

    if (lookupData
        .getlookupData()
        .raLocate(
            dm.getSklad(),
            "CSKL",
            ds.getString(
                "CSKL"))) { // lookupData.getlookupData().raLocate(dm.getOrgstruktura(),"CORG",dm.getSklad().getString("CORG"))){
      pj = /*dm.getOrgstruktura().getString("NAZIV") + ", " +
           dm.getOrgstruktura().getString("ADRESA") + ", " +
           dm.getOrgstruktura().getString("HPBROJ") + " " +
           dm.getOrgstruktura().getString("MJESTO");*/ dm.getSklad().getString("NAZSKL");
    }
    return pj;
  }
Beispiel #4
0
  private void jbInit() throws Exception {
    this.setRaQueryDataSet(dm.getKamUpl());
    this.setVisibleCols(new int[] {2, 4, 5});
    jpDetail = new jpKamateUpl(this);
    this.setRaDetailPanel(jpDetail);
    this.jpDetail.BindComponents(dm.getKamUpl());

    pres = new presKamate();
    pres.setOwner(this);

    this.addOption(
        new raNavAction("Predselekcija", raImages.IMGZOOM, KeyEvent.VK_F12) {
          public void actionPerformed(ActionEvent e) {
            pres.showPreselect(frmKamateUpl.this, "Uplate kupca ili dobavlja\u010Du");
          }
        },
        4,
        false);
  }
Beispiel #5
0
  private void jbInit() throws Exception {
    jpDetail.setLayout(lay);
    lay.setWidth(546);
    lay.setHeight(200);

    jlAdr.setText("Adresa");
    jlFax.setText("Tel/fax/e-mail");
    jlKol.setText("Kolièine");
    jlNaziv.setText("Naziv");
    jlPar.setText("Partner");
    jraAdr.setColumnName("ADR");
    jraEmadr.setColumnName("EMADR");
    jraFax.setColumnName("TEL");
    jraKol.setColumnName("KOL");
    jraMj.setColumnName("MJ");
    jraNaziv.setColumnName("NAZIV");
    jraPbr.setColumnName("PBR");
    jraTelfax.setColumnName("TELFAX");

    jlrCpar.setColumnName("CPAR");
    jlrCpar.setColNames(new String[] {"NAZPAR"});
    jlrCpar.setTextFields(new JTextComponent[] {jlrNazpar});
    jlrCpar.setVisCols(new int[] {0, 1});
    jlrCpar.setSearchMode(0);
    jlrCpar.setRaDataSet(dm.getPartneri());
    jlrCpar.setNavButton(jbSelCpar);

    jlrNazpar.setColumnName("NAZPAR");
    jlrNazpar.setNavProperties(jlrCpar);
    jlrNazpar.setSearchMode(1);

    //	***************
    jpDetail.add(jbSelCpar, new XYConstraints(510, 20, 21, 21));
    jpDetail.add(jlAdr, new XYConstraints(15, 95, -1, -1));
    jpDetail.add(jlFax, new XYConstraints(15, 120, -1, -1));
    jpDetail.add(jlKol, new XYConstraints(15, 150, -1, -1));
    jpDetail.add(jlNaziv, new XYConstraints(15, 70, -1, -1));
    jpDetail.add(jlPar, new XYConstraints(15, 20, -1, -1));
    jpDetail.add(jlrCpar, new XYConstraints(150, 20, 75, -1));
    jpDetail.add(jlrNazpar, new XYConstraints(230, 20, 275, -1));
    jpDetail.add(jraAdr, new XYConstraints(150, 95, 200, -1));
    jpDetail.add(jraEmadr, new XYConstraints(360, 120, 145, -1));
    jpDetail.add(jraFax, new XYConstraints(150, 120, 100, -1));
    jpDetail.add(jraKol, new XYConstraints(150, 150, 85, -1));
    jpDetail.add(jraMj, new XYConstraints(410, 95, 95, -1));
    jpDetail.add(jraNaziv, new XYConstraints(150, 70, 355, -1));
    jpDetail.add(jraPbr, new XYConstraints(355, 95, 50, -1));
    jpDetail.add(jraTelfax, new XYConstraints(255, 120, 100, -1));

    BindComponents(fdl.getDetailSet());

    this.add(jpDetail, BorderLayout.CENTER);
  }
Beispiel #6
0
  public void prepareVtPred(String cradnal, int rbsrn, boolean single) {
    sds = new StorageDataSet();
    sds.setColumns(dm.getVTPred().cloneColumns());
    sds.open();
    sds.insertRow(false);
    initParams();
    QueryDataSet materijal = selectIzdatnice(cradnal, rbsrn, single);
    for (materijal.first(); materijal.inBounds(); materijal.next()) {
      if (ld.raLocate(dm.getSklad(), "CSKL", materijal.getString("CSKL"))) {
        if (dm.getSklad().getString("TIPSKL").equalsIgnoreCase("M")) {
          sds.setBigDecimal(
              "MAT_I", sds.getBigDecimal("MAT_I").add(materijal.getBigDecimal("IRAZ")));

        } else if (dm.getSklad().getString("TIPSKL").equalsIgnoreCase("P")) {
          sds.setBigDecimal(
              "PRO_I", sds.getBigDecimal("PRO_I").add(materijal.getBigDecimal("IRAZ")));
        } else if (dm.getSklad().getString("TIPSKL").equalsIgnoreCase("R")) {
          sds.setBigDecimal(
              "ROB_I", sds.getBigDecimal("ROB_I").add(materijal.getBigDecimal("IRAZ")));
        } else if (dm.getSklad().getString("TIPSKL").equalsIgnoreCase("L")) {
          sds.setBigDecimal(
              "POL_I", sds.getBigDecimal("POL_I").add(materijal.getBigDecimal("IRAZ")));
        }
      } else {
        throw new RuntimeException(
            "Skladište " + materijal.getString("CSKL") + " nisam uspio pronaæi sa raLocate !!! ");
      }
    }
    sds.setBigDecimal("USL_I", iznosTroskovaUsluge(cradnal, rbsrn));
    faktorizacija();
  }
 public String getPOSLGOD() {
   String pg = "";
   lookupData.getlookupData().raLocate(dm.getSklad(), "CSKL", ds.getString("CSKL"));
   pg = dm.getSklad().getString("GODINA");
   return pg;
 }