Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes
This commit is contained in:
@@ -762,7 +762,7 @@ $(function() {
|
||||
$('#sub_total').empty();
|
||||
$('#sub_total').append(fixed_total_price);
|
||||
|
||||
if (fixed_total_price > 0) {
|
||||
if (item_row.length > 0) {
|
||||
$('.create').removeAttr("disabled", false);
|
||||
}else{
|
||||
$('.create').attr("disabled", true);
|
||||
@@ -886,27 +886,33 @@ $(function() {
|
||||
|
||||
$('.keypress_qty').keyup(function(e){
|
||||
|
||||
id = $(this).attr('id');
|
||||
id = $(this).attr('id');
|
||||
value = $(this).val();
|
||||
$('.change_qty').attr('value',value);
|
||||
if (id=="count") {
|
||||
price = $("#unit_price").text();
|
||||
$("#total_price").text(value*price);
|
||||
}else{
|
||||
var item_row = $('.selected-instance');
|
||||
price = $("#set_unit_price").text();
|
||||
set_total_price = $("#set_total_price").text();
|
||||
$(".set_change_qty").val(value);
|
||||
if (item_row.length > 1) {
|
||||
total = 0 ;
|
||||
$(item_row).each(function(i){
|
||||
total += value * $(item_row[i]).attr('data-price');
|
||||
total_price = total;
|
||||
});
|
||||
|
||||
if ($.isNumeric(value)) {
|
||||
$('.change_qty').attr('value',value);
|
||||
if (id=="count") {
|
||||
price = $("#unit_price").text();
|
||||
$("#total_price").text(value*price);
|
||||
}else{
|
||||
total_price = value*price;
|
||||
var item_row = $('.selected-instance');
|
||||
price = $("#set_unit_price").text();
|
||||
set_total_price = $("#set_total_price").text();
|
||||
$(".set_change_qty").val(value);
|
||||
if (item_row.length > 1) {
|
||||
total = 0 ;
|
||||
$(item_row).each(function(i){
|
||||
total += value * $(item_row[i]).attr('data-price');
|
||||
total_price = total;
|
||||
});
|
||||
}else{
|
||||
total_price = value*price;
|
||||
}
|
||||
$("#set_total_price").text(total_price);
|
||||
}
|
||||
$("#set_total_price").text(total_price);
|
||||
}else{
|
||||
$('#'+id).val(1);
|
||||
swal("Opps","Please enter number for qty","warning");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -6,9 +6,6 @@
|
||||
@import "sweetalert/sweetalert.css";
|
||||
@import "multi-select/css/multi-select.css";
|
||||
@import "bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker";
|
||||
@import "jquery-ui/jquery-ui.css";
|
||||
@import "jquery-ui/jquery-ui.structure.css";
|
||||
@import "jquery-ui/jquery-ui.theme.css";
|
||||
@import "morrisjs/morris";
|
||||
@import "BSBMaterial/style";
|
||||
@import "BSBMaterial/themes/all-themes";
|
||||
@@ -120,3 +117,32 @@
|
||||
.bottom{
|
||||
margin-bottom:1px;
|
||||
}
|
||||
|
||||
/*Pagination*/
|
||||
nav.pagination {
|
||||
margin:10px;
|
||||
|
||||
}
|
||||
nav.pagination .current{
|
||||
background-color:#1f91f3;
|
||||
color:#fff;
|
||||
padding:4px 10px;
|
||||
margin-top:-4px;
|
||||
}
|
||||
nav.pagination .page a,.next a,.last a,.prev a,.first a{
|
||||
padding:6.5px 10px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
nav.pagination .page a:hover,
|
||||
a:focus {
|
||||
background-color: #ccc;
|
||||
text-decoration: none;
|
||||
|
||||
}
|
||||
nav.pagination .page a:hover,
|
||||
.first a:hover,.last a:hover,.prev a:hover,.next a:hover{
|
||||
background-color: #ccc;
|
||||
text-decoration: none;
|
||||
|
||||
}
|
||||
|
||||
@@ -33,12 +33,14 @@ class Crm::CustomersController < BaseCrmController
|
||||
end
|
||||
end
|
||||
end
|
||||
@crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(15)
|
||||
@crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(20)
|
||||
@crm_customer = Customer.new
|
||||
@count_customer = Customer.count_customer
|
||||
|
||||
@taxes = TaxProfile.all.order("order_by asc")
|
||||
|
||||
@filter = filter
|
||||
|
||||
# if flash["errors"]
|
||||
# @crm_customer.valid?
|
||||
# end
|
||||
|
||||
@@ -125,7 +125,7 @@ class Oqs::HomeController < BaseOqsController
|
||||
left join booking_orders as bo on bo.order_id = assigned_order_items.order_id
|
||||
left join bookings as bk on bk.booking_id = bo.booking_id
|
||||
left join dining_facilities as df on df.id = bk.dining_facility_id")
|
||||
.where("assigned_order_items.delivery_status = #{status} AND odt.price <> 0 AND assigned_order_items.created_at >= '#{Time.now.beginning_of_day.utc}' #{oqs} ")
|
||||
.where("assigned_order_items.delivery_status = #{status} AND assigned_order_items.created_at >= '#{Time.now.beginning_of_day.utc}' #{oqs} ")
|
||||
query = query.where("df.name LIKE ? OR odt.order_id LIKE ? OR odt.item_name LIKE ? OR cus.name = '#{filter}'","%#{filter}%","%#{filter}%","%#{filter}%",)
|
||||
.order("assigned_order_items.assigned_order_item_id desc")
|
||||
.group("odt.order_items_id")
|
||||
@@ -143,7 +143,7 @@ class Oqs::HomeController < BaseOqsController
|
||||
left join booking_orders as bo on bo.order_id = assigned_order_items.order_id
|
||||
left join bookings as bk on bk.booking_id = bo.booking_id
|
||||
left join dining_facilities as df on df.id = bk.dining_facility_id")
|
||||
.where("assigned_order_items.delivery_status = true AND odt.price <> 0 AND assigned_order_items.created_at between '#{Time.now.beginning_of_day.utc}' and '#{Time.now.end_of_day.utc}'")
|
||||
.where("assigned_order_items.delivery_status = true AND assigned_order_items.created_at between '#{Time.now.beginning_of_day.utc}' and '#{Time.now.end_of_day.utc}'")
|
||||
query = query.where("df.name LIKE ? OR odt.order_id LIKE ? OR odt.item_name LIKE ? OR cus.name = '#{filter}'","%#{filter}%","%#{filter}%","%#{filter}%",)
|
||||
.group("assigned_order_items.order_id")
|
||||
.limit(20)
|
||||
@@ -162,7 +162,7 @@ class Oqs::HomeController < BaseOqsController
|
||||
left join booking_orders as bo on bo.order_id = assigned_order_items.order_id
|
||||
left join bookings as bk on bk.booking_id = bo.booking_id
|
||||
left join dining_facilities as df on df.id = bk.dining_facility_id")
|
||||
.where("assigned_order_items.delivery_status = #{status} AND odt.price <> 0 AND assigned_order_items.created_at >= '#{Time.now.beginning_of_day.utc}' ")
|
||||
.where("assigned_order_items.delivery_status = #{status} AND assigned_order_items.created_at >= '#{Time.now.beginning_of_day.utc}' ")
|
||||
query = query.where("df.name LIKE ? OR odt.order_id LIKE ? OR odt.item_name LIKE ? OR cus.name = '#{filter}'","%#{filter}%","%#{filter}%","%#{filter}%",)
|
||||
.group("oqs.id")
|
||||
|
||||
|
||||
@@ -72,6 +72,6 @@ class Settings::MembershipActionsController < ApplicationController
|
||||
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
def settings_membership_action_params
|
||||
params.require(:membership_action).permit(:membership_type, :is_active, :gateway_communication_type, :gateway_url, :auth_token, :merchant_account_id, :created_by, :additional_parameter)
|
||||
params.require(:membership_action).permit(:membership_type, :is_active, :gateway_communication_type, :gateway_url, :auth_token, :merchant_account_id, :created_by)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -71,6 +71,6 @@ class Settings::ShopsController < ApplicationController
|
||||
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
def shop_params
|
||||
params.require(:shop).permit(:name,:address,:city,:township,:state,:country,:phone_no,:reservation_no,:license,:activated_at,:license_data,:base_currency,:cloud_token,:cloud_url,:owner_token,:id_prefix,:is_rounding_adj,:quick_sale_summary,:calc_tax_order)
|
||||
params.require(:shop).permit(:name,:address,:city,:township,:state,:country,:phone_no,:reservation_no,:license,:activated_at,:license_data,:base_currency,:cloud_token,:cloud_url,:owner_token,:id_prefix,:is_rounding_adj,:quick_sale_summary,:calc_tax_order,:show_account_info)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -34,7 +34,7 @@ class Transactions::OrdersController < ApplicationController
|
||||
def show
|
||||
|
||||
@order = Order.find(params[:id])
|
||||
|
||||
@dining = BookingOrder.find_by_order_id(@order.order_id).booking.dining_facility
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.json { render json: @order }
|
||||
|
||||
@@ -5,14 +5,15 @@ class OrderQueueProcessorJob < ApplicationJob
|
||||
# Do something later
|
||||
#Order ID
|
||||
|
||||
order = Order.find(order_id)
|
||||
assign_order = AssignedOrderItem.assigned_order_item_by_job(order_id)
|
||||
order = Order.find(order_id)
|
||||
|
||||
#Execute orders and send to order stations
|
||||
if order
|
||||
oqs = OrderQueueStation.new
|
||||
oqs.process_order(order, table_id)
|
||||
end
|
||||
|
||||
assign_order = AssignedOrderItem.assigned_order_item_by_job(order_id)
|
||||
ActionCable.server.broadcast "order_queue_station_channel",order: assign_order
|
||||
end
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class AssignedOrderItem < ApplicationRecord
|
||||
left join booking_orders as bo on bo.order_id = assigned_order_items.order_id
|
||||
left join bookings as bk on bk.booking_id = bo.booking_id
|
||||
left join dining_facilities as df on df.id = bk.dining_facility_id")
|
||||
.where("assigned_order_items.order_id = '#{order_id}' AND assigned_order_items.delivery_status = false AND odt.price <> 0 AND assigned_order_items.created_at >= '#{Time.now.beginning_of_day.utc}' ")
|
||||
.where("assigned_order_items.order_id = '#{order_id}' AND assigned_order_items.delivery_status = false AND assigned_order_items.created_at >= '#{Time.now.beginning_of_day.utc}' ")
|
||||
.order("assigned_order_items.assigned_order_item_id desc")
|
||||
.group("assigned_order_items.assigned_order_item_id")
|
||||
return order_item
|
||||
|
||||
@@ -69,10 +69,10 @@ class OrderQueueStation < ApplicationRecord
|
||||
# AssignedOrderItem.assigned_order_item(order, order_item.item_code, oqs)
|
||||
# else
|
||||
|
||||
if (order_item.price != 0)
|
||||
# if (order_item.price != 0)
|
||||
AssignedOrderItem.assigned_order_item(order, order_item.item_code, order_item.item_instance_code, oqs)
|
||||
oqs_order_items.push(order_item)
|
||||
end
|
||||
# end
|
||||
# end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,7 +9,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
filename = "tmp/order_item.pdf"
|
||||
|
||||
# check for item not to show
|
||||
if order_item[0].price != 0
|
||||
# if order_item[0].price != 0
|
||||
pdf = OrderItemPdf.new(print_settings,order_item[0], print_status, options, oqs.use_alternate_name)
|
||||
pdf.render_file filename
|
||||
|
||||
@@ -22,7 +22,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
else
|
||||
self.print(filename, oqs.printer_name)
|
||||
end
|
||||
end
|
||||
# end
|
||||
end
|
||||
|
||||
# Query for per order
|
||||
@@ -40,7 +40,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
options = odi.options == "[]"? "" : odi.options
|
||||
|
||||
# check for item not to show
|
||||
if odi.price != 0
|
||||
#if odi.price != 0
|
||||
pdf = OrderItemPdf.new(print_settings,odi, print_status, options, oqs.use_alternate_name)
|
||||
# pdf.render_file "tmp/order_item.pdf"
|
||||
pdf.render_file filename
|
||||
@@ -51,7 +51,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
else
|
||||
self.print(filename, oqs.printer_name)
|
||||
end
|
||||
end
|
||||
#end
|
||||
end
|
||||
# For Print Order Summary
|
||||
else
|
||||
@@ -81,7 +81,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
options = odi.options == "[]"? "" : odi.options
|
||||
|
||||
# check for item not to show
|
||||
if odi.price != 0
|
||||
#if odi.price != 0
|
||||
pdf = OrderItemPdf.new(print_settings,odi, print_status, options,oqs.use_alternate_name)
|
||||
pdf.render_file filename
|
||||
|
||||
@@ -94,7 +94,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
else
|
||||
self.print(filename, oqs.printer_name)
|
||||
end
|
||||
end
|
||||
#end
|
||||
end
|
||||
# For Print Order Summary
|
||||
else
|
||||
@@ -123,7 +123,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
left join dining_facilities AS df ON df.id = b.dining_facility_id
|
||||
left join customers as cus ON cus.customer_id = orders.customer_id
|
||||
left join menu_items as item ON item.item_code = order_items.item_code")
|
||||
.where("order_items.item_instance_code = '#{ id }' AND order_items.price != 0")
|
||||
.where("order_items.item_instance_code = '#{ id }'")
|
||||
.group("order_items.item_code")
|
||||
elsif type == "order_summary"
|
||||
OrderItem.select("order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, cus.name as customer, df.type, df.name as dining,item.alt_name as alt_name")
|
||||
@@ -133,7 +133,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
left join dining_facilities AS df ON df.id = b.dining_facility_id
|
||||
left join customers as cus ON cus.customer_id = orders.customer_id
|
||||
left join menu_items as item ON item.item_code = order_items.item_code")
|
||||
.where("orders.order_id = '#{ id }' AND order_items.price != 0")
|
||||
.where("orders.order_id = '#{ id }'")
|
||||
.group("order_items.order_items_id")
|
||||
else
|
||||
# order summary for booking
|
||||
@@ -144,7 +144,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
left join dining_facilities AS df ON df.id = b.dining_facility_id
|
||||
left join customers as cus ON cus.customer_id = orders.customer_id
|
||||
left join menu_items as item ON item.item_code = order_items.item_code")
|
||||
.where("b.booking_id = '#{ id }' AND order_items.price != 0")
|
||||
.where("b.booking_id = '#{ id }'")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -104,7 +104,7 @@ class OrderSummaryPdf < Prawn::Document
|
||||
|
||||
order_item.each do|odi|
|
||||
# check for item not to show
|
||||
if odi.price != 0
|
||||
# if odi.price != 0
|
||||
y_position = cursor
|
||||
|
||||
bounding_box([0,y_position], :width => self.item_width) do
|
||||
@@ -148,7 +148,7 @@ class OrderSummaryPdf < Prawn::Document
|
||||
dash(1, :space => 1, :phase => 1)
|
||||
stroke_horizontal_line 0, (self.page_width - self.margin)
|
||||
move_down 5
|
||||
end
|
||||
# end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -90,26 +90,28 @@ json.options opt_format
|
||||
# json.item_attributes = item_instance.item_attributes
|
||||
|
||||
json.instances item.menu_item_instances do |is|
|
||||
# Convert id to name for attributes
|
||||
instance_attr = []
|
||||
if is.is_available
|
||||
# Convert id to name for attributes
|
||||
instance_attr = []
|
||||
|
||||
is.item_attributes.each do |ia|
|
||||
# mItemAttr = MenuItemAttribute.find(is)
|
||||
# instance_attr.push(ia)
|
||||
mItemAttr = MenuItemAttribute.find(ia).name
|
||||
instance_attr.push(mItemAttr)
|
||||
is.item_attributes.each do |ia|
|
||||
# mItemAttr = MenuItemAttribute.find(is)
|
||||
# instance_attr.push(ia)
|
||||
mItemAttr = MenuItemAttribute.find(ia).name
|
||||
instance_attr.push(mItemAttr)
|
||||
end
|
||||
|
||||
json.id is.id
|
||||
json.code is.item_instance_code
|
||||
json.name is.item_instance_name
|
||||
json.price is.price
|
||||
json.is_available is.is_available
|
||||
json.is_default is.is_default
|
||||
json.is_on_promotion is.is_on_promotion
|
||||
json.promotion_price is.promotion_price
|
||||
json.values instance_attr
|
||||
# json.item_sets is.item_sets
|
||||
end
|
||||
|
||||
json.id is.id
|
||||
json.code is.item_instance_code
|
||||
json.name is.item_instance_name
|
||||
json.price is.price
|
||||
json.is_available is.is_available
|
||||
json.is_default is.is_default
|
||||
json.is_on_promotion is.is_on_promotion
|
||||
json.promotion_price is.promotion_price
|
||||
json.values instance_attr
|
||||
# json.item_sets is.item_sets
|
||||
end
|
||||
|
||||
#Child Menu items
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-9 col-md-9 col-sm-9">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<!-- <div class="main-box-body clearfix"> -->
|
||||
<div class="body table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<!-- <div class="table-responsive">
|
||||
@@ -55,36 +53,34 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @i = 0 %>
|
||||
<% @crm_customers.each do |crm_customer| %>
|
||||
|
||||
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
|
||||
<td>
|
||||
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
|
||||
<td>
|
||||
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
|
||||
<%= @i += 1 %>
|
||||
<%else%>
|
||||
-
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= crm_customer.name %></td>
|
||||
<td><%= crm_customer.card_no rescue '-' %></td>
|
||||
<td><%= crm_customer.contact_no %></td>
|
||||
<td><%= crm_customer.email %></td>
|
||||
<td><%= link_to t("views.btn.show"), crm_customer_path(crm_customer) %></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<% if @crm_customers.count > 0 %>
|
||||
<% @i = 0 %>
|
||||
<% @crm_customers.each do |crm_customer| %>
|
||||
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
|
||||
<td>
|
||||
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
|
||||
<td>
|
||||
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
|
||||
<%= @i += 1 %>
|
||||
<%else%>
|
||||
-
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= crm_customer.name %></td>
|
||||
<td><%= crm_customer.card_no rescue '-' %></td>
|
||||
<td><%= crm_customer.contact_no %></td>
|
||||
<td><%= crm_customer.email %></td>
|
||||
<td><%= link_to t("views.btn.show"), crm_customer_path(crm_customer) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<tr><td colspan="7"><strong><p style="text-align: center;margin-bottom: -1px">There is no data for search <%=@filter%>....</p></strong></td></tr>
|
||||
<% end %>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<%= paginate @crm_customers %>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
|
||||
@@ -90,23 +90,25 @@ json.options opt_format
|
||||
# json.item_attributes = item_instance.item_attributes
|
||||
|
||||
json.instances item.menu_item_instances do |is|
|
||||
# Convert id to name for attributes
|
||||
instance_attr = []
|
||||
is.item_attributes.each do |ia|
|
||||
mItemAttr = MenuItemAttribute.find(ia).name
|
||||
instance_attr.push(mItemAttr)
|
||||
if is.is_available
|
||||
# Convert id to name for attributes
|
||||
instance_attr = []
|
||||
is.item_attributes.each do |ia|
|
||||
mItemAttr = MenuItemAttribute.find(ia).name
|
||||
instance_attr.push(mItemAttr)
|
||||
end
|
||||
|
||||
json.id is.id
|
||||
json.code is.item_instance_code
|
||||
json.name is.item_instance_name
|
||||
json.price is.price
|
||||
json.is_available is.is_available
|
||||
json.is_default is.is_default
|
||||
json.is_on_promotion is.is_on_promotion
|
||||
json.promotion_price is.promotion_price
|
||||
json.values instance_attr
|
||||
# json.item_sets is.item_sets
|
||||
end
|
||||
|
||||
json.id is.id
|
||||
json.code is.item_instance_code
|
||||
json.name is.item_instance_name
|
||||
json.price is.price
|
||||
json.is_available is.is_available
|
||||
json.is_default is.is_default
|
||||
json.is_on_promotion is.is_on_promotion
|
||||
json.promotion_price is.promotion_price
|
||||
json.values instance_attr
|
||||
# json.item_sets is.item_sets
|
||||
end
|
||||
|
||||
#Child Menu items
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
</button>
|
||||
</span>
|
||||
<input type="number" value="1" id="count" class="change_qty keypress_qty form-control col-md-12 ">
|
||||
<input type="text" value="1" id="count" class="change_qty keypress_qty form-control col-md-12 ">
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-success btn-number" value="+" id="plus">
|
||||
<i class="material-icons">add</i>
|
||||
@@ -214,7 +214,7 @@
|
||||
<i class="material-icons">remove</i>
|
||||
</button>
|
||||
</span>
|
||||
<input type="number" value="1" id="set_count" class="set_change_qty keypress_qty form-control col-md-12 ">
|
||||
<input type="text" value="1" id="set_count" class="set_change_qty keypress_qty form-control col-md-12 ">
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-success btn-number" value="+" id="set_plus">
|
||||
<i class="material-icons">add</i>
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
<%= f.input :gateway_url %>
|
||||
<%= f.input :auth_token %>
|
||||
<%= f.input :merchant_account_id %>
|
||||
<%= f.input :additional_parameter, as: :text %>
|
||||
<%= f.input :created_by %>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -48,6 +48,9 @@
|
||||
|
||||
<tr>
|
||||
<th><%= t("views.right_panel.detail.order_id") %></th>
|
||||
|
||||
<th><%= t :table %>/<%= t :room %></th>
|
||||
<th><%= t("views.right_panel.detail.order_by") %></th>
|
||||
<th><%= t("views.right_panel.detail.type") %></th>
|
||||
<th><%= t :customer %></th>
|
||||
<th><%= t("views.right_panel.detail.order_status") %></th>
|
||||
@@ -57,10 +60,14 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @orders.each do |order| %>
|
||||
<% @orders.each do |order|
|
||||
@dining = BookingOrder.find_by_order_id(order.order_id).booking.dining_facility
|
||||
%>
|
||||
|
||||
<tr>
|
||||
<td><%= link_to order.order_id, transactions_order_path(order) %></td>
|
||||
<td><%= @dining.type %>-<%= @dining.name %></td>
|
||||
<td><%= order.waiters %></td>
|
||||
<td><%= order.order_type %></td>
|
||||
<td><%= order.customer.name rescue '-' %></td>
|
||||
<td><%= order.status %></td>
|
||||
|
||||
@@ -17,21 +17,25 @@
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t :table %>/<%= t :room %></th>
|
||||
<th><%= t("views.right_panel.detail.order_by") %></th>
|
||||
<th><%= t("views.right_panel.detail.type") %></th>
|
||||
<th><%= t :customer %></th>
|
||||
<th><%= t("views.right_panel.detail.order_status") %></th>
|
||||
<th><%= t("views.right_panel.detail.order_date") %></th>
|
||||
<th><%= t("views.right_panel.detail.order_by") %></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><%= @dining.type %>-<%= @dining.name %></td>
|
||||
<td> <%= @order.waiters rescue '-' %> </td>
|
||||
<td><%= @order.order_type %></td>
|
||||
<td><%= @order.customer.name rescue '-' %></td>
|
||||
<td><%= @order.status %></td>
|
||||
<td> <%= @order.date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> </td>
|
||||
<td> <%= @order.waiters rescue '-' %> </td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user