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


Java TicketLineInfo.setMultiply方法代码示例

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


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

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

        for (int i = 0; i < m_aLines.size(); i++) {
            TicketLineInfo oLine = (TicketLineInfo) m_aLines.get(i);
            TicketLineInfo oNewLine = new TicketLineInfo(oLine);            
            oNewLine.setMultiply(-oLine.getMultiply());
            m_jTicketEdit.addTicketLine(oNewLine);
        }
        
    }
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:11,代码来源:JRefundLines.java

示例3: 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);
            m_jTicketEdit.addTicketLine(oNewLine);
        }   
        
    }
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:12,代码来源:JRefundLines.java

示例4: m_jbtnAddLineActionPerformed

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

        int index = ticketlines.getSelectedIndex();
        if (index >= 0) {
            TicketLineInfo oLine = (TicketLineInfo) m_aLines.get(index);
            TicketLineInfo oNewLine = new TicketLineInfo(oLine);            
            oNewLine.setMultiply(-oLine.getMultiply());
            m_jTicketEdit.addTicketLine(oNewLine);
        }        
    }
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:11,代码来源:JRefundLines.java

示例5: m_jbtnAddAllActionPerformed

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

        for (Object m_aLine : m_aLines) {
            TicketLineInfo oLine = (TicketLineInfo) m_aLine;
            TicketLineInfo oNewLine = new TicketLineInfo(oLine);            
            oNewLine.setMultiply(-oLine.getMultiply());            
            m_jTicketEdit.addTicketLine(oNewLine);
        }
        
    }
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:11,代码来源:JRefundLines.java

示例6: m_jbtnAddAllActionPerformed

import com.openbravo.pos.ticket.TicketLineInfo; //导入方法依赖的package包/类
private void m_jbtnAddAllActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jbtnAddAllActionPerformed
    for (int i = 0; i < m_aLines.size(); i++) {
        TicketLineInfo oLine = (TicketLineInfo) m_aLines.get(i);
        TicketLineInfo oNewLine = new TicketLineInfo(oLine);            
        oNewLine.setMultiply(-oLine.getMultiply());
        m_jTicketEdit.addTicketLine(oNewLine);
        if (isMultiplyControl) ticketlines.removeTicketLine(ticketlines.getSelectedIndex());
    }
    if (isMultiplyControl) m_aLines.clear();
}
 
开发者ID:nordpos,项目名称:nordpos,代码行数:11,代码来源:JRefundLines.java

示例7: m_jbtnAddLineActionPerformed

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

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

示例8: 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

示例9: 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.setMultiply方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。