creating order queue printer
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
|
||||
def print_order_item(order_id, item_code)
|
||||
def print_order_item(printer_settings,order_id, item_code)
|
||||
#Use CUPS service
|
||||
#Generate PDF
|
||||
#Print
|
||||
pdf = OrderItemPdf.new
|
||||
order_item=OrderItem.find_by_item_code(item_code)
|
||||
pdf = OrderItemPdf.new(printer_settings,order_item)
|
||||
pdf.render_file "tmp/order_item_queue_#{order_id}_#{item_code}" + ".pdf"
|
||||
self.print("tmp/receipt.pdf")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user