receipt update
This commit is contained in:
22
app/models/printer/order_queue_printer.rb
Normal file
22
app/models/printer/order_queue_printer.rb
Normal file
@@ -0,0 +1,22 @@
|
||||
class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
|
||||
def print_order_item(order_queue_id)
|
||||
#Use CUPS service
|
||||
#Generate PDF
|
||||
#Print
|
||||
pdf = OrderItemPdf.new
|
||||
pdf.render_file "tmp/order_item_queue_#{order_id}_#{order_item_id}" + ".pdf"
|
||||
self.print("tmp/receipt.pdf")
|
||||
end
|
||||
|
||||
def print_order_summary(booking_id)
|
||||
#Use CUPS service
|
||||
#Generate PDF
|
||||
#Print
|
||||
filename = "tmp/order_summary_#{booking_id}" + ".pdf"
|
||||
pdf = OrderSummaryPdf.new
|
||||
pdf.render_file filename
|
||||
|
||||
self.print(filename)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user