Exemplo n.º 1
0
 private void modifyThis() {
   this.restoreDefaults();
   this.LabelSifra.setCaption(Aut.getAut().getIzlazCARTdep("Šifra", "Oznaka", "Barcode"));
   this.resizeElement(this.LabelSifra, Aut.getAut().getIzlazCARTwidth(), this.LabelNaziv_artikla);
   String komText =
       frmParam.getParam(
           "robno",
           "komText",
           "Kom",
           "Tekst za ispisati na mjestu dodatne kolièine na dostavnici");
   LabelKom.setCaption(komText);
 }
Exemplo n.º 2
0
  private String getUpit() {
    String selStr =
        "select artikli.cart, artikli.cart1, artikli.bc, artikli.nazart, doki.cpar, doki.datdok, stdoki.kol, stdoki.jm, stdoki.IPRODSP ";

    //    if (fieldSet.getString("SLJED").equalsIgnoreCase("RUC")){
    //      selStr += "(stdoki.iprodbp-stdoki.inab) as ruc ";
    //    } else if (fieldSet.getString("SLJED").equalsIgnoreCase("POR")){
    //      selStr += "(stdoki.iprodsp - stdoki.iprodbp) as por ";
    //    } else {
    //      selStr += "stdoki.IPRODSP ";
    //    }

    String inq;
    StorageDataSet corgs =
        hr.restart.zapod.OrgStr.getOrgStr().getOrgstrAndKnjig(fieldSet.getString("CORG"));
    if (corgs.rowCount() == 0) inq = "1=1";
    else if (corgs.rowCount() == 1) inq = "DOKI.CSKL = '" + fieldSet.getString("CORG") + "'";
    else
      inq =
          "(DOKI.CSKL in "
              + hr.restart.zapod.OrgStr.getOrgStr().getInQuery(corgs, "DOKI.CSKL")
              + ") ";
    hr.restart.baza.Condition oj = hr.restart.baza.Condition.in("DOKI.VRDOK", TypeDoc.araj_docsOJ);
    String exInClude =
        "AND (("
            + oj
            + " AND "
            + inq
            + ") OR ("
            + oj.not()
            + " AND DOKI.CSKL = '"
            + getCskl()
            + "')) ";

    String artikliFilter;

    if (fieldSet.getString("VRART").equals("") || fieldSet.getString("VRART").equals("X"))
      artikliFilter = "";
    else artikliFilter = " AND ARTIKLI.VRART='" + fieldSet.getString("VRART") + "' ";

    String carting = "";
    if (!rpcart.findCART(podgrupe).equals("")) {
      carting = " AND " + rpcart.findCART(podgrupe);
    }

    String ckupca = "";

    if (!getCkup().equals("")) ckupca = "and doki.cpar='" + getCkup() + "' ";

    selStr +=
        " from doki,stdoki,artikli,partneri WHERE doki.cskl = stdoki.cskl AND doki.vrdok = stdoki.vrdok AND doki.god = stdoki.god "
            + "AND doki.brdok = stdoki.brdok AND stdoki.cart = artikli.cart AND doki.cpar = partneri.cpar and doki.god='"
            + hr.restart.robno.Aut.getAut().getKnjigodRobno()
            + "' AND doki.vrdok not in ('PON','NDO','NKU','RNL','REV','PRV','OTR','INM','INV','IZD','TRE','ZAH') "
            + exInClude
            + ckupca
            + artikliFilter
            + carting
            + " order by datdok";

    // REMARK!!
    // nešto što sam primjetio, a moglo bi dobro doæi kad se bude implementirao nabavljaè je da
    // postoji i CPAR kolona u tablici artikli
    // i predstavlja dobavljaèa za taj artikl.

    //    System.out.println("\n\n"+selStr+"\n\n");

    return selStr;
  }
Exemplo n.º 3
0
  private void jbInit() throws Exception {
    int dw = Aut.getAut().getNumber(frmParam.getParam("sisfun", "datumHoriz"));
    int dh = Aut.getAut().getNumber(frmParam.getParam("sisfun", "datumVert"));
    br = new Rectangle();
    jp = new JPanel();
    month = new MonthPanel[12];
    setYear(-1);
    columns = Math.max(1, Math.min(4, dw));
    dh = Math.max(1, Math.min(4, dh));
    if (columns == 4 && dh == 4) dh = 3;

    jp.setPreferredSize(
        new Dimension(
            month[0].getPreferredSize().width + 10,
            (month[0].getPreferredSize().height + 5) * jp.getComponentCount() + 5));

    v =
        new JraScrollPane(
            JraScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JraScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    v.getViewport()
        .setMinimumSize(
            new Dimension(
                month[0].getPreferredSize().width + 10, month[0].getPreferredSize().height + 10));
    v.getViewport().setPreferredSize(v.getViewport().getMinimumSize());
    v.setViewportView(jp);

    Dimension ps = v.getViewport().getMinimumSize();
    Dimension ns = new Dimension(columns * (ps.width - 5) + 5, dh * (ps.height - 5) + 5);

    setPreferredPanelSize();
    v.getViewport().setPreferredSize(ns);

    v.addComponentListener(
        new ComponentAdapter() {
          public void componentResized(ComponentEvent e) {
            ensureProperViewSize();
          }
        });

    jp.addMouseListener(
        new MouseAdapter() {
          public void mouseClicked(MouseEvent e) {
            // System.out.println("mouseclick "+e);
            if ((e.getModifiers() & e.BUTTON1_MASK) != 0) mouseClick(e);
          }

          public void mousePressed(MouseEvent e) {
            // System.out.println("mousepress "+e);
            if ((e.getModifiers() & e.BUTTON1_MASK) != 0) mousePress(e);
            if (e.getModifiers() == e.BUTTON3_MASK) {
              if (scroll) {
                scroll = false;
                scroller.stop();
              }
              setSelection(null, null);
              jp.repaint();
            }
          }

          public void mouseReleased(MouseEvent e) {
            if ((e.getModifiers() & e.BUTTON1_MASK) != 0) {
              if (scroll) {
                scroll = false;
                scroller.stop();
              }
              if (first != null && last != null) setResultRange();
            }
          }
        });
    jp.addMouseMotionListener(
        new MouseMotionAdapter() {
          public void mouseDragged(MouseEvent e) {
            if ((e.getModifiers() & e.BUTTON1_MASK) != 0) mouseDrag(e);
          }
        });
    scroller =
        new javax.swing.Timer(
            30,
            new ActionListener() {
              public void actionPerformed(ActionEvent e) {
                if (scroll && speed != 0) scrollView();
              }
            });
  }
Exemplo n.º 4
0
 private void modifyThis() {
   LabelSifra.setCaption(Aut.getAut().getIzlazCARTdep("Šifra", "Oznaka", "Barcode"));
   resizeElement(this.LabelSifra, Aut.getAut().getIzlazCARTwidth(), this.LabelNaziv);
 }