当前位置: 首页>>代码示例>>Java>>正文


Java ProductInfoExt类代码示例

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


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


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