Пример #1
0
  /** Resets the init values from mem vars. <br> */
  private void doResetInitValues() {

    artNr.setValue(oldVar_artNr);
    artKurzbezeichnung.setValue(oldVar_artKurzbezeichnung);
    aupMenge.setValue(oldVar_aupMenge);
    aupEinzelwert.setValue(oldVar_aupEinzelwert);
    aupGesamtwert.setValue(oldVar_aupGesamtwert);
  }
Пример #2
0
  /**
   * Writes the bean data to the components.<br>
   *
   * @param anOrderposition Orderposition
   */
  public void doWriteBeanToComponents(Orderposition anOrderposition) {

    artNr.setValue(anOrderposition.getArticle().getArtNr());
    artKurzbezeichnung.setValue(anOrderposition.getArticle().getArtKurzbezeichnung());
    aupMenge.setValue(anOrderposition.getAupMenge());
    aupEinzelwert.setValue(anOrderposition.getAupEinzelwert());
    aupGesamtwert.setValue(anOrderposition.getAupGesamtwert());
  }
Пример #3
0
  /** Clears the components values. <br> */
  public void doClear() {

    // remove validation, if there are a save before
    doRemoveValidation();

    artNr.setValue("");
    artKurzbezeichnung.setValue("");
    bandbox_OrderPositionDialog_ArticleSearch.setValue("");
    aupMenge.setValue(new BigDecimal(0));
    aupEinzelwert.setValue(new BigDecimal(0));
    aupGesamtwert.setValue(new BigDecimal(0));
  }
Пример #4
0
  /**
   * when doubleClick on a item in the bandbox search list.<br>
   * <br>
   * Select the customer and search all orders for him.
   *
   * @param event
   */
  public void onDoubleClickedArticleItem(Event event) {
    // logger.debug(event.toString());

    // get the customer
    Listitem item = this.listBoxArticleSearch.getSelectedItem();
    if (item != null) {

      // get and cast the selected object
      setArticle((Article) item.getAttribute("data"));

      artNr.setValue(article.getArtNr());
      artKurzbezeichnung.setValue(article.getArtKurzbezeichnung());
      aupEinzelwert.setValue(article.getArtPreis());
    }

    // clear old stuff at end, because the NO EMPTY validation
    aupMenge.setValue(new BigDecimal(0));
    aupGesamtwert.setValue(new BigDecimal(0));

    // close the bandbox
    bandbox_OrderPositionDialog_ArticleSearch.close();
  }
Пример #5
0
  /** Calculates all necessary values new. */
  private void doCalculate() {

    if (!(aupMenge.getValue() == null) && !(aupEinzelwert.getValue() == null)) {
      if (!aupMenge.getValue().equals(new BigDecimal(0))
          && !aupEinzelwert.getValue().equals(new BigDecimal(0))) {

        BigDecimal count = aupMenge.getValue();
        BigDecimal singlePrice = aupEinzelwert.getValue();
        BigDecimal amount = count.multiply(singlePrice);

        aupGesamtwert.setValue(amount);
      }
    }
  }