update self.print for cloud

This commit is contained in:
Aung Myo
2018-04-06 14:07:43 +06:30
parent 85b92fd3a7
commit 38a5ec2bd4
3 changed files with 106 additions and 35 deletions

View File

@@ -8,7 +8,10 @@ class Printer::CashierStationPrinter < Printer::PrinterWorker
#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")
#no print in cloud server
if ENV["SERVER_MODE"] != "cloud"
self.print("tmp/cashier_station_#{order_id}_closing_#{time}.pdf")
end
end
# def print_close_cashier(receipt_no)
@@ -59,7 +62,10 @@ class Printer::CashierStationPrinter < Printer::PrinterWorker
end
pdf.render_file filename
self.print(filename, cashier_terminal.printer_name)
#no print in cloud server
if ENV["SERVER_MODE"] != "cloud"
self.print(filename, cashier_terminal.printer_name)
end
end
#sqa
end