Package org.jabusuite.article

Examples of org.jabusuite.article.ArticlePrice


         */
        public Object getValueAt(int column, int row) {
            if (row < getJbsObjects().size()) {
                Article article = (Article) getJbsObjects().get(row);
               
                ArticlePrice price = null;
                if ((column==3) || (column==4))
                    price = article.getPrice(Calendar.getInstance());
               
                //logger.debug(article.getUserNo());
                switch (column) {
                    case 0:
                        String userNo = "";
                        if (article.getUserNo() != null) {
                            userNo = article.getUserNo();
                        }
                        return userNo;
                    case 1:
                        String articleName = article.getShortText(ClientGlobals.getMainDbLanguage());
                        if (articleName == null) {
                            //TODO change!!
                            //articleName = "";
                            articleName = String.valueOf(row);
                           
                        }
                        return articleName;
                    case 2:
                        String matchCode = "";
                        if (article.getMatchCode() != null) {
                            matchCode = article.getMatchCode();
                        }
                        return matchCode;
                    case 3:
                        String sCostPrice = "";
                        if (price!=null)
                            sCostPrice = ClientGlobals.getPriceFormat().format(price.getCostPrice());
                        return sCostPrice;
                    case 4:
                        String sSalesPrice = "";
                        if (price!=null)
                            sSalesPrice = ClientGlobals.getPriceFormat().format(price.getSalesPrice());
                        return sSalesPrice;
                    default:
                        return "";
                }
            } else {
View Full Code Here


    }

    protected void setArticlePrices(Set<ArticlePrice> prices) {
        Iterator<ArticlePrice> it = prices.iterator();
        while (it.hasNext()) {
            ArticlePrice price = it.next();
            price.setArticle(this.getArticle());
        }
        this.getArticle().setPrices(prices);
    }
View Full Code Here

                this.sfSupplier.setSelectedSupplier((Supplier)this.getArticle().getSupplier());
            if (this.getArticle().getPrices() == null) {
                this.getArticle().setPrices(new LinkedHashSet<ArticlePrice>());
            }
            if (this.getArticle().getPrices().size() == 0) {
                ArticlePrice articlePrice = new ArticlePrice();
                articlePrice.setStdPrice(true);
                this.getArticle().getPrices().add(articlePrice);
            }
            this.priceEditor.setPrices(this.getArticle().getPrices());
            this.txLongText.setLangStrings(this.getArticleLongTexts());
            try {
View Full Code Here

        btnAddPrice.addActionListener(new ActionListener() {

            private static final long serialVersionUID = 1L;

            public void actionPerformed(ActionEvent arg0) {
                colPrices.addPriceRow(new ArticlePrice());
            }
        });
        colButtons.add(btnAddPrice);
        this.add(colButtons);
        this.setExpanded(true);
View Full Code Here

         */
        protected Set<ArticlePrice> getPrices() {
            Set<ArticlePrice> rowPrices = new LinkedHashSet<ArticlePrice>();
            for (int i = 0; i < this.getComponentCount(); i++) {
                if (this.getComponent(i) instanceof RowPrice) {
                    ArticlePrice price = ((RowPrice) this.getComponent(i)).getPrice();
                    price.setLastAction(new Timestamp(new Date().getTime()));
                    rowPrices.add(price);
                }
            }
            return rowPrices;
        }
View Full Code Here

TOP

Related Classes of org.jabusuite.article.ArticlePrice

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.