change config for local server

This commit is contained in:
Thein Lin Kyaw
2019-11-19 00:08:56 +06:30
parent acb101a7f1
commit f2b4114ad5
8 changed files with 111 additions and 116 deletions

View File

@@ -2,10 +2,9 @@ class Origami::DashboardController < BaseOrigamiController
def index
@shop = Shop.first
Rails.logger.info ENV["SERVER_MODE"]
Rails.logger.info "<><><><><><><><>>"
today = DateTime.now.strftime('%Y-%m-%d')
today = DateTime.now.strftime('%Y-%m-%d')
@display_type = Lookup.find_by_lookup_type("display_type")
@sale_data = Array.new
@@ -15,7 +14,7 @@ class Origami::DashboardController < BaseOrigamiController
if payment.payment_method == "mpu" || payment.payment_method == "visa" || payment.payment_method == "master" || payment.payment_method == "jcb" || payment.payment_method == "unionpay" || payment.payment_method == "alipay"
pay = Sale.payment_sale('card', today, current_user)
@sale_data.push({'card' => pay.payment_amount})
else
else
pay = Sale.payment_sale(payment.payment_method, today, current_user)
@sale_data.push({payment.payment_method => pay.payment_amount})
end
@@ -39,10 +38,10 @@ class Origami::DashboardController < BaseOrigamiController
end
else
@account_data = nil
end
end
@top_items = Sale.top_items(today,current_user)
@total_foc_items = Sale.total_foc_items(today,current_user)
@total_foc_items = Sale.total_foc_items(today,current_user)
# get printer info
@print_settings = PrintSetting.get_precision_delimiter()
@@ -105,12 +104,12 @@ class Origami::DashboardController < BaseOrigamiController
end
def get_all_menu
@menus = Menu.active.all
@menus = Menu.active.all
end
def get_credit_sales
credit_sales = SalePayment.get_credit_sales(params)
if !credit_sales.nil?
if !credit_sales.nil?
result = {:status=> true, :data=> credit_sales }
else
result = {:status=> false, :message=>"There is no record." }