update order queue printer
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
|
||||
def print_order_item(oqs,order_id, item_code, print_status, options="")
|
||||
def print_order_item(print_settings,oqs,order_id, item_code, print_status, options="")
|
||||
#Use CUPS service
|
||||
#Generate PDF
|
||||
#Print
|
||||
@@ -10,7 +10,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
|
||||
# check for item not to show
|
||||
if order_item[0].price != 0
|
||||
pdf = OrderItemPdf.new(order_item[0], print_status, options, oqs.use_alternate_name)
|
||||
pdf = OrderItemPdf.new(print_settings,order_item[0], print_status, options, oqs.use_alternate_name)
|
||||
pdf.render_file filename
|
||||
|
||||
if oqs.print_copy
|
||||
@@ -26,7 +26,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
end
|
||||
|
||||
# Query for per order
|
||||
def print_order_summary(oqs, order_id, order_items, print_status)
|
||||
def print_order_summary(print_settings,oqs, order_id, order_items, print_status)
|
||||
#Use CUPS service
|
||||
#Generate PDF
|
||||
#Print
|
||||
@@ -41,7 +41,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
|
||||
# check for item not to show
|
||||
if odi.price != 0
|
||||
pdf = OrderItemPdf.new(odi, print_status, options, oqs.use_alternate_name)
|
||||
pdf = OrderItemPdf.new(print_settings,odi, print_status, options, oqs.use_alternate_name)
|
||||
# pdf.render_file "tmp/order_item.pdf"
|
||||
pdf.render_file filename
|
||||
if oqs.print_copy
|
||||
@@ -55,7 +55,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
# For Print Order Summary
|
||||
else
|
||||
filename = "tmp/order_summary_#{ order_id }" + ".pdf"
|
||||
pdf = OrderSummaryPdf.new(order, print_status, order_items, oqs.use_alternate_name)
|
||||
pdf = OrderSummaryPdf.new(print_settings,order, print_status, order_items, oqs.use_alternate_name)
|
||||
pdf.render_file filename
|
||||
if oqs.print_copy
|
||||
self.print(filename, oqs.printer_name)
|
||||
@@ -70,7 +70,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
end
|
||||
|
||||
# Print for orders in booking
|
||||
def print_booking_summary(oqs, booking_id, print_status)
|
||||
def print_booking_summary(print_settings,oqs, booking_id, print_status)
|
||||
order=print_query('booking_summary', booking_id)
|
||||
# For Print Per Item
|
||||
if oqs.cut_per_item
|
||||
@@ -81,7 +81,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
|
||||
# check for item not to show
|
||||
if odi.price != 0
|
||||
pdf = OrderItemPdf.new(odi, print_status, options,oqs.use_alternate_name)
|
||||
pdf = OrderItemPdf.new(print_settings,odi, print_status, options,oqs.use_alternate_name)
|
||||
pdf.render_file filename
|
||||
|
||||
if oqs.print_copy
|
||||
@@ -98,7 +98,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
# For Print Order Summary
|
||||
else
|
||||
filename = "tmp/booking_summary_#{ booking_id }" + ".pdf"
|
||||
pdf = OrderSummaryPdf.new(order, print_status,oqs.use_alternate_name)
|
||||
pdf = OrderSummaryPdf.new(print_settings,order, print_status,oqs.use_alternate_name)
|
||||
pdf.render_file filename
|
||||
if oqs.print_copy
|
||||
self.print(filename, oqs.printer_name)
|
||||
|
||||
Reference in New Issue
Block a user