Ejemplo n.º 1
0
  public TicketInfo copyTicket() {
    TicketInfo t = new TicketInfo();

    t.tickettype = tickettype;
    t.m_iTicketId = m_iTicketId;
    t.m_iTicketNCF = m_iTicketNCF; // NCF
    t.m_dDate = m_dDate;
    t.m_sActiveCash = m_sActiveCash;
    t.attributes = (Properties) attributes.clone();
    t.m_User = m_User;
    t.m_Customer = m_Customer;

    t.m_aLines = new ArrayList<TicketLineInfo>();
    for (TicketLineInfo l : m_aLines) {
      t.m_aLines.add(l.copyTicketLine());
    }
    t.refreshLines();

    t.payments = new LinkedList<PaymentInfo>();
    for (PaymentInfo p : payments) {
      t.payments.add(p.copyPayment());
    }

    // taxes are not copied, must be calculated again.

    return t;
  }
Ejemplo n.º 2
0
 public void removeLine(int index) {
   m_aLines.remove(index);
   refreshLines();
 }
Ejemplo n.º 3
0
 public void insertLine(int index, TicketLineInfo oLine) {
   m_aLines.add(index, oLine);
   refreshLines();
 }