receipt update
This commit is contained in:
25
app/models/printer/cashier_station_printer.rb
Normal file
25
app/models/printer/cashier_station_printer.rb
Normal file
@@ -0,0 +1,25 @@
|
||||
class Printer::CashierStationPrinter < Printer::PrinterWorker
|
||||
|
||||
def print_open_cashier(receipt_no)
|
||||
time = DateTime.now
|
||||
|
||||
#Use CUPS service
|
||||
#Generate PDF
|
||||
#Print
|
||||
pdf = CashierStationOpening.new
|
||||
pdf.render_file "tmp/cashier_station_#{order_id}_closing_#{time}.pdf"
|
||||
self.print("tmp/cashier_station_#{order_id}_closing_#{time}.pdf")
|
||||
end
|
||||
|
||||
def print_close_cashier(receipt_no)
|
||||
#Use CUPS service
|
||||
#Generate PDF
|
||||
time = DateTime.now
|
||||
#Print
|
||||
pdf = CashierStationClosing.new
|
||||
pdf.render_file "tmp/cashier_station_#{order_id}_closing_#{time}.pdf"
|
||||
self.print("tmp/receipt.pdf")
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user