Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes
This commit is contained in:
@@ -33,7 +33,7 @@ class License
|
||||
##Get redis connection from connection pool
|
||||
redis = Redis.new
|
||||
cache_license = redis.get(cache_key)
|
||||
|
||||
|
||||
Rails.logger.info "Cache key - " + cache_key.to_s
|
||||
if cache_license.nil?
|
||||
##change the d/e key
|
||||
|
||||
@@ -82,16 +82,17 @@ class Sale < ApplicationRecord
|
||||
current_shift = ShiftSale.current_shift
|
||||
shift = ShiftSale.current_open_shift(cashier.id)
|
||||
|
||||
# set cashier
|
||||
# set cashier
|
||||
if shift != nil
|
||||
self.cashier_id = cashier.id
|
||||
self.cashier_name = cashier.name
|
||||
self.shift_sale_id = shift.id
|
||||
else
|
||||
if open_cashier.nil?
|
||||
self.cashier_id = requested_by.id
|
||||
self.cashier_name = requested_by.name
|
||||
self.shift_sale_id = current_shift.id
|
||||
if open_cashier.count>0
|
||||
self.cashier_id = open_cashier[0].id
|
||||
self.cashier_name = open_cashier[0].name
|
||||
shift_id = ShiftSale.current_open_shift(open_cashier[0].id)
|
||||
self.shift_sale_id = shift_id.id
|
||||
else
|
||||
self.cashier_id = current_shift.employee_id
|
||||
self.cashier_name = Employee.find(current_shift.employee_id).name
|
||||
@@ -99,6 +100,7 @@ class Sale < ApplicationRecord
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# set waiter
|
||||
self.requested_by = requested_by.name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user