diff --git a/README.md b/README.md index db67696d..923a6cc5 100755 --- a/README.md +++ b/README.md @@ -241,6 +241,8 @@ Menu Image (Import guideline) => Second, import [menu].xlsx file in /settings/menus and then checked image is uploaded into Application/[sxrestaurant]/public/image/menu_images and insert into menu_items table in database. => Last, if shop has shop_code, update marked/noted shop_code into shops table again. +For Edit Order Open & Close + 1) settings/lookups => {type:edit_order, name:EditOrderOrigami, value: {1 or 0}} * ToDo list diff --git a/app/controllers/origami/home_controller.rb b/app/controllers/origami/home_controller.rb index 1cd6505d..33fba2f2 100755 --- a/app/controllers/origami/home_controller.rb +++ b/app/controllers/origami/home_controller.rb @@ -109,6 +109,19 @@ class Origami::HomeController < BaseOrigamiController if !lookup_spit_bill[0].nil? @split_bill = lookup_spit_bill[0][1] end + + #for edit order open & close + @edit_order_origami = true + lookup_edit_order = Lookup.collection_of('edit_order') + if !lookup_edit_order.empty? + lookup_edit_order.each do |edit_order| + if edit_order[0].downcase == "editorderorigami" + if edit_order[1] == '0' && (current_login_employee.role == 'cashier' || current_login_employee.role == 'waiter') + @edit_order_origami = false + end + end + end + end end def check_emp_access_code diff --git a/app/controllers/origami/rooms_controller.rb b/app/controllers/origami/rooms_controller.rb index 49b7ce14..d81cf1bc 100755 --- a/app/controllers/origami/rooms_controller.rb +++ b/app/controllers/origami/rooms_controller.rb @@ -137,6 +137,19 @@ class Origami::RoomsController < BaseOrigamiController if !lookup_spit_bill[0].nil? @split_bill = lookup_spit_bill[0][1] end + + #for edit order open & close + @edit_order_origami = true + lookup_edit_order = Lookup.collection_of('edit_order') + if !lookup_edit_order.empty? + lookup_edit_order.each do |edit_order| + if edit_order[0].downcase == "editorderorigami" + if edit_order[1] == '0' && (current_login_employee.role == 'cashier' || current_login_employee.role == 'waiter') + @edit_order_origami = false + end + end + end + end end end diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index 11057247..d8085094 100755 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -298,7 +298,7 @@ sub_total = sub_total + (order_item.price * order_item.qty) # unless order_item.price == 0 %> -