auto checkin color change

This commit is contained in:
Yan
2017-12-13 16:50:40 +06:30
8 changed files with 80 additions and 3 deletions

View File

@@ -2,6 +2,8 @@ class BaseOrigamiController < ActionController::Base
include LoginVerification
layout "origami"
before_action :checkin_process
#before_action :check_installation
protect_from_forgery with: :exception
rescue_from CanCan::AccessDenied do |exception|
@@ -13,4 +15,7 @@ class BaseOrigamiController < ActionController::Base
@current_user ||= Employee.find_by_token_session(session[:session_token]) if session[:session_token]
end
def checkin_process
CheckinJob.set(wait: 30.seconds).perform_later()
end
end

View File

@@ -72,7 +72,7 @@ class HomeController < ApplicationController
@hourly_sales = Sale.hourly_sales(today).sum(:grand_total)
# .group_by_hour(:created_at, :time_zone => 'Asia/Rangoon',format: '%I:%p')
# .sum(:grand_total)
@employee_sales = Sale.employee_sales(today).sum(:grand_total)
@employee_sales = Sale.employee_sales(today).sum('total_amount')
@inventories = StockJournal.inventory_balances(today).sum(:balance)
@total_sale = Sale.total_sale(today)