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').empty();
|
||||||
$('#sub_total').append(fixed_total_price);
|
$('#sub_total').append(fixed_total_price);
|
||||||
|
|
||||||
if (fixed_total_price > 0) {
|
if (item_row.length > 0) {
|
||||||
$('.create').removeAttr("disabled", false);
|
$('.create').removeAttr("disabled", false);
|
||||||
}else{
|
}else{
|
||||||
$('.create').attr("disabled", true);
|
$('.create').attr("disabled", true);
|
||||||
@@ -888,6 +888,8 @@ $(function() {
|
|||||||
|
|
||||||
id = $(this).attr('id');
|
id = $(this).attr('id');
|
||||||
value = $(this).val();
|
value = $(this).val();
|
||||||
|
|
||||||
|
if ($.isNumeric(value)) {
|
||||||
$('.change_qty').attr('value',value);
|
$('.change_qty').attr('value',value);
|
||||||
if (id=="count") {
|
if (id=="count") {
|
||||||
price = $("#unit_price").text();
|
price = $("#unit_price").text();
|
||||||
@@ -908,6 +910,10 @@ $(function() {
|
|||||||
}
|
}
|
||||||
$("#set_total_price").text(total_price);
|
$("#set_total_price").text(total_price);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
$('#'+id).val(1);
|
||||||
|
swal("Opps","Please enter number for qty","warning");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/* $("input").keypress(function(){
|
/* $("input").keypress(function(){
|
||||||
|
|||||||
@@ -6,9 +6,6 @@
|
|||||||
@import "sweetalert/sweetalert.css";
|
@import "sweetalert/sweetalert.css";
|
||||||
@import "multi-select/css/multi-select.css";
|
@import "multi-select/css/multi-select.css";
|
||||||
@import "bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker";
|
@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 "morrisjs/morris";
|
||||||
@import "BSBMaterial/style";
|
@import "BSBMaterial/style";
|
||||||
@import "BSBMaterial/themes/all-themes";
|
@import "BSBMaterial/themes/all-themes";
|
||||||
@@ -120,3 +117,32 @@
|
|||||||
.bottom{
|
.bottom{
|
||||||
margin-bottom:1px;
|
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
|
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
|
@crm_customer = Customer.new
|
||||||
@count_customer = Customer.count_customer
|
@count_customer = Customer.count_customer
|
||||||
|
|
||||||
@taxes = TaxProfile.all.order("order_by asc")
|
@taxes = TaxProfile.all.order("order_by asc")
|
||||||
|
|
||||||
|
@filter = filter
|
||||||
|
|
||||||
# if flash["errors"]
|
# if flash["errors"]
|
||||||
# @crm_customer.valid?
|
# @crm_customer.valid?
|
||||||
# end
|
# 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 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 bookings as bk on bk.booking_id = bo.booking_id
|
||||||
left join dining_facilities as df on df.id = bk.dining_facility_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}%",)
|
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")
|
.order("assigned_order_items.assigned_order_item_id desc")
|
||||||
.group("odt.order_items_id")
|
.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 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 bookings as bk on bk.booking_id = bo.booking_id
|
||||||
left join dining_facilities as df on df.id = bk.dining_facility_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}%",)
|
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")
|
.group("assigned_order_items.order_id")
|
||||||
.limit(20)
|
.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 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 bookings as bk on bk.booking_id = bo.booking_id
|
||||||
left join dining_facilities as df on df.id = bk.dining_facility_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}%",)
|
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")
|
.group("oqs.id")
|
||||||
|
|
||||||
|
|||||||
@@ -72,6 +72,6 @@ class Settings::MembershipActionsController < ApplicationController
|
|||||||
|
|
||||||
# Never trust parameters from the scary internet, only allow the white list through.
|
# Never trust parameters from the scary internet, only allow the white list through.
|
||||||
def settings_membership_action_params
|
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
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -71,6 +71,6 @@ class Settings::ShopsController < ApplicationController
|
|||||||
|
|
||||||
# Never trust parameters from the scary internet, only allow the white list through.
|
# Never trust parameters from the scary internet, only allow the white list through.
|
||||||
def shop_params
|
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
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class Transactions::OrdersController < ApplicationController
|
|||||||
def show
|
def show
|
||||||
|
|
||||||
@order = Order.find(params[:id])
|
@order = Order.find(params[:id])
|
||||||
|
@dining = BookingOrder.find_by_order_id(@order.order_id).booking.dining_facility
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # show.html.erb
|
format.html # show.html.erb
|
||||||
format.json { render json: @order }
|
format.json { render json: @order }
|
||||||
|
|||||||
@@ -6,13 +6,14 @@ class OrderQueueProcessorJob < ApplicationJob
|
|||||||
#Order ID
|
#Order ID
|
||||||
|
|
||||||
order = Order.find(order_id)
|
order = Order.find(order_id)
|
||||||
assign_order = AssignedOrderItem.assigned_order_item_by_job(order_id)
|
|
||||||
|
|
||||||
#Execute orders and send to order stations
|
#Execute orders and send to order stations
|
||||||
if order
|
if order
|
||||||
oqs = OrderQueueStation.new
|
oqs = OrderQueueStation.new
|
||||||
oqs.process_order(order, table_id)
|
oqs.process_order(order, table_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
assign_order = AssignedOrderItem.assigned_order_item_by_job(order_id)
|
||||||
ActionCable.server.broadcast "order_queue_station_channel",order: assign_order
|
ActionCable.server.broadcast "order_queue_station_channel",order: assign_order
|
||||||
end
|
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 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 bookings as bk on bk.booking_id = bo.booking_id
|
||||||
left join dining_facilities as df on df.id = bk.dining_facility_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")
|
.order("assigned_order_items.assigned_order_item_id desc")
|
||||||
.group("assigned_order_items.assigned_order_item_id")
|
.group("assigned_order_items.assigned_order_item_id")
|
||||||
return order_item
|
return order_item
|
||||||
|
|||||||
@@ -69,10 +69,10 @@ class OrderQueueStation < ApplicationRecord
|
|||||||
# AssignedOrderItem.assigned_order_item(order, order_item.item_code, oqs)
|
# AssignedOrderItem.assigned_order_item(order, order_item.item_code, oqs)
|
||||||
# else
|
# 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)
|
AssignedOrderItem.assigned_order_item(order, order_item.item_code, order_item.item_instance_code, oqs)
|
||||||
oqs_order_items.push(order_item)
|
oqs_order_items.push(order_item)
|
||||||
end
|
# end
|
||||||
# end
|
# end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
filename = "tmp/order_item.pdf"
|
filename = "tmp/order_item.pdf"
|
||||||
|
|
||||||
# check for item not to show
|
# 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 = OrderItemPdf.new(print_settings,order_item[0], print_status, options, oqs.use_alternate_name)
|
||||||
pdf.render_file filename
|
pdf.render_file filename
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
else
|
else
|
||||||
self.print(filename, oqs.printer_name)
|
self.print(filename, oqs.printer_name)
|
||||||
end
|
end
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Query for per order
|
# Query for per order
|
||||||
@@ -40,7 +40,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
options = odi.options == "[]"? "" : odi.options
|
options = odi.options == "[]"? "" : odi.options
|
||||||
|
|
||||||
# check for item not to show
|
# 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 = OrderItemPdf.new(print_settings,odi, print_status, options, oqs.use_alternate_name)
|
||||||
# pdf.render_file "tmp/order_item.pdf"
|
# pdf.render_file "tmp/order_item.pdf"
|
||||||
pdf.render_file filename
|
pdf.render_file filename
|
||||||
@@ -51,7 +51,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
else
|
else
|
||||||
self.print(filename, oqs.printer_name)
|
self.print(filename, oqs.printer_name)
|
||||||
end
|
end
|
||||||
end
|
#end
|
||||||
end
|
end
|
||||||
# For Print Order Summary
|
# For Print Order Summary
|
||||||
else
|
else
|
||||||
@@ -81,7 +81,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
options = odi.options == "[]"? "" : odi.options
|
options = odi.options == "[]"? "" : odi.options
|
||||||
|
|
||||||
# check for item not to show
|
# 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 = OrderItemPdf.new(print_settings,odi, print_status, options,oqs.use_alternate_name)
|
||||||
pdf.render_file filename
|
pdf.render_file filename
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
else
|
else
|
||||||
self.print(filename, oqs.printer_name)
|
self.print(filename, oqs.printer_name)
|
||||||
end
|
end
|
||||||
end
|
#end
|
||||||
end
|
end
|
||||||
# For Print Order Summary
|
# For Print Order Summary
|
||||||
else
|
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 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 customers as cus ON cus.customer_id = orders.customer_id
|
||||||
left join menu_items as item ON item.item_code = order_items.item_code")
|
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")
|
.group("order_items.item_code")
|
||||||
elsif type == "order_summary"
|
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")
|
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 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 customers as cus ON cus.customer_id = orders.customer_id
|
||||||
left join menu_items as item ON item.item_code = order_items.item_code")
|
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")
|
.group("order_items.order_items_id")
|
||||||
else
|
else
|
||||||
# order summary for booking
|
# 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 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 customers as cus ON cus.customer_id = orders.customer_id
|
||||||
left join menu_items as item ON item.item_code = order_items.item_code")
|
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
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ class OrderSummaryPdf < Prawn::Document
|
|||||||
|
|
||||||
order_item.each do|odi|
|
order_item.each do|odi|
|
||||||
# check for item not to show
|
# check for item not to show
|
||||||
if odi.price != 0
|
# if odi.price != 0
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
|
|
||||||
bounding_box([0,y_position], :width => self.item_width) do
|
bounding_box([0,y_position], :width => self.item_width) do
|
||||||
@@ -148,7 +148,7 @@ class OrderSummaryPdf < Prawn::Document
|
|||||||
dash(1, :space => 1, :phase => 1)
|
dash(1, :space => 1, :phase => 1)
|
||||||
stroke_horizontal_line 0, (self.page_width - self.margin)
|
stroke_horizontal_line 0, (self.page_width - self.margin)
|
||||||
move_down 5
|
move_down 5
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ json.options opt_format
|
|||||||
# json.item_attributes = item_instance.item_attributes
|
# json.item_attributes = item_instance.item_attributes
|
||||||
|
|
||||||
json.instances item.menu_item_instances do |is|
|
json.instances item.menu_item_instances do |is|
|
||||||
|
if is.is_available
|
||||||
# Convert id to name for attributes
|
# Convert id to name for attributes
|
||||||
instance_attr = []
|
instance_attr = []
|
||||||
|
|
||||||
@@ -110,6 +111,7 @@ json.instances item.menu_item_instances do |is|
|
|||||||
json.promotion_price is.promotion_price
|
json.promotion_price is.promotion_price
|
||||||
json.values instance_attr
|
json.values instance_attr
|
||||||
# json.item_sets is.item_sets
|
# json.item_sets is.item_sets
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#Child Menu items
|
#Child Menu items
|
||||||
|
|||||||
@@ -13,8 +13,6 @@
|
|||||||
<div class="row clearfix">
|
<div class="row clearfix">
|
||||||
<div class="col-lg-9 col-md-9 col-sm-9">
|
<div class="col-lg-9 col-md-9 col-sm-9">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="body">
|
|
||||||
<!-- <div class="main-box-body clearfix"> -->
|
|
||||||
<div class="body table-responsive">
|
<div class="body table-responsive">
|
||||||
<table class="table table-hover table-striped">
|
<table class="table table-hover table-striped">
|
||||||
<!-- <div class="table-responsive">
|
<!-- <div class="table-responsive">
|
||||||
@@ -55,9 +53,9 @@
|
|||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<% if @crm_customers.count > 0 %>
|
||||||
<% @i = 0 %>
|
<% @i = 0 %>
|
||||||
<% @crm_customers.each do |crm_customer| %>
|
<% @crm_customers.each do |crm_customer| %>
|
||||||
|
|
||||||
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
|
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
|
||||||
<td>
|
<td>
|
||||||
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
|
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
|
||||||
@@ -73,18 +71,16 @@
|
|||||||
<td><%= crm_customer.contact_no %></td>
|
<td><%= crm_customer.contact_no %></td>
|
||||||
<td><%= crm_customer.email %></td>
|
<td><%= crm_customer.email %></td>
|
||||||
<td><%= link_to t("views.btn.show"), crm_customer_path(crm_customer) %></td>
|
<td><%= link_to t("views.btn.show"), crm_customer_path(crm_customer) %></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<% end %>
|
<% 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>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<%= paginate @crm_customers %>
|
<%= paginate @crm_customers %>
|
||||||
</div>
|
</div>
|
||||||
<!-- </div> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ json.options opt_format
|
|||||||
# json.item_attributes = item_instance.item_attributes
|
# json.item_attributes = item_instance.item_attributes
|
||||||
|
|
||||||
json.instances item.menu_item_instances do |is|
|
json.instances item.menu_item_instances do |is|
|
||||||
|
if is.is_available
|
||||||
# Convert id to name for attributes
|
# Convert id to name for attributes
|
||||||
instance_attr = []
|
instance_attr = []
|
||||||
is.item_attributes.each do |ia|
|
is.item_attributes.each do |ia|
|
||||||
@@ -107,6 +108,7 @@ json.instances item.menu_item_instances do |is|
|
|||||||
json.promotion_price is.promotion_price
|
json.promotion_price is.promotion_price
|
||||||
json.values instance_attr
|
json.values instance_attr
|
||||||
# json.item_sets is.item_sets
|
# json.item_sets is.item_sets
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#Child Menu items
|
#Child Menu items
|
||||||
|
|||||||
@@ -140,7 +140,7 @@
|
|||||||
|
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</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">
|
<span class="input-group-btn">
|
||||||
<button type="button" class="btn btn-success btn-number" value="+" id="plus">
|
<button type="button" class="btn btn-success btn-number" value="+" id="plus">
|
||||||
<i class="material-icons">add</i>
|
<i class="material-icons">add</i>
|
||||||
@@ -214,7 +214,7 @@
|
|||||||
<i class="material-icons">remove</i>
|
<i class="material-icons">remove</i>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</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">
|
<span class="input-group-btn">
|
||||||
<button type="button" class="btn btn-success btn-number" value="+" id="set_plus">
|
<button type="button" class="btn btn-success btn-number" value="+" id="set_plus">
|
||||||
<i class="material-icons">add</i>
|
<i class="material-icons">add</i>
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
<%= f.input :gateway_url %>
|
<%= f.input :gateway_url %>
|
||||||
<%= f.input :auth_token %>
|
<%= f.input :auth_token %>
|
||||||
<%= f.input :merchant_account_id %>
|
<%= f.input :merchant_account_id %>
|
||||||
<%= f.input :additional_parameter, as: :text %>
|
|
||||||
<%= f.input :created_by %>
|
<%= f.input :created_by %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,9 @@
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= t("views.right_panel.detail.order_id") %></th>
|
<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("views.right_panel.detail.type") %></th>
|
||||||
<th><%= t :customer %></th>
|
<th><%= t :customer %></th>
|
||||||
<th><%= t("views.right_panel.detail.order_status") %></th>
|
<th><%= t("views.right_panel.detail.order_status") %></th>
|
||||||
@@ -57,10 +60,14 @@
|
|||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @orders.each do |order| %>
|
<% @orders.each do |order|
|
||||||
|
@dining = BookingOrder.find_by_order_id(order.order_id).booking.dining_facility
|
||||||
|
%>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= link_to order.order_id, transactions_order_path(order) %></td>
|
<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.order_type %></td>
|
||||||
<td><%= order.customer.name rescue '-' %></td>
|
<td><%= order.customer.name rescue '-' %></td>
|
||||||
<td><%= order.status %></td>
|
<td><%= order.status %></td>
|
||||||
|
|||||||
@@ -17,21 +17,25 @@
|
|||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<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("views.right_panel.detail.type") %></th>
|
||||||
<th><%= t :customer %></th>
|
<th><%= t :customer %></th>
|
||||||
<th><%= t("views.right_panel.detail.order_status") %></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_date") %></th>
|
||||||
<th><%= t("views.right_panel.detail.order_by") %></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><%= @dining.type %>-<%= @dining.name %></td>
|
||||||
|
<td> <%= @order.waiters rescue '-' %> </td>
|
||||||
<td><%= @order.order_type %></td>
|
<td><%= @order.order_type %></td>
|
||||||
<td><%= @order.customer.name rescue '-' %></td>
|
<td><%= @order.customer.name rescue '-' %></td>
|
||||||
<td><%= @order.status %></td>
|
<td><%= @order.status %></td>
|
||||||
<td> <%= @order.date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> </td>
|
<td> <%= @order.date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> </td>
|
||||||
<td> <%= @order.waiters rescue '-' %> </td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Reference in New Issue
Block a user