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


Java TicketLineInfo.getMultiply方法代码示例

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


在下文中一共展示了TicketLineInfo.getMultiply方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: m_jbtnAddOneActionPerformed

import com.openbravo.pos.ticket.TicketLineInfo; //导入方法依赖的package包/类
private void m_jbtnAddOneActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jbtnAddOneActionPerformed

        int index = ticketlines.getSelectedIndex();
        if (index >= 0) {
            TicketLineInfo oLine = (TicketLineInfo) m_aLines.get(index);
            TicketLineInfo oNewLine = new TicketLineInfo(oLine);
            oNewLine.setMultiply(-1.0);
            if (isMultiplyControl) {
                oLine.setMultiply(oLine.getMultiply()-1.0);
                ticketlines.setTicketLine(index, oLine);
                ticketlines.setSelectedIndex(index);
                if (oLine.getMultiply() == 0) { 
                   ticketlines.removeTicketLine(index);
                   m_aLines.remove(index);
                }
            }    
            m_jTicketEdit.addTicketLine(oNewLine);
        }   
        
    }
 
开发者ID:nordpos,项目名称:nordpos,代码行数:21,代码来源:JRefundLines.java

示例2: getTotalOfaTicket

import com.openbravo.pos.ticket.TicketLineInfo; //导入方法依赖的package包/类
public BigDecimal getTotalOfaTicket(String place) {
    double total = 0;
    for (TicketLineInfo line : findTicket(place).getM_aLines()) {
        total += line.getMultiply() * line.getPrice();
    }
    return BigDecimal.valueOf(total);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:8,代码来源:RestaurantManager.java

示例3: getSelectedLinesUnit

import com.openbravo.pos.ticket.TicketLineInfo; //导入方法依赖的package包/类
public TicketLineInfo[] getSelectedLinesUnit() {

       // never returns an empty array, or null, or an array with at least one element.

        int i = findFirstNonAuxiliarLine();
        
        if (i >= 0) {       
            
            TicketLineInfo line = ticket.getLine(i);
            
            if (line.getMultiply() >= 1.0) {
                
                List<TicketLineInfo> l = new ArrayList<TicketLineInfo>();
                
                if (line.getMultiply() > 1.0) {
                    line.setMultiply(line.getMultiply() -1.0);
                    ticketlines.setTicketLine(i, line);
                    line = line.copyTicketLine();
                    line.setMultiply(1.0);
                    l.add(line);  
                    i++;
                } else { // == 1.0
                    l.add(line);
                    ticket.removeLine(i);
                    ticketlines.removeTicketLine(i);
                }
                
                // add also auxiliars
                while (i < ticket.getLinesCount() && ticket.getLine(i).isProductCom()) {
                    l.add(ticket.getLine(i));
                    ticket.removeLine(i);
                    ticketlines.removeTicketLine(i);
                }              
                printTotals();
                return l.toArray(new TicketLineInfo[l.size()]);                    
            } else { // < 1.0
                return null;
            }            
        } else {
            return null;
        }
    }
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:43,代码来源:SimpleReceipt.java

示例4: getSelectedLinesUnit

import com.openbravo.pos.ticket.TicketLineInfo; //导入方法依赖的package包/类
/**
 *
 * @return
 */
public TicketLineInfo[] getSelectedLinesUnit() {

   // never returns an empty array, or null, or an array with at least one element.

    int i = findFirstNonAuxiliarLine();
    
    if (i >= 0) {       
        
        TicketLineInfo line = ticket.getLine(i);
        
        if (line.getMultiply() >= 1.0) {
            
            List<TicketLineInfo> l = new ArrayList<>();
            
            if (line.getMultiply() > 1.0) {
                line.setMultiply(line.getMultiply() -1.0);
                ticketlines.setTicketLine(i, line);
                line = line.copyTicketLine();
                line.setMultiply(1.0);
                l.add(line);  
                i++;
            } else { // == 1.0
                l.add(line);
                ticket.removeLine(i);
                ticketlines.removeTicketLine(i);
            }
            
            // add also auxiliars
            while (i < ticket.getLinesCount() && ticket.getLine(i).isProductCom()) {
                l.add(ticket.getLine(i));
                ticket.removeLine(i);
                ticketlines.removeTicketLine(i);
            }              
            printTotals();
            return l.toArray(new TicketLineInfo[l.size()]);                    
        } else { // < 1.0
            return null;
        }            
    } else {
        return null;
    }
}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:47,代码来源:SimpleReceipt.java


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