• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ProductInfoExt类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.openbravo.pos.ticket.ProductInfoExt的典型用法代码示例。如果您正苦于以下问题:Java ProductInfoExt类的具体用法?Java ProductInfoExt怎么用?Java ProductInfoExt使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ProductInfoExt类属于com.openbravo.pos.ticket包,在下文中一共展示了ProductInfoExt类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: execute

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
/**
 * This is the action called from the Struts framework.
 * @param mapping The ActionMapping used to select this instance.
 * @param form The optional ActionForm bean for this request.
 * @param request The HTTP Request we are processing.
 * @param response The HTTP Response we are processing.
 * @throws java.lang.Exception
 * @return
 */
public ActionForward execute(ActionMapping mapping, ActionForm form,
        HttpServletRequest request, HttpServletResponse response)
        throws Exception {

    DynaActionForm inputFormPlace = (DynaActionForm) form;
    RestaurantManager manager = new RestaurantManager();
    List products = new ArrayList<ProductInfoExt>();
    products = manager.findProductsByCategory((String) inputFormPlace.get("categoryId"));
    List rates = new ArrayList<String>();
    rates = manager.findAllTaxRatesByCategory(products);
    request.getSession().setAttribute("products", products);
    request.getSession().setAttribute("rates", rates);
    if (inputFormPlace.get("mode").equals("1")) {
        request.setAttribute("subcategories", manager.findAllSubcategories(inputFormPlace.getString("categoryId")));
        return mapping.findForward(NEXTLEVEL);
    }
    request.setAttribute("subcategories", manager.findAllSubcategories(inputFormPlace.getString("categoryId")));

    return mapping.findForward(SUCCESS);

}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:31,代码来源:ProductAjaxAction.java


示例2: incProductByCode

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
private void incProductByCode(String sCode) {
// precondicion: sCode != null
    
    try {
        ProductInfoExt oProduct = dlSales.getProductInfoByCode(sCode);
        if (oProduct == null) {                  
            Toolkit.getDefaultToolkit().beep();                   
            new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.noproduct")).show(this);           
            stateToZero();
        } else {
            // Se anade directamente una unidad con el precio y todo
            incProduct(oProduct);
        }
    } catch (BasicException eData) {
        stateToZero();           
        new MessageInf(eData).show(this);           
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:19,代码来源:JPanelTicket.java


示例3: incProductByCodePrice

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
private void incProductByCodePrice(String sCode, double dPriceSell) {
// precondicion: sCode != null
    
    try {
        ProductInfoExt oProduct = dlSales.getProductInfoByCode(sCode);
        if (oProduct == null) {                  
            Toolkit.getDefaultToolkit().beep();                   
            new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.noproduct")).show(this);           
            stateToZero();
        } else {
            // Se anade directamente una unidad con el precio y todo
            if (m_jaddtax.isSelected()) {
                // debemos quitarle los impuestos ya que el precio es con iva incluido...
                TaxInfo tax = taxeslogic.getTaxInfo(oProduct.getTaxCategoryID(),  m_oTicket.getDate(), m_oTicket.getCustomer());
                addTicketLine(oProduct, 1.0, dPriceSell / (1.0 + tax.getRate()));
            } else {
                addTicketLine(oProduct, 1.0, dPriceSell);
            }                
        }
    } catch (BasicException eData) {
        stateToZero();
        new MessageInf(eData).show(this);               
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:25,代码来源:JPanelTicket.java


示例4: incProduct

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
private void incProduct(ProductInfoExt prod) {
    
    if (prod.isScale() && m_App.getDeviceScale().existsScale()) {
        try {
            Double value = m_App.getDeviceScale().readWeight();
            if (value != null) {
                incProduct(value.doubleValue(), prod);
            }
        } catch (ScaleException e) {
            Toolkit.getDefaultToolkit().beep();                
            new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.noweight"), e).show(this);           
            stateToZero(); 
        }
    } else {
        // No es un producto que se pese o no hay balanza
        incProduct(1.0, prod);
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:19,代码来源:JPanelTicket.java


示例5: assignProductByCode

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
private void assignProductByCode() {
    try {
        ProductInfoExt oProduct = m_dlSales.getProductInfoByCode(m_jcodebar.getText());
        if (oProduct == null) {       
            assignProduct(null);
            Toolkit.getDefaultToolkit().beep();                   
        } else {
            // Se anade directamente una unidad con el precio y todo
            assignProduct(oProduct);
        }
    } catch (BasicException eData) {        
        assignProduct(null);
        MessageInf msg = new MessageInf(eData);
        msg.show(this);            
    }        
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:17,代码来源:StockDiaryEditor.java


示例6: assignProductByReference

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
private void assignProductByReference() {
    try {
        ProductInfoExt oProduct = m_dlSales.getProductInfoByReference(m_jreference.getText());
        if (oProduct == null) {       
            assignProduct(null);
            Toolkit.getDefaultToolkit().beep();                   
        } else {
            // Se anade directamente una unidad con el precio y todo
            assignProduct(oProduct);
        }
    } catch (BasicException eData) {        
        assignProduct(null);
        MessageInf msg = new MessageInf(eData);
        msg.show(this);            
    }        
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:17,代码来源:StockDiaryEditor.java


示例7: assignProduct

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
private void assignProduct(ProductInfoExt prod) {

        if (m_jSearch.isEnabled()) {
            if (prod == null) {
                product2 = null;
                m_jReference.setText(null);
                m_jBarcode.setText(null);
                m_jProduct.setText(null);
                name = null;
            } else {
                product2 = prod.getID();
                m_jReference.setText(prod.getReference());
                m_jBarcode.setText(prod.getCode());
                m_jProduct.setText(prod.getReference() + " - " + prod.getName());
                name = prod.getName();
            }
        }

    }
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:20,代码来源:AuxiliarEditor.java


示例8: incProductByCode

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
private void incProductByCode(String sCode, double dQuantity) {
// precondicion: sCode != null
    
    try {
        ProductInfoExt oProduct = m_dlSales.getProductInfoByCode(sCode);
        if (oProduct == null) {                  
            Toolkit.getDefaultToolkit().beep();                   
        } else {
            // Se anade directamente una unidad con el precio y todo
            incProduct(oProduct, dQuantity);
        }
    } catch (BasicException eData) {       
        MessageInf msg = new MessageInf(eData);
        msg.show(this);            
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:17,代码来源:StockManagement.java


示例9: updateRecord

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
/**
 * Updated the record in the database with the new prices and category if
 * needed.
 *
 * @param pID Unique product id of the record to be updated It then creates
 * an updated record for the product, subject to the prices be different
 *
 */
private void updateRecord(String pID) {
    prodInfo = new ProductInfoExt();
    try {
        prodInfo = m_dlSales.getProductInfo(pID);
        dOriginalRate = taxeslogic.getTaxRate(prodInfo.getTaxCategoryID());
        dCategory = (String) cat_list.get(prodInfo.getCategoryID());
        oldBuyPrice = prodInfo.getPriceBuy();
        oldSellPrice = prodInfo.getPriceSell();
        productSellPrice *= (1 + dOriginalRate);
        if ((oldBuyPrice != productBuyPrice) || (oldSellPrice != productSellPrice)) {
            createCSVEntry("Updated Price Details", oldBuyPrice, oldSellPrice * (1 + dOriginalRate));
            createProduct("update");
            priceUpdates++;
        } else {
            noChanges++;
        }
    } catch (BasicException ex) {
        Logger.getLogger(JPanelCSVImport.class.getName()).log(Level.SEVERE, null, ex);
    }
}
 
开发者ID:herbiehp,项目名称:unicenta,代码行数:29,代码来源:JPanelCSVImport.java


示例10: incProductByCode

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
private void incProductByCode(String sCode) {
    // precondicion: sCode != null
        try {
            ProductInfoExt oProduct = dlSales.getProductInfoByCode(sCode);
            if (oProduct == null) {                  
                Toolkit.getDefaultToolkit().beep();                   
// JG Aug 2014 - MessageInf Type inappropriate
//                new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.noproduct")).show(this);           
                JOptionPane.showMessageDialog(null,
                   sCode + " - " + AppLocal.getIntString("message.noproduct"),"Check", JOptionPane.WARNING_MESSAGE);                
                stateToZero();
            } else {
                // Se anade directamente una unidad con el precio y todo
                incProduct(oProduct);
            }
        } catch (BasicException eData) {
            stateToZero();           
            new MessageInf(eData).show(this);           
        }
    }
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:21,代码来源:JPanelTicket.java


示例11: incProductByCodePrice

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
private void incProductByCodePrice(String sCode, double dPriceSell) {
// precondicion: sCode != null
    try {
        ProductInfoExt oProduct = dlSales.getProductInfoByCode(sCode);
        if (oProduct == null) {                  
            Toolkit.getDefaultToolkit().beep();                   
            new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.noproduct")).show(this);           
            stateToZero();
        } else {
            // Se anade directamente una unidad con el precio y todo
            if (m_jaddtax.isSelected()) {
                // debemos quitarle los impuestos ya que el precio es con iva incluido...
                TaxInfo tax = taxeslogic.getTaxInfo(oProduct.getTaxCategoryID(), m_oTicket.getCustomer());
                addTicketLine(oProduct, 1.0, dPriceSell / (1.0 + tax.getRate()));
            } else {
                addTicketLine(oProduct, 1.0, dPriceSell);
            }                
        }
    } catch (BasicException eData) {
        stateToZero();
        new MessageInf(eData).show(this);               
    }
}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:24,代码来源:JPanelTicket.java


示例12: incProduct

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
private void incProduct(ProductInfoExt prod) {

        if (prod.isScale() && m_App.getDeviceScale().existsScale()) {
            try {
                Double value = m_App.getDeviceScale().readWeight();
                if (value != null) {
                    incProduct(value, prod);
                }
            } catch (ScaleException e) {
                Toolkit.getDefaultToolkit().beep();                
                    new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.noweight"), e).show(this);           
                stateToZero(); 
            }
        } else {
            
        // Amended JG uniCenta Apr 14 Variable Price Product - Thanks Ron Isaacson
        // if variable price product, and no amount entered before product pressed, ensure that the multiplier is 0 so no item is added to the ticket           
        if (!prod.isVprice()){
               incProduct(1.0, prod);          
        } else {
                Toolkit.getDefaultToolkit().beep();                
                JOptionPane.showMessageDialog(null, 
                AppLocal.getIntString("message.novprice"));
                }
            }
         }
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:27,代码来源:JPanelTicket.java


示例13: execute

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
/**
 * This is the action called from the Struts framework.
 * @param mapping The ActionMapping used to select this instance.
 * @param form The optional ActionForm bean for this request.
 * @param request The HTTP Request we are processing.
 * @param response The HTTP Response we are processing.
 * @throws java.lang.Exception
 * @return
 */
public ActionForward execute(ActionMapping mapping, ActionForm form,
        HttpServletRequest request, HttpServletResponse response)
        throws Exception {

    FloorForm floorForm = (FloorForm) form;
    RestaurantManager manager = new RestaurantManager();
    String floorId = (String) floorForm.getFloorId();
    String place = (String) floorForm.getId();
    String str = (String) floorForm.getMode();
    String[] array = floorForm.getParameters();
    List<TicketLineInfo> linesList = new ArrayList<TicketLineInfo>();
    List products = new ArrayList<ProductInfoExt>();
    TicketInfo ticket = manager.findTicket(place);
    linesList = ticket.getM_aLines();
    if (array != null) {
        for (int i = 0; i < array.length; i++) {
            linesList.get(Integer.valueOf(array[i]) - 0).setMultiply(linesList.get(Integer.valueOf(array[i]) - 0).getMultiply() + 1);    //strange
        }
    }
    manager.updateLineFromTicket(floorForm.getId(), ticket);
    for (Object line : linesList) {
        TicketLineInfo li = (TicketLineInfo) line;
        products.add(manager.findProductById(li.getProductid()));
    }


    request.setAttribute("floorName", manager.findFloorById(manager.findPlaceById(place).getFloor()).getName());
    request.setAttribute("place", place);

    request.setAttribute("placeName", manager.findPlaceNameById(place));
    request.setAttribute("floorId", floorId);
    request.setAttribute("lines", linesList);
    request.setAttribute("products", products);
    request.setAttribute("total", manager.getTotalOfaTicket(place));

    return mapping.findForward(SUCCESS);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:47,代码来源:ModifyProductAction.java


示例14: getInputProduct

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
private ProductInfoExt getInputProduct() {
    ProductInfoExt oProduct = new ProductInfoExt(); // Es un ticket
    oProduct.setReference(null);
    oProduct.setCode(null);
    oProduct.setName("");
    oProduct.setTaxCategoryID(((TaxCategoryInfo) taxcategoriesmodel.getSelectedItem()).getID());
    
    oProduct.setPriceSell(includeTaxes(oProduct.getTaxCategoryID(), getInputValue()));
    
    return oProduct;
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:12,代码来源:JPanelTicket.java


示例15: buttonTransition

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
protected void buttonTransition(ProductInfoExt prod) {
// precondicion: prod != null
    
     if (m_iNumberStatusInput == NUMBERZERO && m_iNumberStatusPor == NUMBERZERO) {
        incProduct(prod);
    } else if (m_iNumberStatusInput == NUMBERVALID && m_iNumberStatusPor == NUMBERZERO) {
        incProduct(getInputValue(), prod);
    } else {
        Toolkit.getDefaultToolkit().beep();
    }       
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:12,代码来源:JPanelTicket.java


示例16: m_jListActionPerformed

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
private void m_jListActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jListActionPerformed

        ProductInfoExt prod = JProductFinder.showMessage(JPanelTicket.this, dlSales);    
        if (prod != null) {
            buttonTransition(prod);
        }
        
    }
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:9,代码来源:JPanelTicket.java


示例17: getProductInfo

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
public final ProductInfoExt getProductInfo(String id) throws BasicException {
    return (ProductInfoExt) new PreparedSentence(s
        , "SELECT ID, REFERENCE, CODE, NAME, ISCOM, ISSCALE, PRICEBUY, PRICESELL, TAXCAT, CATEGORY, ATTRIBUTESET_ID, IMAGE, ATTRIBUTES " +
          "FROM PRODUCTS WHERE ID = ?"
        , SerializerWriteString.INSTANCE
        , ProductInfoExt.getSerializerRead()).find(id);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:8,代码来源:DataLogicSales.java


示例18: getProductInfoByCode

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
public final ProductInfoExt getProductInfoByCode(String sCode) throws BasicException {
    return (ProductInfoExt) new PreparedSentence(s
        , "SELECT ID, REFERENCE, CODE, NAME, ISCOM, ISSCALE, PRICEBUY, PRICESELL, TAXCAT, CATEGORY, ATTRIBUTESET_ID, IMAGE, ATTRIBUTES " +
          "FROM PRODUCTS WHERE CODE = ?"
        , SerializerWriteString.INSTANCE
        , ProductInfoExt.getSerializerRead()).find(sCode);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:8,代码来源:DataLogicSales.java


示例19: getProductInfoByReference

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
public final ProductInfoExt getProductInfoByReference(String sReference) throws BasicException {
    return (ProductInfoExt) new PreparedSentence(s
        , "SELECT ID, REFERENCE, CODE, NAME, ISCOM, ISSCALE, PRICEBUY, PRICESELL, TAXCAT, CATEGORY, ATTRIBUTESET_ID, IMAGE, ATTRIBUTES " +
          "FROM PRODUCTS WHERE REFERENCE = ?"
        , SerializerWriteString.INSTANCE
        , ProductInfoExt.getSerializerRead()).find(sReference);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:8,代码来源:DataLogicSales.java


示例20: getProductCatalog

import com.openbravo.pos.ticket.ProductInfoExt; //导入依赖的package包/类
public List<ProductInfoExt> getProductCatalog(String category) throws BasicException  {
    return new PreparedSentence(s
        , "SELECT P.ID, P.REFERENCE, P.CODE, P.NAME, P.ISCOM, P.ISSCALE, P.PRICEBUY, P.PRICESELL, P.TAXCAT, P.CATEGORY, P.ATTRIBUTESET_ID, P.IMAGE, P.ATTRIBUTES " +
          "FROM PRODUCTS P, PRODUCTS_CAT O WHERE P.ID = O.PRODUCT AND P.CATEGORY = ? " +
          "ORDER BY O.CATORDER, P.NAME"
        , SerializerWriteString.INSTANCE
        , ProductInfoExt.getSerializerRead()).list(category);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:9,代码来源:DataLogicSales.java



注:本文中的com.openbravo.pos.ticket.ProductInfoExt类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ServiceInstanceDoesNotExistException类代码示例发布时间:2022-05-22
下一篇:
Java DeploymentException类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap