Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -76,6 +76,11 @@ App.order_reservation = App.cable.subscriptions.create('OrderReservationChannel'
|
||||
if (typeof customTableClick !== 'undefined' && $.isFunction(customTableClick)) {
|
||||
customTableClick();
|
||||
}
|
||||
|
||||
if(parseInt(getOnlineOrderCount()) > 0){
|
||||
$('.order_no').addClass("order-badge");
|
||||
$('.order_no').html(parseInt(getOnlineOrderCount()));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -64,7 +64,17 @@ $(document).ready(function() {
|
||||
|
||||
$('#modal-set-slimscroll').slimScroll({
|
||||
height: height-$('#modal-set-slimscroll').attr('data-height'),
|
||||
size: '5px',
|
||||
size: '10px',
|
||||
color: 'rgba(0,0,0,0.5)',
|
||||
alwaysVisible: false,
|
||||
borderRadius: '0',
|
||||
railBorderRadius: '0',
|
||||
touchScrollStep : 45
|
||||
});
|
||||
|
||||
$('#set-menu-item-slimscroll').slimScroll({
|
||||
height: height-$('#set-menu-item-slimscroll').attr('data-height'),
|
||||
size: '10px',
|
||||
color: 'rgba(0,0,0,0.5)',
|
||||
alwaysVisible: false,
|
||||
borderRadius: '0',
|
||||
@@ -176,4 +186,25 @@ function audioPlayBackground(shop_code,audio){
|
||||
audio.play();
|
||||
// },10000);
|
||||
}
|
||||
/* end order reservation function */
|
||||
/* end order reservation function */
|
||||
|
||||
/* online order count*/
|
||||
function getOnlineOrderCount(){
|
||||
var count = 0;
|
||||
//Start Ajax
|
||||
$.ajax({
|
||||
async: false,
|
||||
type: "GET",
|
||||
url: "/origami/get_order_info",
|
||||
dataType: "json",
|
||||
success: function(data){
|
||||
if(parseInt(data) > 0){
|
||||
count = parseInt(data);
|
||||
}
|
||||
}
|
||||
});
|
||||
//end Ajax
|
||||
// alert(count);
|
||||
return count;
|
||||
}
|
||||
/* online order count*/
|
||||
@@ -20,6 +20,7 @@ $(function() {
|
||||
$('#cancel').hide();
|
||||
$(".tbl_customer").hide();
|
||||
$(".order_close_cashier").hide();
|
||||
$(".order_btns").show();
|
||||
refreshDetailData();
|
||||
if (type == "pending") {
|
||||
$(".first-1").click();
|
||||
@@ -41,6 +42,7 @@ $(function() {
|
||||
}else if(type == "processed"){
|
||||
$(".fifth-1").click();
|
||||
$(".order_close_cashier").show();
|
||||
$(".order_btns").hide();
|
||||
// $('#accepted').hide();
|
||||
// $('#cancel').hide();
|
||||
}
|
||||
@@ -501,6 +503,10 @@ function callback_url(callback,ref_no,order_id,status,min_type,time,exptime,reas
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
if(parseInt(getOnlineOrderCount()) > 0){
|
||||
$('.order_no').addClass("order-badge");
|
||||
$('.order_no').html(parseInt(getOnlineOrderCount()));
|
||||
}
|
||||
}
|
||||
|
||||
function showNewOrderAlert(order_reservation,shop_code){
|
||||
@@ -601,4 +607,25 @@ function timeFormat(date){
|
||||
(isPM ? ' PM' : ' AM');
|
||||
return time;
|
||||
}
|
||||
/* end order reservation function */
|
||||
/* end order reservation function */
|
||||
|
||||
/* online order count*/
|
||||
function getOnlineOrderCount(){
|
||||
var count = 0;
|
||||
//Start Ajax
|
||||
$.ajax({
|
||||
async: false,
|
||||
type: "GET",
|
||||
url: "/origami/get_order_info",
|
||||
dataType: "json",
|
||||
success: function(data){
|
||||
if(parseInt(data) > 0){
|
||||
count = parseInt(data);
|
||||
}
|
||||
}
|
||||
});
|
||||
//end Ajax
|
||||
// alert(count);
|
||||
return count;
|
||||
}
|
||||
/* online order count*/
|
||||
@@ -54,6 +54,7 @@
|
||||
.custom-card-footer .table td:first-child,
|
||||
.custom-card-footer .table td:nth-child(2){
|
||||
border-top:0px solid !important;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.custom-card-footer .footer-td ,
|
||||
@@ -62,13 +63,16 @@
|
||||
border-bottom:0px solid !important;
|
||||
font-weight: bold;
|
||||
padding:6px 10px;
|
||||
height: 64px;
|
||||
}
|
||||
.custom-card-header{
|
||||
border-bottom: 1px solid #F8BBD0 !important;
|
||||
padding:13px 5px !important;
|
||||
height: 50px;
|
||||
}
|
||||
.custom-card-footer{
|
||||
border-top: 1px solid #F8BBD0 !important;
|
||||
border-bottom: 1px solid #FAFAFA !important;
|
||||
}
|
||||
.custom-card-block,
|
||||
.grand-card-footer,
|
||||
@@ -87,8 +91,12 @@
|
||||
background-color : #FFCDD2;
|
||||
}
|
||||
.div_order_margin {
|
||||
margin: 0px 0px 0px -5px !important
|
||||
margin: -4px 0px 0px -5px !important
|
||||
}
|
||||
.div_card_order {
|
||||
margin: 0px -5px !important
|
||||
}
|
||||
td.grand-total-padding {
|
||||
font-size: 17px;
|
||||
padding-top: 20px !important;
|
||||
}
|
||||
@@ -283,4 +283,41 @@ section.content {
|
||||
padding: 0.5rem 0.44rem;
|
||||
}
|
||||
/* End Reset Theme */
|
||||
|
||||
/* shop name margin */
|
||||
.shop-name-margin {
|
||||
margin-left : 20%;
|
||||
}
|
||||
/* shop name margin */
|
||||
|
||||
/* online order margin */
|
||||
.online-order-margin {
|
||||
margin-left : 22%;
|
||||
margin-bottom : 9.9999px;
|
||||
}
|
||||
/* online order margin */
|
||||
/* default-header-color */
|
||||
div.online-order-margin > div > span {
|
||||
color : #FAFAFA;
|
||||
}
|
||||
/* default-header-color */
|
||||
/* order-no color */
|
||||
.order-badge {
|
||||
position: absolute;
|
||||
background: #ff6600;
|
||||
height: 1.8rem;
|
||||
bottom: -0.1rem;
|
||||
right: -1.3rem;
|
||||
width: 1.8rem;
|
||||
text-align: center;
|
||||
line-height: 1.7rem;
|
||||
font-size: 0.9rem;
|
||||
border-radius: 50%;
|
||||
color: white;
|
||||
border: 1px solid #ff6600;
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
/* order-no color */
|
||||
|
||||
/* *************************************************** */
|
||||
@@ -99,11 +99,11 @@ class Crm::DiningQueuesController < BaseCrmController
|
||||
table_id = params[:table_id]
|
||||
|
||||
dining_facility = DiningFacility.find(params[:table_id])
|
||||
if dining_facility.type == "Table"
|
||||
# if dining_facility.type == "Table"
|
||||
type = "TableBooking"
|
||||
else
|
||||
type = "RoomBooking"
|
||||
end
|
||||
# else
|
||||
# type = "RoomBooking"
|
||||
# end
|
||||
|
||||
booking = Booking.create({:dining_facility_id => params[:table_id],:type => type,
|
||||
:checkin_at => Time.now.utc,:customer_id => queue.customer_id,:booking_status => "assign" })
|
||||
|
||||
@@ -96,4 +96,9 @@ class Origami::OrderReservationController < BaseOrigamiController
|
||||
render :json => response
|
||||
end
|
||||
|
||||
def get_order_info
|
||||
order_reservation = OrderReservation.where("status = 'new' OR status='accepted' OR status='send_to_kitchen' OR status = 'ready_to_delivery'").count()
|
||||
render :json => order_reservation
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -91,7 +91,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
|
||||
filename, receipt_no, cashier_printer = printer.print_receipt_bill(print_settings,cashier_terminal,sale_items,sale_data,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info, shop_detail, "Frt",current_balance,nil,other_amount)
|
||||
filename, receipt_no, cashier_printer = printer.print_receipt_bill(print_settings,cashier_terminal,sale_items,sale_data,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info, shop_detail, "Frt",current_balance,nil,other_amount,nil)
|
||||
|
||||
result = {
|
||||
:filepath => filename,
|
||||
@@ -111,6 +111,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
type = params[:type]
|
||||
tax_type = params[:tax_type]
|
||||
path = request.fullpath
|
||||
latest_order_no = nil
|
||||
|
||||
if(Sale.exists?(sale_id))
|
||||
saleObj = Sale.find(sale_id)
|
||||
@@ -204,6 +205,11 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
table_id = 0
|
||||
end
|
||||
|
||||
latest_order = booking.booking_orders.order("order_id DESC").limit(1).first()
|
||||
if !latest_order.nil?
|
||||
latest_order_no = latest_order.order_id
|
||||
end
|
||||
|
||||
booking.booking_orders.each do |order|
|
||||
# Order.pay_process_order_queue(order.order_id, table_id)
|
||||
oqs = OrderQueueStation.new
|
||||
@@ -237,7 +243,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
other_amount = SaleItem.calculate_other_charges(sale_items)
|
||||
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_detail, "Paid",current_balance,card_data,other_amount)
|
||||
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_detail, "Paid",current_balance,card_data,other_amount,latest_order_no)
|
||||
|
||||
render json: JSON.generate({:status => saleObj.rebate_status, :message => "Can't Rebate coz of Sever Error ", :filename => filename, :receipt_no => sale_receipt_no, :printer_name => printer_name})
|
||||
|
||||
@@ -442,11 +448,17 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
def reprint
|
||||
sale_id = params[:sale_id]
|
||||
member_info = nil
|
||||
|
||||
latest_order_no = nil
|
||||
saleObj = Sale.find(sale_id)
|
||||
|
||||
# For Cashier by Zone
|
||||
bookings = Booking.where("sale_id='#{sale_id}'")
|
||||
|
||||
booking = Booking.find_by_sale_id(sale_id)
|
||||
latest_order = booking.booking_orders.joins(" JOIN orders ON orders.order_id = booking_orders.order_id").where("orders.source = 'quick_service'").order("order_id DESC").limit(1).first()
|
||||
if !latest_order.nil?
|
||||
latest_order_no = latest_order.order_id
|
||||
end
|
||||
# if bookings.count > 1
|
||||
# # for Multiple Booking
|
||||
# table = DiningFacility.find(bookings[0].dining_facility_id)
|
||||
@@ -514,7 +526,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
other_amount = SaleItem.calculate_other_charges(saleObj.sale_items)
|
||||
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
filename, receipt_no, cashier_printer = printer.print_receipt_bill(print_settings,cashier_terminal,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_detail, "Re-print",current_balance,card_data,other_amount)
|
||||
filename, receipt_no, cashier_printer = printer.print_receipt_bill(print_settings,cashier_terminal,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_detail, "Re-print",current_balance,card_data,other_amount,latest_order_no)
|
||||
|
||||
result = {
|
||||
:status => true,
|
||||
@@ -600,7 +612,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
|
||||
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_detail, "FOC",nil,nil,other_amount)
|
||||
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_detail, "FOC",nil,nil,other_amount,nil)
|
||||
result = {
|
||||
:status => true,
|
||||
:filepath => filename,
|
||||
|
||||
@@ -126,7 +126,7 @@ class Origami::VoidController < BaseOrigamiController
|
||||
discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(sale.sale_items)
|
||||
other_amount = SaleItem.calculate_other_charges(sale.sale_items)
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,sale.sale_items,sale,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, "VOID",current_balance,nil,other_amount)
|
||||
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,sale.sale_items,sale,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, "VOID",current_balance,nil,other_amount,nil)
|
||||
result = {
|
||||
:filepath => filename,
|
||||
:printer_model => print_settings.brand_name,
|
||||
|
||||
@@ -107,7 +107,7 @@ class Origami::WasteSpoileController < BaseOrigamiController
|
||||
discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(sale.sale_items)
|
||||
other_amount = SaleItem.calculate_other_charges(sale.sale_items)
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,sale.sale_items,sale,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, remark,current_balance,nil,other_amount)
|
||||
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,sale.sale_items,sale,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, remark,current_balance,nil,other_amount,nil)
|
||||
result = {
|
||||
:filepath => filename,
|
||||
:printer_model => print_settings.brand_name,
|
||||
|
||||
@@ -363,7 +363,7 @@ class Transactions::SalesController < ApplicationController
|
||||
|
||||
other_amount = SaleItem.calculate_other_charges(sale.sale_items) #other charges
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,sale.sale_items,sale,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, "VOID",current_balance,nil,other_amount)
|
||||
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,sale.sale_items,sale,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, "VOID",current_balance,nil,other_amount,nil)
|
||||
result = {
|
||||
:filepath => filename,
|
||||
:printer_model => print_settings.brand_name,
|
||||
|
||||
@@ -188,19 +188,19 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
end
|
||||
|
||||
#Bill Receipt Print
|
||||
def print_receipt_bill(printer_settings,cashier_terminal,sale_items,sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount=nil,shop_details, printed_status,balance,card_data,other_amount)
|
||||
def print_receipt_bill(printer_settings,cashier_terminal,sale_items,sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount=nil,shop_details, printed_status,balance,card_data,other_amount,latest_order_no)
|
||||
#Use CUPS service
|
||||
#Generate PDF
|
||||
#Print
|
||||
pdf = ReceiptBillPdf.new(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details,printed_status,balance,card_data,other_amount)
|
||||
pdf = ReceiptBillPdf.new(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details,printed_status,balance,card_data,other_amount,latest_order_no)
|
||||
receipt_bill_a5_pdf = Lookup.collection_of("print_settings") #print_settings with name:ReceiptBillA5Pdf
|
||||
if !receipt_bill_a5_pdf.empty?
|
||||
receipt_bill_a5_pdf.each do |receipt_bilA5|
|
||||
if receipt_bilA5[0] == 'ReceiptBillA5Pdf'
|
||||
if receipt_bilA5[1] == '1'
|
||||
pdf = ReceiptBillA5Pdf.new(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details,printed_status,balance,card_data,other_amount)
|
||||
pdf = ReceiptBillA5Pdf.new(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details,printed_status,balance,card_data,other_amount,latest_order_no)
|
||||
else
|
||||
pdf = ReceiptBillPdf.new(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details,printed_status,balance,card_data,other_amount)
|
||||
pdf = ReceiptBillPdf.new(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details,printed_status,balance,card_data,other_amount,latest_order_no)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2,7 +2,7 @@ class ReceiptBillA5Pdf < Prawn::Document
|
||||
include ActionView::Helpers::NumberHelper
|
||||
|
||||
attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width, :description_width, :price_num_width, :line_move
|
||||
def initialize(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount = nil,shop_details, printed_status,current_balance,card_data,other_charges_amount)
|
||||
def initialize(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount = nil,shop_details, printed_status,current_balance,card_data,other_charges_amount,latest_order_no)
|
||||
self.page_width = printer_settings.page_width
|
||||
self.page_height = printer_settings.page_height
|
||||
self.header_font_size = printer_settings.header_font_size.to_i
|
||||
@@ -56,7 +56,7 @@ class ReceiptBillA5Pdf < Prawn::Document
|
||||
|
||||
stroke_horizontal_rule
|
||||
|
||||
cashier_info(sale_data, customer_name)
|
||||
cashier_info(sale_data, customer_name, latest_order_no)
|
||||
line_items(sale_items,printer_settings.precision,delimiter)
|
||||
all_total(sale_data,printer_settings.precision,delimiter)
|
||||
|
||||
@@ -112,7 +112,7 @@ class ReceiptBillA5Pdf < Prawn::Document
|
||||
stroke_horizontal_rule
|
||||
end
|
||||
|
||||
def cashier_info(sale_data, customer_name)
|
||||
def cashier_info(sale_data, customer_name, latest_order_no)
|
||||
move_down line_move
|
||||
# move_down 2
|
||||
y_position = cursor
|
||||
@@ -160,6 +160,14 @@ class ReceiptBillA5Pdf < Prawn::Document
|
||||
# :size => self.item_font_size,:align => :right
|
||||
# end
|
||||
|
||||
if !latest_order_no.nil?
|
||||
y_position = cursor
|
||||
move_down line_move
|
||||
bounding_box([0,y_position], :width =>self.page_width - 10, :height => self.item_height) do
|
||||
text "OrderNo : #{ latest_order_no }",:size => self.item_font_size,:align => :left
|
||||
end
|
||||
end
|
||||
|
||||
move_down line_move
|
||||
stroke_horizontal_rule
|
||||
end
|
||||
@@ -659,7 +667,7 @@ class ReceiptBillA5Pdf < Prawn::Document
|
||||
move_down line_move
|
||||
y_position = cursor
|
||||
|
||||
text "#{shop.note}", :size => self.item_font_size,:align => :center
|
||||
text "#{shop.note}", :size => self.item_font_size,:align => :left
|
||||
|
||||
move_down line_move
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@ class ReceiptBillPdf < Prawn::Document
|
||||
|
||||
attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width, :description_width, :price_num_width, :line_move
|
||||
|
||||
def initialize(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount = nil,shop_details, printed_status,current_balance,card_data,other_charges_amount)
|
||||
def initialize(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount = nil,shop_details, printed_status,current_balance,card_data,other_charges_amount,latest_order_no)
|
||||
self.page_width = printer_settings.page_width
|
||||
self.page_height = printer_settings.page_height
|
||||
self.header_font_size = printer_settings.header_font_size.to_i
|
||||
@@ -57,7 +57,7 @@ class ReceiptBillPdf < Prawn::Document
|
||||
|
||||
stroke_horizontal_rule
|
||||
|
||||
cashier_info(sale_data, customer_name)
|
||||
cashier_info(sale_data, customer_name, latest_order_no)
|
||||
line_items(sale_items,printer_settings.precision,delimiter)
|
||||
all_total(sale_data,printer_settings.precision,delimiter)
|
||||
|
||||
@@ -112,7 +112,7 @@ class ReceiptBillPdf < Prawn::Document
|
||||
stroke_horizontal_rule
|
||||
end
|
||||
|
||||
def cashier_info(sale_data, customer_name)
|
||||
def cashier_info(sale_data, customer_name, latest_order_no)
|
||||
move_down line_move
|
||||
|
||||
# move_down 2
|
||||
@@ -153,7 +153,13 @@ class ReceiptBillPdf < Prawn::Document
|
||||
# - #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') })" ,
|
||||
# :size => self.item_font_size,:align => :right
|
||||
# end
|
||||
|
||||
if !latest_order_no.nil?
|
||||
y_position = cursor
|
||||
move_down line_move
|
||||
bounding_box([0,y_position], :width =>self.page_width - 10, :height => self.item_height) do
|
||||
text "OrderNo : #{ latest_order_no }",:size => self.item_font_size,:align => :left
|
||||
end
|
||||
end
|
||||
move_down line_move
|
||||
stroke_horizontal_rule
|
||||
end
|
||||
@@ -659,7 +665,7 @@ class ReceiptBillPdf < Prawn::Document
|
||||
move_down line_move
|
||||
y_position = cursor
|
||||
|
||||
text "#{shop.note}", :size => self.item_font_size,:align => :center
|
||||
text "#{shop.note}", :size => self.item_font_size, :align => :left
|
||||
|
||||
move_down line_move
|
||||
end
|
||||
|
||||
@@ -36,12 +36,22 @@
|
||||
</span>
|
||||
</div>
|
||||
<!-- Start Shop Info -->
|
||||
<div class="navbar-right">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 navbar-brand">
|
||||
<div class="navbar-right shop-name-margin">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 navbar-brand">
|
||||
<span class="navbar-brand-txt"><%= shop_detail.name %></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Shop Info -->
|
||||
|
||||
<div class="navbar-right online-order-margin">
|
||||
<% if order_reservation %>
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 online_order">
|
||||
<span class="navbar-brand-txt header-default-color"><%= t :order_reservation %></span>
|
||||
<span class="order_no"></span>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!-- Start Delete confirrm text !-->
|
||||
<div class="navbar-right">
|
||||
<a href="javascript:void(0);" class="dropdown-toggle waves-block" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
@@ -111,5 +121,15 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.online_order').on('click',function(){
|
||||
window.location.href = '/origami/order_reservation';
|
||||
});
|
||||
|
||||
if(parseInt(getOnlineOrderCount()) > 0){
|
||||
$('.order_no').addClass("order-badge");
|
||||
$('.order_no').html(parseInt(getOnlineOrderCount()));
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -14,141 +14,141 @@
|
||||
<input type="hidden" name="display_type" id="display_type" value="<%= @display_type%>">
|
||||
<div class="row m-t--20">
|
||||
<div class="col-lg-2 col-md-2 col-sm-2 hidden" id="menu_data">
|
||||
<li class="list-menu">
|
||||
<a href="javascript:void(0);" class="menu-toggle dropdown-toggle toggled my-toggle " style="">
|
||||
<li class="list-menu">
|
||||
<a href="javascript:void(0);" class="menu-toggle dropdown-toggle toggled my-toggle " style="">
|
||||
|
||||
<span class="main_menu" id="main_menu menu_name" >
|
||||
<%if @menu.present? %>
|
||||
<%=@menus[0].name%>
|
||||
<% end%>
|
||||
</span>
|
||||
<span class="main_menu" id="main_menu menu_name" >
|
||||
<%if @menu.present? %>
|
||||
<%=@menus[0].name%>
|
||||
<% end%>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="ml-menu menu_list aria-hidden " style="border-top: 1px solid #fff">
|
||||
<% @menus.each do |menu| %>
|
||||
<li class="nav-item menu_click" data-name="<%=menu.name%>" data-id="<%=menu.id%>" style="">
|
||||
<a class="nav-link" data-toggle="tab" href="" role="tab" style="text-transform: lowercase;"><%=menu.name%></a>
|
||||
</li>
|
||||
<%end%>
|
||||
</ul>
|
||||
</li>
|
||||
<div id="menu1-slimscroll" data-height="0">
|
||||
<ul class="nav nav-tabs flex-column category_list" role="tablist" id="ul-navbar">
|
||||
<li class="nav-item product" data-ref="<%= origami_get_all_product_path %>">
|
||||
<a class="nav-link" data-toggle="tab" href="" role="tab">Products</a>
|
||||
</li>
|
||||
<% @menu.each do |menu| %>
|
||||
<% if !menu.valid_time.nil? %>
|
||||
<% if menu.menu_category_id.nil? %>
|
||||
<!--if type quick_service or cashier for table -->
|
||||
<% if type %>
|
||||
<% if !menu.code.include? "SPL" %>
|
||||
<li class="nav-item">
|
||||
<p class="hidden menu-id"><%= menu.id %></p>
|
||||
<a class="nav-link menu_category sub_click first_<%=menu.id%>" data-toggle="tab" href="" role="tab" data-id="<%=menu.id%>" data-sub-id="<%=menu.get_sub_category%>"> <%= menu.name%>
|
||||
</a>
|
||||
<ul class="ml-menu menu_list aria-hidden " style="border-top: 1px solid #fff">
|
||||
<% @menus.each do |menu| %>
|
||||
<li class="nav-item menu_click" data-name="<%=menu.name%>" data-id="<%=menu.id%>" style="">
|
||||
<a class="nav-link" data-toggle="tab" href="" role="tab" style="text-transform: lowercase;"><%=menu.name%></a>
|
||||
</li>
|
||||
<%end%>
|
||||
<ul class="sub_category_list hidden fadeInTop animated" id="sub_category_list">
|
||||
</ul>
|
||||
</li>
|
||||
<div id="menu1-slimscroll" data-height="0">
|
||||
<ul class="nav nav-tabs flex-column category_list" role="tablist" id="ul-navbar">
|
||||
<li class="nav-item product" data-ref="<%= origami_get_all_product_path %>">
|
||||
<a class="nav-link" data-toggle="tab" href="" role="tab">Products</a>
|
||||
</li>
|
||||
<% @menu.each do |menu| %>
|
||||
<% if !menu.valid_time.nil? %>
|
||||
<% if menu.menu_category_id.nil? %>
|
||||
<!--if type quick_service or cashier for table -->
|
||||
<% if type %>
|
||||
<% if !menu.code.include? "SPL" %>
|
||||
<li class="nav-item">
|
||||
<p class="hidden menu-id"><%= menu.id %></p>
|
||||
<a class="nav-link menu_category sub_click first_<%=menu.id%>" data-toggle="tab" href="" role="tab" data-id="<%=menu.id%>" data-sub-id="<%=menu.get_sub_category%>"> <%= menu.name%>
|
||||
</a>
|
||||
<ul class="sub_category_list hidden fadeInTop animated" id="sub_category_list">
|
||||
</ul>
|
||||
</li>
|
||||
<% end%>
|
||||
<!-- else quick_service or cashier for table -->
|
||||
<% else %>
|
||||
<% if @table.get_current_checkout_booking.nil? %>
|
||||
<% if !menu.code.include? "SPL" %>
|
||||
<li class="nav-item ">
|
||||
<p class="hidden menu-id"><%= menu.id %></p>
|
||||
<a class="nav-link menu_category sub_click first_<%=menu.id%>" data-toggle="tab" href="" role="tab" data-id="<%=menu.id%>" data-sub-id="<%=menu.get_sub_category%>"> <%= menu.name%>
|
||||
</a>
|
||||
<ul class=" sub_category_list hidden fadeInTop animated" id="sub_category_list">
|
||||
</ul>
|
||||
</li>
|
||||
<% end%>
|
||||
<% else %>
|
||||
<li class="nav-item ">
|
||||
<p class="hidden menu-id"><%= menu.id %></p>
|
||||
<a class="nav-link menu_category sub_click first_<%=menu.id%>" data-toggle="tab" href="" role="tab" data-id="<%=menu.id%>" data-sub-id="<%=menu.get_sub_category%>"> <%= menu.name%>
|
||||
</a>
|
||||
<ul class=" sub_category_list hidden fadeInTop animated" id="sub_category_list">
|
||||
</ul>
|
||||
</li>
|
||||
</li>
|
||||
<% end%>
|
||||
<!-- else quick_service or cashier for table -->
|
||||
<% else %>
|
||||
<% if @table.get_current_checkout_booking.nil? %>
|
||||
<% if !menu.code.include? "SPL" %>
|
||||
<li class="nav-item ">
|
||||
<p class="hidden menu-id"><%= menu.id %></p>
|
||||
<a class="nav-link menu_category sub_click first_<%=menu.id%>" data-toggle="tab" href="" role="tab" data-id="<%=menu.id%>" data-sub-id="<%=menu.get_sub_category%>"> <%= menu.name%>
|
||||
</a>
|
||||
<ul class=" sub_category_list hidden fadeInTop animated" id="sub_category_list">
|
||||
</ul>
|
||||
</li>
|
||||
<% end%>
|
||||
<% else %>
|
||||
<li class="nav-item ">
|
||||
<p class="hidden menu-id"><%= menu.id %></p>
|
||||
<a class="nav-link menu_category sub_click first_<%=menu.id%>" data-toggle="tab" href="" role="tab" data-id="<%=menu.id%>" data-sub-id="<%=menu.get_sub_category%>"> <%= menu.name%>
|
||||
</a>
|
||||
<ul class=" sub_category_list hidden fadeInTop animated" id="sub_category_list">
|
||||
</ul>
|
||||
</li>
|
||||
<% end%>
|
||||
<!-- end quick_service or cashier for table -->
|
||||
<% end %>
|
||||
<% end%>
|
||||
<% end %>
|
||||
<%end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-2 col-md-2 col-sm-2 hidden" id="menu_cache">
|
||||
<li class="list-menu">
|
||||
<a href="javascript:void(0);" class="menu-toggle dropdown-toggle toggled my-toggle " style="">
|
||||
<span class="main_menu menu_cache_name" id="main_menu menu_cache_name"></span>
|
||||
</a>
|
||||
<ul class="ml-menu menu_list aria-hidden menu_cache_list" style="border-top: 1px solid #fff">
|
||||
</ul>
|
||||
</li>
|
||||
<div id="menu-slimscroll" data-height="0">
|
||||
<ul class="nav nav-tabs flex-column category_list category_cache_list" role="tablist" id="ul-navbar">
|
||||
<li class="nav-item product" data-ref="<%= origami_get_all_product_path %>">
|
||||
<a class="nav-link" data-toggle="tab" href="" role="tab">Products</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-7 col-lg-7 col-sm-7 m-t-10" >
|
||||
<div class="card">
|
||||
<div class="card-block" style="">
|
||||
<div class="card-text" id="custom-slimscroll">
|
||||
<div class="row menu_items_list" style="margin:0px 1px 0px 1px ;">
|
||||
<!-- append data -->
|
||||
<% @menu.each do |menu| %>
|
||||
<% if !menu.valid_time.nil? %>
|
||||
<% if menu.menu_category_id.nil? %>
|
||||
<!--if type quick_service or cashier for table -->
|
||||
<% if type %>
|
||||
<% if !menu.code.include? "SPL" %>
|
||||
<div class="card custom-card testimonial-card animated fadeInRight menu_category sub_click" data-id="<%=menu.id%>">
|
||||
<div class='card-block custom-card-block'>
|
||||
<p><%=menu.name%> <p>
|
||||
<p><%=menu.code%> <p>
|
||||
</div>
|
||||
</div>
|
||||
<% end%>
|
||||
<!-- else quick_service or cashier for table -->
|
||||
<% else %>
|
||||
<% if @table.get_current_checkout_booking.nil? %>
|
||||
<% if !menu.code.include? "SPL" %>
|
||||
<div class="card custom-card testimonial-card animated fadeInRight menu_category sub_click" data-id="<%=menu.id%>">
|
||||
<div class='card-block custom-card-block'>
|
||||
<p><%=menu.name%> <p>
|
||||
<p><%=menu.code%> <p>
|
||||
</div>
|
||||
</div>
|
||||
<% end%>
|
||||
<% else %>
|
||||
<div class="card custom-card testimonial-card animated fadeInRight menu_category sub_click" data-id="<%=menu.id%>">
|
||||
<div class='card-block custom-card-block'>
|
||||
<p><%=menu.name%> <p>
|
||||
<p><%=menu.code%> <p>
|
||||
</div>
|
||||
</div>
|
||||
<% end%>
|
||||
<!-- end quick_service or cashier for table -->
|
||||
<% end %>
|
||||
<% end%>
|
||||
<% end %>
|
||||
<%end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-2 col-md-2 col-sm-2 hidden" id="menu_cache">
|
||||
<li class="list-menu">
|
||||
<a href="javascript:void(0);" class="menu-toggle dropdown-toggle toggled my-toggle " style="">
|
||||
<span class="main_menu menu_cache_name" id="main_menu menu_cache_name"></span>
|
||||
</a>
|
||||
<ul class="ml-menu menu_list aria-hidden menu_cache_list" style="border-top: 1px solid #fff">
|
||||
</ul>
|
||||
</li>
|
||||
<div id="menu-slimscroll" data-height="0">
|
||||
<ul class="nav nav-tabs flex-column category_list category_cache_list" role="tablist" id="ul-navbar">
|
||||
<li class="nav-item product" data-ref="<%= origami_get_all_product_path %>">
|
||||
<a class="nav-link" data-toggle="tab" href="" role="tab">Products</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-7 col-lg-7 col-sm-7 m-t-10" >
|
||||
<div class="card">
|
||||
<div class="card-block" style="">
|
||||
<div class="card-text" id="custom-slimscroll">
|
||||
<div class="row menu_items_list" style="margin:0px 1px 0px 1px ;">
|
||||
<!-- append data -->
|
||||
<% @menu.each do |menu| %>
|
||||
<% if !menu.valid_time.nil? %>
|
||||
<% if menu.menu_category_id.nil? %>
|
||||
<!--if type quick_service or cashier for table -->
|
||||
<% if type %>
|
||||
<% if !menu.code.include? "SPL" %>
|
||||
<div class="card custom-card testimonial-card animated fadeInRight menu_category sub_click" data-id="<%=menu.id%>">
|
||||
<div class='card-block custom-card-block'>
|
||||
<p><%=menu.name%> <p>
|
||||
<p><%=menu.code%> <p>
|
||||
</div>
|
||||
</div>
|
||||
<% end%>
|
||||
<!-- else quick_service or cashier for table -->
|
||||
<% else %>
|
||||
<% if @table.get_current_checkout_booking.nil? %>
|
||||
<% if !menu.code.include? "SPL" %>
|
||||
<div class="card custom-card testimonial-card animated fadeInRight menu_category sub_click" data-id="<%=menu.id%>">
|
||||
<div class='card-block custom-card-block'>
|
||||
<p><%=menu.name%> <p>
|
||||
<p><%=menu.code%> <p>
|
||||
</div>
|
||||
</div>
|
||||
<% end%>
|
||||
<% else %>
|
||||
<div class="card custom-card testimonial-card animated fadeInRight menu_category sub_click" data-id="<%=menu.id%>">
|
||||
<div class='card-block custom-card-block'>
|
||||
<p><%=menu.name%> <p>
|
||||
<p><%=menu.code%> <p>
|
||||
</div>
|
||||
</div>
|
||||
<% end%>
|
||||
<!-- end quick_service or cashier for table -->
|
||||
<% end %>
|
||||
<% end%>
|
||||
<% end %>
|
||||
<%end %>
|
||||
<% end%>
|
||||
<% end %>
|
||||
<%end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 col-lg-3 col-sm-3 m-t-10">
|
||||
<div class="col-md-3 col-lg-3 col-sm-3 m-t-10">
|
||||
|
||||
<% if type && modify_order%>
|
||||
<button type="button" class="btn btn-lg btn-default waves-effect col-md-4" id='back'>
|
||||
@@ -179,45 +179,45 @@
|
||||
<br>
|
||||
<div class="card-header" style="padding: 0.12rem 0.25rem">
|
||||
<% if type %>
|
||||
<div class="row clearfix">
|
||||
<div class="col-md-6 col-lg-6 col-sm-12">
|
||||
<strong id="order-title" class="font-13">ORDER DETAILS </strong>
|
||||
</div>
|
||||
<div class="row clearfix">
|
||||
<div class="col-md-6 col-lg-6 col-sm-12">
|
||||
<strong id="order-title" class="font-13">ORDER DETAILS </strong>
|
||||
</div>
|
||||
|
||||
<% if modify_order %>
|
||||
<% if @table.nil? %>
|
||||
|
||||
<div class="col-md-3 col-lg-3 col-sm-3">Table : </div>
|
||||
<p class="hidden" id="table_id"><%=@table_id%></p>
|
||||
<p class="hidden" id="table_type"></p>
|
||||
<p class="hidden" id="table_get_current"></p>
|
||||
<% else%>
|
||||
|
||||
<div class="col-md-3 col-lg-3 col-sm-3">Table : <%=@table.name%></div>
|
||||
<p class="hidden" id="table_id"><%=@table_id%></p>
|
||||
<p class="hidden" id="table_type"><%=@table.type%></p>
|
||||
<p class="hidden" id="table_get_current"><%=@table.get_current_checkout_booking%></p>
|
||||
<% end%>
|
||||
<% if modify_order %>
|
||||
<% if @table.nil? %>
|
||||
|
||||
<p class="hidden" id="booking_id"><%=@booking_id%></p>
|
||||
<p class="hidden" id="customer_id"><%=@customer ? @customer.customer_id : '---'%></p>
|
||||
<p class="hidden" id="sale_id"><%=@sale_id%></p>
|
||||
<div class="col-md-3 col-lg-3 col-sm-3">Table : </div>
|
||||
<p class="hidden" id="table_id"><%=@table_id%></p>
|
||||
<p class="hidden" id="table_type"></p>
|
||||
<p class="hidden" id="table_get_current"></p>
|
||||
<% else%>
|
||||
|
||||
<div class="col-md-1 col-lg-1 col-sm-1">
|
||||
<button type="button" class="btn btn-xs btn-danger waves-effect float-left" id='clear_all'> Clear
|
||||
</button>
|
||||
</div>
|
||||
<% else%>
|
||||
<p class="hidden" id="table_type"></p>
|
||||
<div class="col-md-2 col-lg-2 col-sm-2">
|
||||
<div class="col-md-3 col-lg-3 col-sm-3">Table : <%=@table.name%></div>
|
||||
<p class="hidden" id="table_id"><%=@table_id%></p>
|
||||
<p class="hidden" id="table_type"><%=@table.type%></p>
|
||||
<p class="hidden" id="table_get_current"><%=@table.get_current_checkout_booking%></p>
|
||||
<% end%>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 col-lg-3 col-sm-3">
|
||||
<button type="button" class="btn btn-xs btn-danger waves-effect float-left" id='clear_all'> Clear
|
||||
</button>
|
||||
</div>
|
||||
<% end%>
|
||||
</div>
|
||||
<p class="hidden" id="booking_id"><%=@booking_id%></p>
|
||||
<p class="hidden" id="customer_id"><%=@customer ? @customer.customer_id : '---'%></p>
|
||||
<p class="hidden" id="sale_id"><%=@sale_id%></p>
|
||||
|
||||
<div class="col-md-1 col-lg-1 col-sm-1">
|
||||
<button type="button" class="btn btn-xs btn-danger waves-effect float-left" id='clear_all'> Clear
|
||||
</button>
|
||||
</div>
|
||||
<% else%>
|
||||
<p class="hidden" id="table_type"></p>
|
||||
<div class="col-md-2 col-lg-2 col-sm-2">
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 col-lg-3 col-sm-3">
|
||||
<button type="button" class="btn btn-xs btn-danger waves-effect float-left" id='clear_all'> Clear
|
||||
</button>
|
||||
</div>
|
||||
<% end%>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="row ">
|
||||
<div class="col-md-9 col-lg-9 col-sm-9 ">
|
||||
@@ -228,7 +228,7 @@
|
||||
<p class="hidden" id="table_type"><%=@table.type%></p>
|
||||
<p class="hidden" id="booking_id"><%=@booking_id%></p>
|
||||
<p class="hidden" id="customer_id"><%=@customer ? @customer.customer_id : ''%></p>
|
||||
<p class="hidden" id="table_get_current"><%=@table.get_current_checkout_booking%></p>
|
||||
<p class="hidden" id="table_get_current"><%=@table.get_current_checkout_booking%></p>
|
||||
</div>
|
||||
<div class="col-md-3 col-lg-3 col-sm-3">
|
||||
<button type="button" class="btn btn-xs btn-danger waves-effect" id='clear_all'>Clear
|
||||
@@ -311,7 +311,7 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row bottom p-l-15 p-r-15 m-t-10">
|
||||
<div class="row bottom p-l-15 p-r-15 m-t-10">
|
||||
<div class="col-md-3 cashier_number border-top border-left" data-value="1" data-type="num">1</div>
|
||||
<div class="col-md-3 cashier_number border-top border-left" data-value="2" data-type="num">2</div>
|
||||
<div class="col-md-3 cashier_number border-top border-left" data-value="3" data-type="num">3</div>
|
||||
@@ -327,7 +327,7 @@
|
||||
<div class="col-md-3 cashier_number border-top border-left" data-value="9" data-type="num">9</div>
|
||||
<div class="col-md-3 cashier_number border-top border-left" data-value="0" data-type="num">0</div>
|
||||
<div class="col-md-3 cashier_number border-top border-left" data-value="00" data-type="num">00</div>
|
||||
<div class="col-md-3 cashier_number border-top border-left bg-orange" data-type="clr">Clr</div>
|
||||
<div class="col-md-3 cashier_number border-top border-left bg-orange" data-type="clr">Clr</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@@ -413,164 +413,164 @@
|
||||
|
||||
|
||||
<!-- Large modal -->
|
||||
<div class=" modal sx_item_set_detailModal" id="sx_item_set_detailModal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" >
|
||||
<div class="modal sx_item_set_detailModal" id="sx_item_set_detailModal" tabindex="-1" role="dialog" aria-labelledby="sx_item_set_detailLabel" aria-hidden="true" >
|
||||
<div class="modal-dialog custom-modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background-color: #54A5AF;padding-top:10px !important;">
|
||||
<h4 class="modal-title" style="color:#fff;" id="set_name"></h4>
|
||||
<!-- <button type="button" class="close" id="close" data-dismiss="modal" aria-hidden="true" style="font-size: 20px;color:#fff;">×</button> -->
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" id="close">Close</button>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<button type="button" class="btn btn-primary set_order" data-dismiss="modal" id="set_order">Add to Order</button>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="close" id="close" data-dismiss="modal" aria-hidden="true" style="font-size: 20px;color:#fff;">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-body" id="set-menu-item-slimscroll" data-height="50">
|
||||
<div class="row set-item">
|
||||
<div class="col-md-4">
|
||||
<p class="set_default_option" style="text-align: center;"> <%= image_tag "logo.png" ,width: '', height: '', :id => 'logo' %></p>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-md-6" style="margin-top:5px">Quantity</label>
|
||||
<input type="number" name="qty" class="form-control col-md-5 input-number change_qty" id="set_change_qty" value="" min="1" max="100">
|
||||
</div> -->
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-md-6" style="margin-top:5px">Quantity</label>
|
||||
<input type="number" name="qty" class="form-control col-md-5 input-number change_qty" id="set_change_qty" value="" min="1" max="100">
|
||||
</div> -->
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-danger btn-number" value="-" id="set_minus">
|
||||
<i class="material-icons">remove</i>
|
||||
</button>
|
||||
</span>
|
||||
<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>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<p class="hidden" id="set_unit_price"></p>
|
||||
<p class="hidden" id="set_instance_code"></p>
|
||||
<p class="hidden" id="set_instance_name"></p>
|
||||
<p class="hidden" id="set_promotion_price"></p>
|
||||
<p class="hidden" id="set_item_instances"></p>
|
||||
<p class="hidden" id="set_item_code"></p>
|
||||
<p></p>
|
||||
|
||||
<div class="" id="modal-slimscroll" data-height="100">
|
||||
<div class="options-list" style="margin-top:-5px">
|
||||
</div>
|
||||
|
||||
<div class='selected-set-list'>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="instance-list row"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="mr-auto">
|
||||
<h4 class=" pull-left">Total : <span id="set_total_price"></span></h4>
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-danger btn-number" value="-" id="set_minus">
|
||||
<i class="material-icons">remove</i>
|
||||
</button>
|
||||
</span>
|
||||
<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>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<p class="hidden" id="set_unit_price"></p>
|
||||
<p class="hidden" id="set_instance_code"></p>
|
||||
<p class="hidden" id="set_instance_name"></p>
|
||||
<p class="hidden" id="set_promotion_price"></p>
|
||||
<p class="hidden" id="set_item_instances"></p>
|
||||
<p class="hidden" id="set_item_code"></p>
|
||||
<p></p>
|
||||
|
||||
<div class="" id="modal-set-slimscroll" data-height="100">
|
||||
<div class="options-list" style="margin-top:-5px">
|
||||
</div>
|
||||
|
||||
<div class='selected-set-list'>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="instance-list row"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="mr-auto">
|
||||
<h4 class=" pull-left">Total : <span id="set_total_price"></span></h4>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" id="close">Close</button>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<button type="button" class="btn btn-primary set_order" data-dismiss="modal" id="set_order">Add to Order</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if type && !modify_order%>
|
||||
<div class="modal fade" id="TableModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="margin-top: -1rem;">
|
||||
<!-- <h4 class="modal-title" id="TableModalLabel">Select Table</h4> -->
|
||||
<button type="button" class="close" id="close" data-dismiss="modal" aria-hidden="true" style="font-size: 20px;">×</button>
|
||||
</div>
|
||||
<div class="modal-body" style="margin-top: -0.75rem;padding-top:5px">
|
||||
<%@zone.each do |zone| %>
|
||||
<h5>Zone : <%=zone.name%></h5>
|
||||
<div class="card-columns" style="column-count: 7;">
|
||||
<%zone.tables.each do |table| %>
|
||||
<% if table.status == 'occupied' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% if type && !modify_order%>
|
||||
<div class="modal fade" id="TableModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="margin-top: -1rem;">
|
||||
<!-- <h4 class="modal-title" id="TableModalLabel">Select Table</h4> -->
|
||||
<button type="button" class="close" id="close" data-dismiss="modal" aria-hidden="true" style="font-size: 20px;">×</button>
|
||||
</div>
|
||||
<div class="modal-body" style="margin-top: -0.75rem;padding-top:5px">
|
||||
<%@zone.each do |zone| %>
|
||||
<h5>Zone : <%=zone.name%></h5>
|
||||
<div class="card-columns" style="column-count: 7;">
|
||||
<%zone.tables.each do |table| %>
|
||||
<% if table.status == 'occupied' %>
|
||||
<% if table.get_booking.nil? %>
|
||||
<% if table.get_checkout_booking.nil? %>
|
||||
<% color="red"%>
|
||||
<% else %>
|
||||
<% color="orange"%>
|
||||
<% end %>
|
||||
<% if table.get_checkout_booking.nil? %>
|
||||
<% color="red"%>
|
||||
<% else %>
|
||||
<% color="orange"%>
|
||||
<% end %>
|
||||
|
||||
<% else %>
|
||||
<% if table.get_checkout_booking.nil? %>
|
||||
<% color="blue"%>
|
||||
<% else %>
|
||||
<% color="orange"%>
|
||||
<% end %>
|
||||
<% if table.get_checkout_booking.nil? %>
|
||||
<% color="blue"%>
|
||||
<% else %>
|
||||
<% color="orange"%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% color="green"%>
|
||||
<% end %>
|
||||
<div class="card tables <%=color%> text-white table_<%= table.id %>" data-id="<%= table.id %>" data-type="<%= table.type %>" data-name="<%= table.name %>">
|
||||
<div class="card-block">
|
||||
<%= table.name %>
|
||||
</div>
|
||||
</div>
|
||||
<%end%>
|
||||
|
||||
<%zone.rooms.each do |table| %>
|
||||
<% if table.status == 'occupied' %>
|
||||
<% if table.get_booking.nil? %>
|
||||
<% if table.get_checkout_booking.nil? %>
|
||||
<% color="red"%>
|
||||
<% else %>
|
||||
<% color="orange"%>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if table.get_checkout_booking.nil? %>
|
||||
<% color="blue"%>
|
||||
<% else %>
|
||||
<% color="orange"%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% color="green"%>
|
||||
<% color="green"%>
|
||||
<% end %>
|
||||
<div class="card tables <%=color%> text-white table_<%= table.id %>" data-id="<%= table.id %>" data-type="<%= table.type %>" data-name="<%= table.name %>">
|
||||
<div class="card-block">
|
||||
<%= table.name %>
|
||||
</div>
|
||||
</div>
|
||||
<%end%>
|
||||
|
||||
<%zone.rooms.each do |table| %>
|
||||
<% if table.status == 'occupied' %>
|
||||
<% if table.get_booking.nil? %>
|
||||
<% if table.get_checkout_booking.nil? %>
|
||||
<% color="red"%>
|
||||
<% else %>
|
||||
<% color="orange"%>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if table.get_checkout_booking.nil? %>
|
||||
<% color="blue"%>
|
||||
<% else %>
|
||||
<% color="orange"%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% color="green"%>
|
||||
<% end %>
|
||||
<div class="card tables <%=color%> text-white table_<%= table.id %>" data-id="<%= table.id %>" data-type="<%= table.type %>" data-name="<%= table.name %>">
|
||||
<div class="card-block">
|
||||
<%= table.name %>
|
||||
</div>
|
||||
</div>
|
||||
<%end%>
|
||||
</div>
|
||||
<%end%>
|
||||
</div>
|
||||
<%end%>
|
||||
<div class="modal-footer p-r-30">
|
||||
<button type="button" class="btn btn-link btn-danger waves-effect" data-dismiss="modal">CLOSE</button>
|
||||
|
||||
<button type="button" class="btn btn-link bg-blue waves-effect confirm_table" data-dismiss="modal">Confirm</button>
|
||||
<div class="modal-footer p-r-30">
|
||||
<button type="button" class="btn btn-link btn-danger waves-effect" data-dismiss="modal">CLOSE</button>
|
||||
|
||||
<button type="button" class="btn btn-link bg-blue waves-effect confirm_table" data-dismiss="modal">Confirm</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<input type="hidden" name="server_mode" value="<%=ENV["SERVER_MODE"]%>" id="server_mode">
|
||||
</div>
|
||||
<% end %>
|
||||
<input type="hidden" name="server_mode" value="<%=ENV["SERVER_MODE"]%>" id="server_mode">
|
||||
</div>
|
||||
<style type="text/css">
|
||||
.fadeInRight{
|
||||
-webkit-animation-duration: 350ms !important;
|
||||
}
|
||||
</style>
|
||||
<style type="text/css">
|
||||
.fadeInRight{
|
||||
-webkit-animation-duration: 350ms !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
var cashier_type = $('#cashier_type').val();
|
||||
jQuery(function(){
|
||||
var menus = JSON.parse(localStorage.getItem("menus"));
|
||||
if (menus != null) {
|
||||
var id = menus[0]["categories"][0]["id"];
|
||||
<script>
|
||||
var cashier_type = $('#cashier_type').val();
|
||||
jQuery(function(){
|
||||
var menus = JSON.parse(localStorage.getItem("menus"));
|
||||
if (menus != null) {
|
||||
var id = menus[0]["categories"][0]["id"];
|
||||
// console.log(id);
|
||||
}else{
|
||||
var id = 1;
|
||||
@@ -578,93 +578,93 @@
|
||||
jQuery('.first_'+id).click();
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
var menus = JSON.parse(localStorage.getItem("menus"));
|
||||
if (menus != null) {
|
||||
menu_cache_append(menus);
|
||||
}else{
|
||||
$("#menu_data").removeClass("hidden");
|
||||
}
|
||||
$(document).ready(function () {
|
||||
var menus = JSON.parse(localStorage.getItem("menus"));
|
||||
if (menus != null) {
|
||||
menu_cache_append(menus);
|
||||
}else{
|
||||
$("#menu_data").removeClass("hidden");
|
||||
}
|
||||
|
||||
function menu_cache_append(menus){
|
||||
$("#menu_cache").removeClass("hidden");
|
||||
$(".menu_cache_name").text(menus[0]["name"])
|
||||
for(var i in menus) {
|
||||
menu_list_template(menus[i]);
|
||||
}
|
||||
var category = menus[0]["categories"];
|
||||
|
||||
for(var ii in category) {
|
||||
if (category[ii]["is_available"]== true){
|
||||
if (category[ii]["valid_time"]== true){
|
||||
if (category[ii]["parent_id"] == null ){
|
||||
if(cashier_type){
|
||||
if (category[ii]["code"].includes("SPL") != true) {
|
||||
category_list_template(category[ii]);
|
||||
}
|
||||
}else{
|
||||
if ($("#table_get_current").text()) {
|
||||
if (category[ii]["code"].includes("SPL") != true) {
|
||||
category_list_template(category[ii]);
|
||||
}else {
|
||||
category_list_template(category[ii]);
|
||||
function menu_cache_append(menus){
|
||||
$("#menu_cache").removeClass("hidden");
|
||||
$(".menu_cache_name").text(menus[0]["name"])
|
||||
for(var i in menus) {
|
||||
menu_list_template(menus[i]);
|
||||
}
|
||||
var category = menus[0]["categories"];
|
||||
|
||||
for(var ii in category) {
|
||||
if (category[ii]["is_available"]== true){
|
||||
if (category[ii]["valid_time"]== true){
|
||||
if (category[ii]["parent_id"] == null ){
|
||||
if(cashier_type){
|
||||
if (category[ii]["code"].includes("SPL") != true) {
|
||||
category_list_template(category[ii]);
|
||||
}
|
||||
}else{
|
||||
if ($("#table_get_current").text()) {
|
||||
if (category[ii]["code"].includes("SPL") != true) {
|
||||
category_list_template(category[ii]);
|
||||
}else {
|
||||
category_list_template(category[ii]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(".tables").on('click', function () {
|
||||
$('.tables').css('background-color','');
|
||||
$('.tables').removeClass('purple')
|
||||
var dining_id = $(this).attr("data-id");
|
||||
var name = $(this).attr("data-name");
|
||||
var type = $(this).attr("data-type");
|
||||
$(this).css('background-color','purple');
|
||||
$(this).addClass('purple')
|
||||
$('.confirm_table').attr("data-id",dining_id)
|
||||
$('.confirm_table').attr("data-name",name)
|
||||
$('.confirm_table').attr("data-type",type)
|
||||
});
|
||||
$(".tables").on('click', function () {
|
||||
$('.tables').css('background-color','');
|
||||
$('.tables').removeClass('purple')
|
||||
var dining_id = $(this).attr("data-id");
|
||||
var name = $(this).attr("data-name");
|
||||
var type = $(this).attr("data-type");
|
||||
$(this).css('background-color','purple');
|
||||
$(this).addClass('purple')
|
||||
$('.confirm_table').attr("data-id",dining_id)
|
||||
$('.confirm_table').attr("data-name",name)
|
||||
$('.confirm_table').attr("data-type",type)
|
||||
});
|
||||
|
||||
$(".confirm_table").on('click', function () {
|
||||
var dining_id = $(this).attr("data-id");
|
||||
var name = $(this).attr("data-name");
|
||||
var type = $(this).attr("data-type");
|
||||
$('#table_id').val(dining_id);
|
||||
$('#table_type').text(type);
|
||||
$('.select_table').text(name);
|
||||
});
|
||||
$(".confirm_table").on('click', function () {
|
||||
var dining_id = $(this).attr("data-id");
|
||||
var name = $(this).attr("data-name");
|
||||
var type = $(this).attr("data-type");
|
||||
$('#table_id').val(dining_id);
|
||||
$('#table_type').text(type);
|
||||
$('.select_table').text(name);
|
||||
});
|
||||
|
||||
$('#pending_order').on('click', function () {
|
||||
window.location.href = '/origami/quick_service/pending_order';
|
||||
});
|
||||
$('#pending_order').on('click', function () {
|
||||
window.location.href = '/origami/quick_service/pending_order';
|
||||
});
|
||||
|
||||
$(document).on('click', '.menu_click', function(event){
|
||||
var menu_id = $(this).attr("data-id");
|
||||
var name = $(this).attr("data-name");
|
||||
var menus = JSON.parse(localStorage.getItem("menus"));
|
||||
$(document).on('click', '.menu_click', function(event){
|
||||
var menu_id = $(this).attr("data-id");
|
||||
var name = $(this).attr("data-name");
|
||||
var menus = JSON.parse(localStorage.getItem("menus"));
|
||||
|
||||
if (menus != null) {
|
||||
menu_click_cache_append(name,menus,menu_id);
|
||||
}else{
|
||||
var url = "get_menu/"+menu_id;
|
||||
show_menu_cat_list(name, url);
|
||||
}
|
||||
});
|
||||
if (menus != null) {
|
||||
menu_click_cache_append(name,menus,menu_id);
|
||||
}else{
|
||||
var url = "get_menu/"+menu_id;
|
||||
show_menu_cat_list(name, url);
|
||||
}
|
||||
});
|
||||
//End menu category Click
|
||||
|
||||
function menu_click_cache_append(name,menus,menu_id) {
|
||||
var menu_list = $('.menu_items_list');
|
||||
menu_list.empty();
|
||||
var menu_list = $('.menu_items_list');
|
||||
menu_list.empty();
|
||||
|
||||
var menu_cat = $('.category_list');
|
||||
menu_cat.empty();
|
||||
var menu_cat = $('.category_list');
|
||||
menu_cat.empty();
|
||||
|
||||
$(".main_menu").text(name);
|
||||
$(".main_menu").text(name);
|
||||
|
||||
// row = ' <li class="nav-item product" data-ref="<%= origami_get_all_product_path %>">'
|
||||
// +'<a class="nav-link" data-toggle="tab" href="" role="tab">Products</a>'
|
||||
@@ -674,7 +674,7 @@
|
||||
for(var i in menus) {
|
||||
|
||||
if (menu_id == menus[i]["id"] && menus[i]["is_active"] == true) {
|
||||
|
||||
|
||||
// menu_list_template(menus[i]);
|
||||
var category = menus[i]["categories"];
|
||||
|
||||
@@ -699,33 +699,33 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function category_list_template(menu) {
|
||||
row = '<li class="nav-item">'
|
||||
+'<p class="hidden menu-id">'+menu.id+'</p> '
|
||||
+'<a class="nav-link menu_category sub_click first_'+menu.id+'" '
|
||||
+'data-toggle="tab" href="" role="tab" data-id="'+menu.id+'" '
|
||||
+'data-sub-id="'+menu.sub_category+'">'+menu.name+''
|
||||
+'</a>'
|
||||
+'<ul class="sub_category_list hidden fadeInTop animated" '
|
||||
+'id="sub_category_list">'
|
||||
+'</ul>'
|
||||
|
||||
+' </li>';
|
||||
$(".category_cache_list").append(row);
|
||||
}
|
||||
function category_list_template(menu) {
|
||||
row = '<li class="nav-item">'
|
||||
+'<p class="hidden menu-id">'+menu.id+'</p> '
|
||||
+'<a class="nav-link menu_category sub_click first_'+menu.id+'" '
|
||||
+'data-toggle="tab" href="" role="tab" data-id="'+menu.id+'" '
|
||||
+'data-sub-id="'+menu.sub_category+'">'+menu.name+''
|
||||
+'</a>'
|
||||
+'<ul class="sub_category_list hidden fadeInTop animated" '
|
||||
+'id="sub_category_list">'
|
||||
+'</ul>'
|
||||
|
||||
function menu_list_template(menu) {
|
||||
row = '<li class="nav-item menu_click" data-name="'+menu.name+'" '
|
||||
+' data-id="'+menu.id+'" style="">'
|
||||
+' <a class="nav-link" data-toggle="tab" href="" role="tab"'
|
||||
+' style="text-transform: lowercase;">'+menu.name+'</a>'
|
||||
+'</li>';
|
||||
$(".menu_cache_list").append(row);
|
||||
}
|
||||
+' </li>';
|
||||
$(".category_cache_list").append(row);
|
||||
}
|
||||
|
||||
function menu_list_template(menu) {
|
||||
row = '<li class="nav-item menu_click" data-name="'+menu.name+'" '
|
||||
+' data-id="'+menu.id+'" style="">'
|
||||
+' <a class="nav-link" data-toggle="tab" href="" role="tab"'
|
||||
+' style="text-transform: lowercase;">'+menu.name+'</a>'
|
||||
+'</li>';
|
||||
$(".menu_cache_list").append(row);
|
||||
}
|
||||
|
||||
//show menu item list when click menu category
|
||||
function show_menu_cat_list(name, url_item){
|
||||
@@ -741,12 +741,12 @@
|
||||
if (cashier_type != -1 && modify_order != -1) {
|
||||
url_item = '../../../addorders/'+url_item;
|
||||
}
|
||||
if(modify_order == -1 && cashier_type != -1){
|
||||
url_item = 'addorders/'+url_item
|
||||
}
|
||||
if (cashier_type ==-1 && modify_order == -1){
|
||||
url_item = url_item;
|
||||
}
|
||||
if(modify_order == -1 && cashier_type != -1){
|
||||
url_item = 'addorders/'+url_item
|
||||
}
|
||||
if (cashier_type ==-1 && modify_order == -1){
|
||||
url_item = url_item;
|
||||
}
|
||||
//Start Ajax
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
@@ -796,10 +796,10 @@
|
||||
|
||||
switch (input_type) {
|
||||
case 'num':
|
||||
var input_value = $(this).attr("data-value");
|
||||
if (original_value == "0"){
|
||||
$('#modal-qty').val(input_value);
|
||||
$('#modal-qty').attr('data-value',input_value);
|
||||
var input_value = $(this).attr("data-value");
|
||||
if (original_value == "0"){
|
||||
$('#modal-qty').val(input_value);
|
||||
$('#modal-qty').attr('data-value',input_value);
|
||||
// update_total_amount();
|
||||
}else{
|
||||
$('#modal-qty').val(original_qty + input_value);
|
||||
@@ -807,28 +807,28 @@
|
||||
// update_total_amount();
|
||||
}
|
||||
break;
|
||||
case 'add':
|
||||
case 'add':
|
||||
|
||||
case 'del' :
|
||||
case 'del' :
|
||||
|
||||
case 'clr':
|
||||
case 'clr':
|
||||
$('#modal-qty').val(1);
|
||||
$('#modal-qty').attr('data-value',0);
|
||||
// update_total_amount();
|
||||
break;
|
||||
|
||||
}
|
||||
event.handled = true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
/* check webview loaded*/
|
||||
var webview = '';
|
||||
<%if @webview %>
|
||||
var webview = <%= @webview %>;
|
||||
showHideNavbar(webview);
|
||||
<% end %>
|
||||
});
|
||||
</script>
|
||||
}
|
||||
event.handled = true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
/* check webview loaded*/
|
||||
var webview = '';
|
||||
<%if @webview %>
|
||||
var webview = <%= @webview %>;
|
||||
showHideNavbar(webview);
|
||||
<% end %>
|
||||
});
|
||||
</script>
|
||||
@@ -22,7 +22,7 @@
|
||||
<!-- Widgets -->
|
||||
<div class="row clearfix">
|
||||
<% if @quick_service == '1' %>
|
||||
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-12 qs_view">
|
||||
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-10 qs_view">
|
||||
<div class="info-box bg-purple">
|
||||
<div class="icon" >
|
||||
<i class="material-icons">arrow_forward</i>
|
||||
@@ -32,7 +32,7 @@
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @dinein_cashier == '1' %>
|
||||
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-12 cashier_view">
|
||||
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-10 cashier_view">
|
||||
<div class="info-box bg-green">
|
||||
<div class="icon" >
|
||||
<i class="material-icons">arrow_forward</i>
|
||||
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @order_reservation == '1' %>
|
||||
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-12 order_reservation">
|
||||
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-10 order_reservation">
|
||||
<div class="info-box bg-blue">
|
||||
<div class="icon" >
|
||||
<i class="material-icons">arrow_forward</i>
|
||||
|
||||
@@ -325,7 +325,7 @@
|
||||
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 div_card_order">
|
||||
<div class="card m-b-5 p-t-5">
|
||||
<div class="card-header custom-card-header" style="color:">
|
||||
<div class="card-header custom-card-header">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td width ="10%" class="header-td align-left">
|
||||
@@ -343,7 +343,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-block custom-card-block">
|
||||
<div id="order-detail-slimscroll" data-height="220">
|
||||
<div id="order-detail-slimscroll" data-height="110">
|
||||
<table class="table summary-items">
|
||||
<tbody>
|
||||
<!-- <tr>
|
||||
@@ -393,39 +393,6 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer grand-card-footer">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width ="70%" class="footer-td align-left col-blue">
|
||||
GRAND TOTAL
|
||||
</td>
|
||||
<td width ="30%" class="footer-td align-right col-blue" id="grand_total">0.00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width ="50%" class="footer-td align-left col-blue">
|
||||
<button type="button" class="btn btn-lg bg-red waves-effect" id="cancel" data-value="rejected">
|
||||
<strong>REJECT</strong>
|
||||
</button>
|
||||
</td>
|
||||
<td width ="50%" class="footer-td align-right col-blue">
|
||||
<button type="button" class="btn btn-lg bg-blue waves-effect " id="accepted" data-value="accepted">
|
||||
ACCEPT
|
||||
</button>
|
||||
<!-- <button type="button" class="btn btn-lg bg-blue waves-effect hidden" id="accepted" data-value="delivery">
|
||||
<strong>SEND TO KITCHEN</strong>
|
||||
</button>
|
||||
<button type="button" class="btn btn-lg bg-blue waves-effect hidden" id="accepted" data-value="completed">
|
||||
<strong>READY TO DELIVERY</strong>
|
||||
</button>
|
||||
<button type="button" class="btn btn-lg bg-blue waves-effect hidden" id="accepted" data-value="pick-up">
|
||||
<strong>PICK UP</strong>
|
||||
</button> -->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -454,7 +421,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="body-td align-left">
|
||||
<span class="font-13">REQUESTED TIME</span><br>
|
||||
<span class="font-13">DELIVERY REQUESTED TIME</span><br>
|
||||
<b id="requested_time"></b>
|
||||
</td>
|
||||
<td class="body-td align-right expected_time">
|
||||
@@ -463,26 +430,22 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="body-td align-left">
|
||||
<td class="body-td align-left">
|
||||
<span class="font-13">NAME</span><br>
|
||||
<b id="customer_name"></b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="body-td align-left">
|
||||
<td class="body-td align-left">
|
||||
<span class="font-13">PHONE</span><br>
|
||||
<b id="phone"></b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="body-td align-left">
|
||||
<td class="body-td align-left">
|
||||
<span class="font-13">ADDRESS</span><br>
|
||||
<b id="address"></b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="body-td align-left">
|
||||
<span class="font-13">DELEVERY</span><br>
|
||||
<td class="body-td align-left">
|
||||
<span class="font-13">DELIVERY</span><br>
|
||||
<b id="delivery_to"></b>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -499,16 +462,59 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- <table class="table">
|
||||
<tr>
|
||||
<td colspan="2" class="body-td align-left">
|
||||
<span class="font-13">ACCEPTED</span><br>
|
||||
<b id="accepted_time">Sept 06, 2018(Weds) 10:00 AM</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="body-td align-left">
|
||||
<span class="font-13">SEND TO KITCHEN</span><br>
|
||||
<b id="send_kitchen_time">Sept 06, 2018(Weds) 11:00 AM</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="body-td align-left">
|
||||
<span class="font-13">READY TO DELIVERY</span><br>
|
||||
<b id="ready_delivery_time">Sept 06, 2018(Weds) 12:00 PM</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table> -->
|
||||
</div>
|
||||
<div class="card-footer order_close_cashier">
|
||||
<% if current_user.role != "waiter" %>
|
||||
<div class="row">
|
||||
<div class="col-sm-7 col-xs-7 col-md-7 col-lg-7"></div>
|
||||
<div class="col-sm-4 col-xs-4 col-md-4 col-lg-4">
|
||||
<button id="order_close_cashier" class="align-right text-center btn btn-md btn-link btn-primary waves-effect"><%= t("views.btn.close_cashier") %></button>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="card-footer grand-card-footer">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width ="70%" class="footer-td align-left col-blue grand-total-padding">
|
||||
GRAND TOTAL
|
||||
</td>
|
||||
<td width ="30%" class="footer-td align-right col-blue grand-total-padding" id="grand_total">0.00</td>
|
||||
</tr>
|
||||
<tr class="order_btns">
|
||||
<td width ="50%" class="footer-td align-left col-blue">
|
||||
<button type="button" class="btn btn-md bg-red waves-effect" id="cancel" data-value="rejected">
|
||||
<strong>REJECT</strong>
|
||||
</button>
|
||||
</td>
|
||||
<td width ="50%" class="footer-td align-right col-blue">
|
||||
<button type="button" class="btn btn-md bg-blue waves-effect " id="accepted" data-value="accepted">
|
||||
ACCEPT
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<% if current_user.role != "waiter" %>
|
||||
<tr class="order_close_cashier" style="display:none">
|
||||
<td colspan="2" width="100%" class="footer-td align-right col-blue">
|
||||
<button id="order_close_cashier" class="btn btn-md bg-blue waves-effect"><%= t("views.btn.close_cashier") %></button>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -530,12 +536,12 @@
|
||||
<h4 class="modal-title" id="waiting_timeModalLabel">Expected Waiting Time for <span id="requested_order_time"></span></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row text-center m-t-20">
|
||||
<!-- <div class="row text-center m-t-20">
|
||||
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3"></div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
|
||||
<button type="button" class="btn btn-lg btn-link bg-info timer_type" data-value="after">After</button>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="row text-center m-t-20">
|
||||
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
|
||||
@@ -561,11 +567,19 @@
|
||||
<button type="button" class="btn btn-lg btn-link bg-info time_interval" data-value="90">90 Mins.</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row text-center m-t-20">
|
||||
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
|
||||
<button type="button" class="btn btn-lg btn-link bg-info time_interval" data-value="105">105 Mins.</button>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
|
||||
<button type="button" class="btn btn-lg btn-link bg-info time_interval" data-value="120">120 Mins.</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer ">
|
||||
<div class="row p-r-20">
|
||||
<div class="col-md-5">
|
||||
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-red waves-effect" data-dismiss="modal">CLOSE</button>
|
||||
<button type="button" style="margin-bottom: 10px;" class="btn btn-lg btn-link bg-red waves-effect" data-dismiss="modal">CLOSE</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -587,11 +601,11 @@
|
||||
</div>
|
||||
<div class="modal-footer ">
|
||||
<div class="row p-r-20">
|
||||
<div class="col-md-5">
|
||||
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue waves-effect send_status">SEND</button>
|
||||
<div class="col-md-5 mr-1">
|
||||
<button type="button" class="btn btn-lg btn-link p-t-5 p-b-5 bg-blue waves-effect send_status">SEND</button>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-red waves-effect" data-dismiss="modal">CLOSE</button>
|
||||
<button type="button" class="btn btn-lg btn-link p-t-5 p-b-5 bg-red waves-effect" data-dismiss="modal">CLOSE</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -76,7 +76,7 @@ en:
|
||||
date_time: "DateTime"
|
||||
dine_in_cashier: "Dine-in Cashier"
|
||||
quick_service: "Quick Service"
|
||||
order_reservation: "Order & Reservation"
|
||||
order_reservation: "Online Order"
|
||||
pending: "Pending"
|
||||
processing: "Processing"
|
||||
delivering: "Delivering"
|
||||
@@ -479,7 +479,7 @@ en:
|
||||
adult: "Adult"
|
||||
foreigner: "Foreigner"
|
||||
local: "Local"
|
||||
order_reservation_report: "Order Reservation"
|
||||
order_reservation_report: "Online Order"
|
||||
requested_time: "Requested Time"
|
||||
provider: "Provider"
|
||||
delivery_fee: "Delivery Fee"
|
||||
@@ -489,7 +489,7 @@ en:
|
||||
convenience_tax: "Convenience Tax"
|
||||
commercial_tax: "Commercial Tax"
|
||||
select_providers: "Select Providers"
|
||||
order_reservation: "Order Reservation"
|
||||
order_reservation: "Online Order"
|
||||
cooking_time: "Cooking Time"
|
||||
township: "Township"
|
||||
induty_report: "Induty Report"
|
||||
|
||||
@@ -71,7 +71,7 @@ mm:
|
||||
date_time: "ရက်စွဲအချိန်"
|
||||
dine_in_cashier: "Dine-in Cashier"
|
||||
quick_service: "Quick Service"
|
||||
order_reservation: "Order & Reservation"
|
||||
order_reservation: "Online Order မွာယူျခင္း"
|
||||
pending: "Pending"
|
||||
processing: "Processing"
|
||||
delivering: "Delivering"
|
||||
@@ -473,7 +473,7 @@ mm:
|
||||
adult: "လူကြီး"
|
||||
foreigner: "နိုင်ငံခြားသား"
|
||||
local: "နိုင်ငံသား"
|
||||
order_reservation_report: "ၾကိဳတင္ order မွာယူျခင္း"
|
||||
order_reservation_report: "online order မွာယူျခင္း"
|
||||
requested_time: "Requested Time"
|
||||
provider: "Provider"
|
||||
delivery_fee: "Delivery Fee"
|
||||
@@ -483,7 +483,7 @@ mm:
|
||||
convenience_tax: "Convenience Tax"
|
||||
commercial_tax: "Commercial Tax"
|
||||
select_providers: "Select Providers"
|
||||
order_reservation: "Order Reservation"
|
||||
order_reservation: "online order မွာယူျခင္း"
|
||||
cooking_time: "Cooking Time"
|
||||
township: "Township"
|
||||
induty_report: "Induty Report"
|
||||
|
||||
@@ -288,6 +288,7 @@ scope "(:locale)", locale: /en|mm/ do
|
||||
get 'order_reservation/get_order/:id' => "order_reservation#get_order",:as => "get_order", :defaults => { :format => 'json' }
|
||||
post 'order_reservation/update', to: "order_reservation#update" , :defaults => { :format => 'json' }
|
||||
post 'order_reservation/send_status', to: "order_reservation#send_status", :defaults => { :format => 'json' }
|
||||
get 'get_order_info', to: "order_reservation#get_order_info", :as => "get_order_info", :defaults => { :format => 'json' }
|
||||
|
||||
#credit payment routes
|
||||
post '/:type/credit_sales' => "dashboard#get_credit_sales", :as => "get_credit_sales", :defaults => { :format => 'json' }
|
||||
|
||||
Reference in New Issue
Block a user