update applicaton contro and request bill

This commit is contained in:
Aung Myo
2018-02-20 09:37:30 +06:30
parent a15025c8a0
commit a2d0aee1ab
2 changed files with 7 additions and 1 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