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

Java TicketLineInfo类代码示例

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

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



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


示例16: 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:nordpos,项目名称:nordpos,代码行数:25,代码来源:JPanelTicket.java


示例17: LineDiscountMoney

import com.openbravo.pos.ticket.TicketLineInfo; //导入依赖的package包/类
public TicketLineInfo LineDiscountMoney(TicketLineInfo TicketLine, Double dMoney) {

        double linedicountmoney = TicketLine.getDiscountMoney();
        double lineprice = TicketLine.getPriceTax();
        double linenodisount = TicketLine.getPriceTaxNoDiscount();

        if (linedicountmoney == 0.0 || linedicountmoney != dMoney) {
            if (linedicountmoney != 0.0) {
                TicketLine.setPriceTax(linenodisount + dMoney);
            } else {
                TicketLine.setPriceTax(lineprice - dMoney);
            }
            TicketLine.setProperty("discountmoney", Double.toString(dMoney));
        }
        
        return TicketLine;
    }
 
开发者ID:nordpos,项目名称:nordpos,代码行数:18,代码来源:DiscountMoney.java


示例18: LineDiscountPercent

import com.openbravo.pos.ticket.TicketLineInfo; //导入依赖的package包/类
public TicketLineInfo LineDiscountPercent(TicketLineInfo TicketLine, Double dDiscount) {

        double linediscount = TicketLine.getDiscountRate();
        double lineprice = TicketLine.getPriceTax();
        double linenodisount = TicketLine.getPriceTaxNoDiscount();

        if (linediscount == 0.0 || linediscount != dDiscount) {
            if (linediscount != 0.0) {
                TicketLine.setPriceTax(RoundUtils.getValue(linenodisount - linenodisount * dDiscount));
            } else {
                TicketLine.setPriceTax(RoundUtils.getValue(lineprice - lineprice * dDiscount));
            }
            TicketLine.setProperty("discountrate", Double.toString(dDiscount));
        }
        
        return TicketLine;
    }
 
开发者ID:nordpos,项目名称:nordpos,代码行数:18,代码来源:DiscountPercent.java


示例19: buildOrderReceipt

import com.openbravo.pos.ticket.TicketLineInfo; //导入依赖的package包/类
public static OrderReceipt buildOrderReceipt(TicketInfo ticketInfo) {
    StringBuilder builder = new StringBuilder();
    OrderReceipt orderReceipt = null;
    if (ticketInfo != null && ticketInfo.getLines() != null && ticketInfo.getLines().size() > 0) {
        orderReceipt = new OrderReceipt();
        orderReceipt.id = Integer.toString(ticketInfo.getTicketId());
        orderReceipt.total = Double.toString(ticketInfo.getTotal()) + "kr";
        orderReceipt.lines = new ArrayList<>();
        for (TicketLineInfo l : ticketInfo.getLines()) {
            builder.append(l.getMultiply());
            builder.append(" x ");
            builder.append(l.getProductName());
            builder.append(" = kr ");
            builder.append(l.getMultiply() * l.getPrice());
            orderReceipt.lines.add(builder.toString());
            builder.setLength(0); // clear
        }
    }
    return orderReceipt;
}
 
开发者ID:ZarGate,项目名称:OpenbravoPOS,代码行数:21,代码来源:ReceiptHelper.java


示例20: addLineToTicket

import com.openbravo.pos.ticket.TicketLineInfo; //导入依赖的package包/类
public void addLineToTicket(String ticketId, String productId) {
    ticket = new TicketDAO();
    product = new ProductDAO();
    category = new CategoryDAO();
    tax = new TaxDAO();
    taxesLogic = new TaxesLogic(tax.getTaxList());

    TicketInfo obj = ticket.getTicket(ticketId);
    ProductInfo productObj = product.findProductById(productId);
    TicketLineInfo line = new TicketLineInfo(productObj, productObj.getPriceSell(), taxesLogic.getTaxInfo(productObj.getTaxcat()));
    obj.addLine(line);
    ticket.updateTicket(ticketId, obj);
    refreshTax(obj);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:15,代码来源:RestaurantManager.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java ByteArrayPayload类代码示例发布时间:2022-05-22
下一篇:
Java JLTertiary类代码示例发布时间: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