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

This commit is contained in:
Yan
2018-02-21 10:12:19 +06:30
13 changed files with 154 additions and 118 deletions

View File

@@ -93,6 +93,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