Merge branch 'master' into cloud

This commit is contained in:
Yan
2017-12-13 18:30:39 +06:30
11 changed files with 114 additions and 27 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)

View File

@@ -37,7 +37,7 @@ class Origami::OtherChargesController < BaseOrigamiController
sale_item.qty = 1
sale_item.unit_price = di["price"]
sale_item.taxable_price = di["price"] * 1
sale_item.is_taxable = 1
sale_item.is_taxable = di["is_taxable"]
sale_item.account_id = 0
sale_item.price = di["price"] * 1