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


Java TicketLineInfo类代码示例

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


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

示例1: m_jRefundActionPerformed

import com.openbravo.pos.ticket.TicketLineInfo; //导入依赖的package包/类
private void m_jRefundActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jRefundActionPerformed
    
    java.util.List aRefundLines = new ArrayList();
    
    for(int i = 0; i < m_ticket.getLinesCount(); i++) {
        TicketLineInfo newline = new TicketLineInfo(m_ticket.getLine(i));
        aRefundLines.add(newline);
    } 
    
    m_ticketCopy = null;
    m_TicketsBagTicketBag.showRefund();
    m_panelticketedit.showRefundLines(aRefundLines);
    
    TicketInfo refundticket = new TicketInfo();
    refundticket.setTicketType(TicketInfo.RECEIPT_REFUND);
    refundticket.setCustomer(m_ticket.getCustomer());
    refundticket.setPayments(m_ticket.getPayments());
    m_panelticketedit.setActiveTicket(refundticket, null);      
    
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:21,代码来源:JTicketsBagTicket.java

示例2: paintTicketLine

import com.openbravo.pos.ticket.TicketLineInfo; //导入依赖的package包/类
private void paintTicketLine(int index, TicketLineInfo oLine){
     
     if (executeEventAndRefresh("ticket.setline", new ScriptArg("index", index), new ScriptArg("line", oLine)) == null) {

         m_oTicket.setLine(index, oLine);
         m_ticketlines.setTicketLine(index, oLine);
         m_ticketlines.setSelectedIndex(index);

         visorTicketLine(oLine); // Y al visor tambien...
         printPartialTotals();   
         stateToZero();  

         // event receipt
         executeEventAndRefresh("ticket.change");
     }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:17,代码来源:JPanelTicket.java

示例3: m_jEditLineActionPerformed

import com.openbravo.pos.ticket.TicketLineInfo; //导入依赖的package包/类
private void m_jEditLineActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jEditLineActionPerformed
    
    int i = m_ticketlines.getSelectedIndex();
    if (i < 0){
        Toolkit.getDefaultToolkit().beep(); // no line selected
    } else {
        try {
            TicketLineInfo newline = JProductLineEdit.showMessage(this, m_App, m_oTicket.getLine(i));
            if (newline != null) {
                // line has been modified
                paintTicketLine(i, newline);
            }
        } catch (BasicException e) {
            new MessageInf(e).show(this);
        }
    }

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

示例4: jEditAttributesActionPerformed

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

        int i = m_ticketlines.getSelectedIndex();
        if (i < 0) {
            Toolkit.getDefaultToolkit().beep(); // no line selected
        } else {
            try {
                TicketLineInfo line = m_oTicket.getLine(i);
                JProductAttEdit attedit = JProductAttEdit.getAttributesEditor(this, m_App.getSession());
                attedit.editAttributes(line.getProductAttSetId(), line.getProductAttSetInstId());
                attedit.setVisible(true);
                if (attedit.isOK()) {
                    // The user pressed OK
                    line.setProductAttSetInstId(attedit.getAttributeSetInst());
                    line.setProductAttSetInstDesc(attedit.getAttributeSetInstDescription());
                    paintTicketLine(i, line);
                }
            } catch (BasicException ex) {
                MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindattributes"), ex);
                msg.show(this);
            }
        }
        
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:25,代码来源:JPanelTicket.java

示例5: insertRow

import com.openbravo.pos.ticket.TicketLineInfo; //导入依赖的package包/类
public void insertRow(int index, TicketLineInfo oLine) {
    
    String[] row = new String[m_acolumns.length];
    for (int i = 0; i < m_acolumns.length; i++) {
        try {
            ScriptEngine script = ScriptFactory.getScriptEngine(ScriptFactory.VELOCITY);
            script.put("ticketline", oLine);
            row[i] = script.eval(m_acolumns[i].value).toString();
        } catch (ScriptException e) {
            row[i] = null;
        }  
    } 
    
    m_rows.add(index, row);
    fireTableRowsInserted(index, index);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:17,代码来源:JTicketLines.java

示例6: m_jRefundActionPerformed

import com.openbravo.pos.ticket.TicketLineInfo; //导入依赖的package包/类
private void m_jRefundActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jRefundActionPerformed
        
        java.util.List aRefundLines = new ArrayList();
        
        for(int i = 0; i < m_ticket.getLinesCount(); i++) {
            TicketLineInfo newline = new TicketLineInfo(m_ticket.getLine(i));
            aRefundLines.add(newline);
        } 

        m_ticketCopy = null;
        m_TicketsBagTicketBag.showRefund();
        m_panelticketedit.showRefundLines(aRefundLines);
        
        TicketInfo refundticket = new TicketInfo();
        refundticket.setTicketType(TicketInfo.RECEIPT_REFUND);
        refundticket.setCustomer(m_ticket.getCustomer());
        refundticket.setPayments(m_ticket.getPayments());    
// Indicate that this a ticket in edit mode      
        refundticket.setOldTicket(true);         
        m_panelticketedit.setActiveTicket(refundticket, null);          
    }
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:22,代码来源:JTicketsBagTicket.java

示例7: m_jEditLineActionPerformed

import com.openbravo.pos.ticket.TicketLineInfo; //导入依赖的package包/类
private void m_jEditLineActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jEditLineActionPerformed
    int i = m_ticketlines.getSelectedIndex();
    if (i < 0){
        Toolkit.getDefaultToolkit().beep(); // no line selected
    } else {
        try {
            TicketLineInfo newline = JProductLineEdit.showMessage(this, m_App, m_oTicket.getLine(i));
            if (newline != null) {
                // line has been modified
                paintTicketLine(i, newline);
            }
        } catch (BasicException e) {
            new MessageInf(e).show(this);
        }
    }

}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:18,代码来源:JPanelTicket.java

示例8: m_jRefundActionPerformed

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

        java.util.List aRefundLines = new ArrayList();

        for (int i = 0; i < m_ticket.getLinesCount(); i++) {
            TicketLineInfo newline = new TicketLineInfo(m_ticket.getLine(i));
            aRefundLines.add(newline);
        }

        m_ticketCopy = null;
        m_TicketsBagTicketBag.showRefund();
        m_panelticketedit.showRefundLines(aRefundLines);

        TicketInfo refundticket = new TicketInfo();
        refundticket.setTicketType(TicketInfo.RECEIPT_REFUND);
        refundticket.setCustomer(m_ticket.getCustomer());
        refundticket.setPayments(m_ticket.getPayments());
        m_panelticketedit.setActiveTicket(refundticket, null);

    }
 
开发者ID:nordpos,项目名称:nordpos,代码行数:21,代码来源:JTicketsBagTicket.java

示例9: setLines

import com.openbravo.pos.ticket.TicketLineInfo; //导入依赖的package包/类
public void setLines(List aRefundLines) {
    
    m_aLines = aRefundLines;
            
    m_aLinesAll.clear();
    for (int i = 0; i < m_aLines.size(); i++ ){
        byte[] aSerLine; 
        aSerLine = ImageUtils.writeSerializable(m_aLines.get(i));
        m_aLinesAll.add(ImageUtils.readSerializable(aSerLine)); 
    }

    ticketlines.clearTicketLines();
    
    if (m_aLines != null) {
        for (int i = 0; i < m_aLines.size(); i++) {
            ticketlines.addTicketLine((TicketLineInfo) m_aLines.get(i));
        }
    }
}
 
开发者ID:nordpos,项目名称:nordpos,代码行数:20,代码来源:JRefundLines.java

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

示例11: paintTicketLine

import com.openbravo.pos.ticket.TicketLineInfo; //导入依赖的package包/类
private void paintTicketLine(int index, TicketLineInfo oLine) {

        if (executeEventAndRefresh("ticket.setline", new ScriptArg("index", index), new ScriptArg("line", oLine)) == null) {

            m_oTicket.setLine(index, oLine);
            m_ticketlines.setTicketLine(index, oLine);
            m_ticketlines.setSelectedIndex(index);

            visorTicketLine(oLine); // Y al visor tambien...
            printPartialTotals();
            stateToZero();

            // event receipt
            executeEventAndRefresh("ticket.change");
        }
    }
 
开发者ID:nordpos,项目名称:nordpos,代码行数:17,代码来源:JPanelTicket.java

示例12: visorTicketLine

import com.openbravo.pos.ticket.TicketLineInfo; //导入依赖的package包/类
private void visorTicketLine(TicketLineInfo oLine) {
    if (oLine == null) {
        m_App.getDeviceTicket().getDeviceDisplay().clearVisor();
    } else {
        m_TTP = new TicketParser(getClass().getResourceAsStream(PRINTER_SHEMA), m_App.getDeviceTicket());
        try {
            ScriptEngine script = ScriptFactory.getScriptEngine(ScriptFactory.VELOCITY);
            script.put("ticketline", oLine);
            script.put("local", new AppLocal());
            m_TTP.printTicket(getClass().getResourceAsStream(PRINT_TICKET_LINE), script);
        } catch (ScriptException | TicketPrinterException e) {
            MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotprintline"), e);
            msg.show(JPanelTicket.this);
        }
    }
}
 
开发者ID:nordpos,项目名称:nordpos,代码行数:17,代码来源:JPanelTicket.java

示例13: performDiscountRate

import com.openbravo.pos.ticket.TicketLineInfo; //导入依赖的package包/类
private void performDiscountRate(Double discountrate) {
    int index = m_ticketlines.getSelectedIndex();
    double total = m_oTicket.getTotal();
    TicketLineInfo oLine;

    if (bTypeDiscountRate == true) {
        if (index >= 0) {
            oLine = new DiscountPercent().LineDiscountPercent(m_oTicket.getLine(index), 0.0);
            paintTicketLine(index, new DiscountPercent().LineDiscountPercent(oLine, discountrate));
        } else {
            Toolkit.getDefaultToolkit().beep();
        }
    } else if (bTypeDiscountRate == false) {
        if (total > 0.0) {
            for (int i = 0; i < m_oTicket.getLinesCount(); i++) {
                oLine = new DiscountPercent().LineDiscountPercent(m_oTicket.getLine(i), 0.0);
                paintTicketLine(i, new DiscountPercent().LineDiscountPercent(oLine, discountrate));
            }
        } else {
            Toolkit.getDefaultToolkit().beep();
        }
    } else {
        Toolkit.getDefaultToolkit().beep();
    }
    refreshTicket();
}
 
开发者ID:nordpos,项目名称:nordpos,代码行数:27,代码来源:JPanelTicket.java

示例14: performDiscountMoney

import com.openbravo.pos.ticket.TicketLineInfo; //导入依赖的package包/类
private void performDiscountMoney(Double discountmoney) {
    int index = m_ticketlines.getSelectedIndex();
    double total = m_oTicket.getTotal();
    TicketLineInfo oLine;

    if (bTypeDiscountRate == true) {
        if (index >= 0) {
            oLine = new DiscountMoney().LineDiscountMoney(m_oTicket.getLine(index), 0.0);
            paintTicketLine(index, new DiscountMoney().LineDiscountMoney(oLine, discountmoney));
        } else {
            Toolkit.getDefaultToolkit().beep();
        }
    } else if (bTypeDiscountRate == false) {
        if (total > 0.0) {
            for (int i = 0; i < m_oTicket.getLinesCount(); i++) {
                oLine = new DiscountMoney().LineDiscountMoney(m_oTicket.getLine(i), 0.0);
                paintTicketLine(i, new DiscountMoney().LineDiscountMoney(oLine, discountmoney / m_oTicket.getLinesCount()));
            }
        } else {
            Toolkit.getDefaultToolkit().beep();
        }
    } else {
        Toolkit.getDefaultToolkit().beep();
    }
    refreshTicket();
}
 
开发者ID:nordpos,项目名称:nordpos,代码行数:27,代码来源:JPanelTicket.java

示例15: m_jEditLineActionPerformed

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

        int i = m_ticketlines.getSelectedIndex();
        if (i < 0) {
            Toolkit.getDefaultToolkit().beep(); // no line selected
        } else {
            try {
                TicketLineInfo newline = JProductLineEdit.showMessage(this, m_App, m_oTicket.getLine(i));
                if (newline != null) {
                    // line has been modified
                    paintTicketLine(i, newline);
                }
            } catch (BasicException e) {
                new MessageInf(e).show(this);
            }
        }

    }
 
开发者ID:nordpos,项目名称:nordpos,代码行数:19,代码来源:JPanelTicket.java


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