oqs update
This commit is contained in:
@@ -22,14 +22,14 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
end
|
||||
|
||||
# Query for per order
|
||||
def print_order_summary(oqs, order_id, print_status)
|
||||
def print_order_summary(oqs, order_id, order_items, print_status)
|
||||
#Use CUPS service
|
||||
#Generate PDF
|
||||
#Print
|
||||
#Print
|
||||
order=print_query('order_summary', order_id)
|
||||
# For Print Per Item
|
||||
if oqs.cut_per_item
|
||||
order.each do|odi|
|
||||
order_items.each do|odi|
|
||||
filename = "tmp/order_item_#{odi.item_name}" + ".pdf"
|
||||
# For Item Options
|
||||
options = odi.options == "[]"? "" : odi.options
|
||||
@@ -46,7 +46,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
# For Print Order Summary
|
||||
else
|
||||
filename = "tmp/order_summary_#{ order_id }" + ".pdf"
|
||||
pdf = OrderSummaryPdf.new(order, print_status)
|
||||
pdf = OrderSummaryPdf.new(order, print_status, order_items)
|
||||
pdf.render_file filename
|
||||
if oqs.print_copy
|
||||
self.print(filename, oqs.printer_name)
|
||||
|
||||
Reference in New Issue
Block a user