update cache menu

This commit is contained in:
Aung Myo
2018-05-08 15:47:11 +06:30
parent be9218dd79
commit 2d73e63e7b
12 changed files with 634 additions and 248 deletions

View File

@@ -3,6 +3,8 @@ class Origami::DashboardController < BaseOrigamiController
def index
@shop = Shop.first
today = DateTime.now.strftime('%Y-%m-%d')
# @orders = Sale::where("payment_status='new' and sale_status='bill' and DATE_FORMAT(receipt_date,'%Y-%m-%d') = '#{today}'").count()
# @sales = Sale::where("payment_status='paid' and sale_status='completed' and DATE_FORMAT(receipt_date,'%Y-%m-%d') = '#{today}'").count()
@@ -81,4 +83,8 @@ class Origami::DashboardController < BaseOrigamiController
end
end
def get_all_menu
@menus = Menu.all
end
end