edit order on off with setting
This commit is contained in:
@@ -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.
|
=> 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.
|
=> 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
|
* ToDo list
|
||||||
|
|
||||||
|
|||||||
@@ -109,6 +109,19 @@ class Origami::HomeController < BaseOrigamiController
|
|||||||
if !lookup_spit_bill[0].nil?
|
if !lookup_spit_bill[0].nil?
|
||||||
@split_bill = lookup_spit_bill[0][1]
|
@split_bill = lookup_spit_bill[0][1]
|
||||||
end
|
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
|
||||||
|
|
||||||
def check_emp_access_code
|
def check_emp_access_code
|
||||||
|
|||||||
@@ -137,6 +137,19 @@ class Origami::RoomsController < BaseOrigamiController
|
|||||||
if !lookup_spit_bill[0].nil?
|
if !lookup_spit_bill[0].nil?
|
||||||
@split_bill = lookup_spit_bill[0][1]
|
@split_bill = lookup_spit_bill[0][1]
|
||||||
end
|
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
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -298,7 +298,7 @@
|
|||||||
sub_total = sub_total + (order_item.price * order_item.qty)
|
sub_total = sub_total + (order_item.price * order_item.qty)
|
||||||
|
|
||||||
# unless order_item.price == 0 %>
|
# unless order_item.price == 0 %>
|
||||||
<tr class="edit_order" data-id='<%= order_item.order_items_id %>'>
|
<tr class="<%= @edit_order_origami==true ? 'edit_order' : '' %>" data-id='<%= order_item.order_items_id %>'>
|
||||||
<td><%= count %></td>
|
<td><%= count %></td>
|
||||||
<td class='item-name'>
|
<td class='item-name'>
|
||||||
<%= order_item.item_name %>
|
<%= order_item.item_name %>
|
||||||
@@ -402,7 +402,7 @@
|
|||||||
set_item_prices = 0
|
set_item_prices = 0
|
||||||
count += 1
|
count += 1
|
||||||
%>
|
%>
|
||||||
<tr class="edit_order" data-id='<%= order_item.order_items_id %>'>
|
<tr class="<%= @edit_order_origami==true ? 'edit_order' : '' %>" data-id='<%= order_item.order_items_id %>'>
|
||||||
<td><%= count %>
|
<td><%= count %>
|
||||||
<td class='item-name'>
|
<td class='item-name'>
|
||||||
<%= order_item.item_name %>
|
<%= order_item.item_name %>
|
||||||
|
|||||||
@@ -287,7 +287,7 @@
|
|||||||
sub_total = sub_total + (order_item.price * order_item.qty)
|
sub_total = sub_total + (order_item.price * order_item.qty)
|
||||||
|
|
||||||
# unless order_item.price == 0 %>
|
# unless order_item.price == 0 %>
|
||||||
<tr class="edit_order" data-id='<%= order_item.order_items_id %>'>
|
<tr class="<%= @edit_order_origami== true ? 'edit_order' : ''%>" data-id='<%= order_item.order_items_id %>'>
|
||||||
<td><%= count %></td>
|
<td><%= count %></td>
|
||||||
<td class='item-name'>
|
<td class='item-name'>
|
||||||
<%= order_item.item_name %>
|
<%= order_item.item_name %>
|
||||||
@@ -391,7 +391,7 @@
|
|||||||
set_item_prices = 0
|
set_item_prices = 0
|
||||||
count += 1
|
count += 1
|
||||||
%>
|
%>
|
||||||
<tr class="edit_order" data-id='<%= order_item.order_items_id %>'>
|
<tr class="<%= @edit_order_origami== true ? 'edit_order' : ''%>" data-id='<%= order_item.order_items_id %>'>
|
||||||
<td><%= count %>
|
<td><%= count %>
|
||||||
<td class='item-name'>
|
<td class='item-name'>
|
||||||
<%= order_item.item_name %>
|
<%= order_item.item_name %>
|
||||||
|
|||||||
Reference in New Issue
Block a user