receipt update

This commit is contained in:
Min Zeya Phyo
2017-04-22 00:09:07 +06:30
parent f860954a7f
commit 62e8615f12
7 changed files with 202 additions and 0 deletions

View 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