Exemplo n.º 1
0
 def printSimplified(self):
     """Simplified ticket printer."""
     if self.orderTotal.getTotal() > 0:
         self.setTime()
         ticket = Ticket.Ticket(self.collector(), self, simplified=True)
         # if ticket.exec_():
         #     pass
         printer = Printer.Print()
         printer.Print(ticket, simplified=True)
         printer = None
         ticket.setParent(None)
Exemplo n.º 2
0
 def printTicket(self, cancelled=False):
     """Simplified ticket printer."""
     if self.orderTotal.getTotal() > 0:
         self.setTime()
         ticket = Ticket.Ticket(self.collector(), self, cancelled=cancelled)
         # if ticket.exec_():
         #     pass
         printer = Printer.Print()
         printer.Print(ticket)
         printer = None
         ticket.setParent(None)
         db = Db()
         db.recordTicket(self.collector())
         self.parent.deleteSession(self, self.parent.sessionIndex(self))