private void m_jEditActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_m_jEditActionPerformed m_ticketCopy = m_ticket; m_TicketsBagTicketBag.showEdit(); m_panelticketedit.showCatalog(); m_panelticketedit.setActiveTicket(m_ticket.copyTicket(), null); } // GEN-LAST:event_m_jEditActionPerformed
private void m_jEditActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_m_jEditActionPerformed m_ticketCopy = m_ticket; m_TicketsBagTicketBag.showEdit(); m_panelticketedit.showCatalog(); // Indicate that this a ticket in edit mode m_ticketCopy.setOldTicket(true); m_panelticketedit.setActiveTicket(m_ticket.copyTicket(), null); } // GEN-LAST:event_m_jEditActionPerformed
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()); m_panelticketedit.setActiveTicket(refundticket, null); } // GEN-LAST:event_m_jRefundActionPerformed
public void activate() { // precondicion es que no tenemos ticket activado ni ticket en el panel m_ticket = null; m_ticketCopy = null; printTicket(); m_jTicketEditor.reset(); m_jTicketEditor.activate(); m_panelticketedit.setActiveTicket(null, null); m_jEdit.setVisible(m_App.getAppUserView().getUser().hasPermission("sales.EditTicket")); m_jRefund.setVisible(m_App.getAppUserView().getUser().hasPermission("sales.RefundTicket")); m_jPrint.setVisible(m_App.getAppUserView().getUser().hasPermission("sales.PrintTicket")); // postcondicion es que tenemos ticket activado aqui y ticket en el panel }
private void resetToTicket() { printTicket(); m_jTicketEditor.reset(); m_panelticketedit.setActiveTicket(null, null); }