add order_slim_pdf in settings/lookups and change order_slim_pdf
This commit is contained in:
@@ -4,7 +4,13 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
#Use CUPS service
|
||||
#Generate PDF
|
||||
#Print
|
||||
order_slim_pdf = Lookup.collection_of("order_slim_pdf") #order_slim_pdf
|
||||
pdf = OrderItemPdf.new
|
||||
if !order_slim_pdf.nil?
|
||||
if order_slim_pdf[0][1] == '1'
|
||||
pdf = OrderItemSlimPdf.new
|
||||
end
|
||||
end
|
||||
pdf.render_file "tmp/order_item_queue_#{order_id}_#{order_item_id}" + ".pdf"
|
||||
self.print("tmp/receipt.pdf")
|
||||
end
|
||||
@@ -14,7 +20,13 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
#Generate PDF
|
||||
#Print
|
||||
filename = "tmp/order_summary_#{booking_id}" + ".pdf"
|
||||
order_slim_pdf = Lookup.collection_of("order_slim_pdf") #order_slim_pdf
|
||||
pdf = OrderSummaryPdf.new
|
||||
if !order_slim_pdf.nil?
|
||||
if order_slim_pdf[1] == '1'
|
||||
pdf = OrderSummarySlimPdf.new
|
||||
end
|
||||
end
|
||||
pdf.render_file filename
|
||||
|
||||
self.print(filename)
|
||||
@@ -24,8 +36,14 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
#Use CUPS service
|
||||
#Generate PDF
|
||||
#Print
|
||||
order_slim_pdf = Lookup.collection_of("order_slim_pdf") #order_slim_pdf
|
||||
filename = "tmp/order_summary_#{booking_id}" + ".pdf"
|
||||
pdf = OrderSummaryPdf.new
|
||||
if !order_slim_pdf.nil?
|
||||
if order_slim_pdf[1] == '1'
|
||||
pdf = OrderSummarySlimPdf.new
|
||||
end
|
||||
end
|
||||
pdf.render_file filename
|
||||
|
||||
self.print(filename)
|
||||
@@ -35,8 +53,14 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
#Use CUPS service
|
||||
#Generate PDF
|
||||
#Print
|
||||
order_slim_pdf = Lookup.collection_of("order_slim_pdf") #order_slim_pdf
|
||||
filename = "tmp/order_summary_#{booking_id}" + ".pdf"
|
||||
pdf = OrderSummaryPdf.new
|
||||
if !order_slim_pdf.nil?
|
||||
if order_slim_pdf[1] == '1'
|
||||
pdf = OrderSummarySlimPdf.new
|
||||
end
|
||||
end
|
||||
pdf.render_file filename
|
||||
|
||||
self.print(filename)
|
||||
@@ -46,8 +70,14 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
#Use CUPS service
|
||||
#Generate PDF
|
||||
#Print
|
||||
order_slim_pdf = Lookup.collection_of("order_slim_pdf") #order_slim_pdf
|
||||
filename = "tmp/order_summary_#{booking_id}" + ".pdf"
|
||||
pdf = OrderSummaryPdf.new
|
||||
if !order_slim_pdf.nil?
|
||||
if order_slim_pdf[1] == '1'
|
||||
pdf = OrderSummarySlimPdf.new
|
||||
end
|
||||
end
|
||||
pdf.render_file filename
|
||||
|
||||
self.print(filename)
|
||||
@@ -57,8 +87,14 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
#Use CUPS service
|
||||
#Generate PDF
|
||||
#Print
|
||||
order_slim_pdf = Lookup.collection_of("order_slim_pdf") #order_slim_pdf
|
||||
filename = "tmp/order_summary_#{booking_id}" + ".pdf"
|
||||
pdf = OrderSummaryPdf.new
|
||||
if !order_slim_pdf.nil?
|
||||
if order_slim_pdf[1] == '1'
|
||||
pdf = OrderSummarySlimPdf.new
|
||||
end
|
||||
end
|
||||
pdf.render_file filename
|
||||
|
||||
self.print(filename)
|
||||
|
||||
Reference in New Issue
Block a user