private void editTicket(Ticket ticket) { if (ticket.isPaid()) { POSMessageDialog.showMessage("Tiket yang sudah terbayar tidak dapat diedit lagi"); return; } Ticket ticketToEdit = TicketDAO.getInstance().loadFullTicket(ticket.getId()); OrderView.getInstance().setCurrentTicket(ticketToEdit); RootView.getInstance().showView(OrderView.VIEW_NAME); }
private void doTakeout(String titcketType) { Application application = Application.getInstance(); Ticket ticket = new Ticket(); // ticket.setPriceIncludesTax(application.isPriceIncludesTax()); ticket.setTableNumber(-1); ticket.setTicketType(titcketType); ticket.setTerminal(application.getTerminal()); ticket.setOwner(Application.getCurrentUser()); ticket.setShift(application.getCurrentShift()); Calendar currentTime = Calendar.getInstance(); ticket.setCreateDate(currentTime.getTime()); ticket.setCreationHour(currentTime.get(Calendar.HOUR_OF_DAY)); OrderView.getInstance().setCurrentTicket(ticket); RootView.getInstance().showView(OrderView.VIEW_NAME); }
private void btnCancelActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btnCancelActionPerformed RootView.getInstance().showView(SwitchboardView.VIEW_NAME); } // GEN-LAST:event_btnCancelActionPerformed