shop code
This commit is contained in:
@@ -18,9 +18,8 @@ class HomeController < ApplicationController
|
||||
|
||||
def index
|
||||
# @employees = Employee.all_emp_except_waiter.order("name asc")
|
||||
shop = Shop.current_shop
|
||||
@employees = Employee.all.where("shop_code='#{shop.shop_code}' and is_active = true").order("name asc")
|
||||
@roles = Employee.where("shop_code='#{shop.shop_code}'").distinct.pluck(:role)
|
||||
@employees = Employee.all.where("shop_code='#{@shop.shop_code}' and is_active = true").order("name asc")
|
||||
@roles = Employee.where("shop_code='#{@shop.shop_code}'").distinct.pluck(:role)
|
||||
|
||||
# byebug
|
||||
# @roles = Lookup.collection_of("employee_roles")
|
||||
@@ -97,8 +96,6 @@ class HomeController < ApplicationController
|
||||
def dashboard
|
||||
@from, @to = get_date_range_from_params
|
||||
|
||||
@shop = Shop.current_shop
|
||||
|
||||
@orders = Sale.receipt_date_between(@from, @to).where("payment_status = 'new' and sale_status = 'bill'")
|
||||
@sales = Sale.receipt_date_between(@from, @to).completed
|
||||
|
||||
|
||||
Reference in New Issue
Block a user