Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
Aung Myo
2018-08-14 17:21:23 +06:30
6 changed files with 31 additions and 22 deletions

View File

@@ -299,7 +299,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
end
# Check in-out time
def print_check_in_out(print_settings,booking, table)
def print_check_in_out(print_settings, cashier_terminal, booking, table)
#Use CUPS service
#Generate PDF
#Print
@@ -330,7 +330,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
#no print in cloud server
if ENV["SERVER_MODE"] != "cloud"
self.print(filename, print_settings.printer_name)
self.print(filename, cashier_terminal.printer_name)
end
end
end

View File

@@ -163,9 +163,7 @@ class Sale < ApplicationRecord
booking.sale_id = self.id
if !booking.checkout_at.nil?
if booking.checkout_at < Time.now.utc.getlocal
booking.checkout_at = Time.now.utc.getlocal
end
else
booking.checkout_at = Time.now.utc.getlocal
end