private void setActiveTicket(String id) throws BasicException {

    currentTicket = panelticket.getActiveTicket().getId();

    // save current ticket
    //        if (currentTicket != null) {
    //            try {
    //                dataLogicReceipts.insertSharedTicket(currentTicket,
    // panelticket.getActiveTicket());
    //            } catch (BasicException e) {
    //                new MessageInf(e).show(this);
    //            }
    //        }
    // set ticket
    // BEGIN TRANSACTION
    TicketInfo ticket = dataLogicReceipts.getSharedTicket(id);
    if (ticket == null) {
      // Does not exists ???
      throw new BasicException(AppLocal.getIntString("message.noticket"));
    } else {
      dataLogicReceipts.deleteSharedTicket(id);
      currentTicket = id;
      panelticket.setActiveTicket(ticket, null);
      fireTicketSelectionChanged(ticket.getId());
    }
    // END TRANSACTION
  }
  private void setActiveTicket(String id) throws BasicException {

    TicketInfo ticket = dlReceipts.getSharedTicket(id);
    if (ticket == null) {
      m_jListTickets.setText("");
      throw new BasicException(AppLocal.getIntString("message.noticket"));
    } else {
      dlReceipts.getPickupId(id);
      Integer pickUp = dlReceipts.getPickupId(id);
      dlReceipts.deleteSharedTicket(id);
      m_sCurrentTicket = id;
      m_panelticket.setActiveTicket(ticket, null);
      ticket.setPickupId(pickUp);
    }
    // END TRANSACTION
  }
  private void saveCurrentTicket() {

    if (m_sCurrentTicket != null) {
      try {
        dlReceipts.insertSharedTicket(
            m_sCurrentTicket,
            m_panelticket.getActiveTicket(),
            m_panelticket.getActiveTicket().getPickupId());
        m_jListTickets.setText("*");
        TicketInfo l = dlReceipts.getSharedTicket(m_sCurrentTicket);
        if (l.getLinesCount() == 0) {
          //                      throw new
          // BasicException(AppLocal.getIntString("message.nullticket"));
          //                    }else{
          dlReceipts.deleteSharedTicket(m_sCurrentTicket);
        }
      } catch (BasicException e) {
        new MessageInf(e).show(this);
      }
    }
  }
  private void selectValidTicket() {

    newTicket();

    try {
      List<FindTicketsInfo> l = dlReceipts.getSharedTicketList();
      if (l.isEmpty()) {
        m_jListTickets.setText("");
        newTicket();
      } else {
        // JG Deliberate doClick for testing/reuse
        m_jListTickets.doClick();
      }
    } catch (BasicException e) {
      new MessageInf(e).show(this);
      newTicket();
    }
  }