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

This commit is contained in:
phyusin
2018-02-20 13:34:11 +06:30
3 changed files with 28 additions and 9 deletions

View File

@@ -92,6 +92,11 @@ class ApplicationController < ActionController::Base
@current_user ||= Employee.find_by_token_session(session[:session_token]) if session[:session_token]
end
# Get current Cashier
def get_cashier
@cashier = Employee.where("role = 'cashier' AND token_session <> ''")
end
def current_company
begin
return Company.first