change order reservation
This commit is contained in:
@@ -101,6 +101,14 @@ $(function() {
|
||||
var menu_id = $(this).attr("data-id");
|
||||
var url = "get_menu_category/"+menu_id;
|
||||
show_menu_item_list(url);
|
||||
|
||||
var sub_id = $(this).attr("data-sub-id");
|
||||
if (sub_id == "true") {
|
||||
console.log("hhhhhhhhhhhhhhhhh")
|
||||
var sub_url = "get_menu_sub_category/"+menu_id;
|
||||
sub_category = $(this).find('.sub_category_list');
|
||||
show_sub_category_list(sub_url,sub_category);
|
||||
}
|
||||
});
|
||||
//End menu category Click
|
||||
|
||||
@@ -457,9 +465,10 @@ $(function() {
|
||||
|
||||
var items = $('.selected-set');
|
||||
if (items.length >= min_qty) {
|
||||
|
||||
if ($('#server_mode').val() != "cloud") {
|
||||
item = get_set_item(items);
|
||||
customer_display_view(item,"set_add");
|
||||
}
|
||||
var option = []
|
||||
attribute_arr = []
|
||||
|
||||
@@ -786,8 +795,10 @@ $(function() {
|
||||
$('.add_to_order').attr('data-options',JSON.stringify(option_arr));
|
||||
$('.add_to_order').attr('data-opt',JSON.stringify(option_arr));
|
||||
var item_data = $(this);
|
||||
item = get_item(item_data,"add_to_order");
|
||||
customer_display_view(item,"add");
|
||||
if ($('#server_mode').val() != "cloud") {
|
||||
item = get_item(item_data,"add_to_order");
|
||||
customer_display_view(item,"add");
|
||||
}
|
||||
show_item_detail(item_data,"add_to_order");
|
||||
calculate_sub_total();
|
||||
|
||||
@@ -796,8 +807,10 @@ $(function() {
|
||||
// click plus icon for add
|
||||
$(document).on('click', '.add_icon', function(event){
|
||||
var item_data = $(this);
|
||||
item = get_item(item_data,"add_icon");
|
||||
customer_display_view(item,"add");
|
||||
if ($('#server_mode').val() != "cloud") {
|
||||
item = get_item(item_data,"add_icon");
|
||||
customer_display_view(item,"add");
|
||||
}
|
||||
show_item_detail(item_data,"add_icon");
|
||||
calculate_sub_total();
|
||||
}); //End Add Icon Click
|
||||
@@ -922,7 +935,9 @@ console.log(d_option)
|
||||
window.location.href = "/origami/room/" + table_id
|
||||
}
|
||||
}
|
||||
customer_display_view(null,"reload");
|
||||
if ($('#server_mode').val() != "cloud") {
|
||||
customer_display_view(null,"reload");
|
||||
}
|
||||
}
|
||||
});
|
||||
// }else{
|
||||
@@ -1225,7 +1240,7 @@ console.log(d_option)
|
||||
|
||||
//click menu sidebar menu category
|
||||
|
||||
$(document).on('click', '.sub_click', function(event){
|
||||
$(document).on('click', '.sub_clickssss', function(event){
|
||||
event.preventDefault();
|
||||
var menu_id = $(this).attr("data-id");
|
||||
var url = "get_menu_sub_category/"+menu_id;
|
||||
@@ -1260,11 +1275,11 @@ console.log(d_option)
|
||||
data = data.sub_category;
|
||||
|
||||
if (data.length>0) {
|
||||
if ((sub_category.hasClass('hidden'))) {
|
||||
// if ((sub_category.hasClass('hidden'))) {
|
||||
$(sub_category).removeClass('hidden');
|
||||
}else{
|
||||
$(sub_category).addClass('hidden');
|
||||
}
|
||||
// }else{
|
||||
// $(sub_category).addClass('hidden');
|
||||
// }
|
||||
|
||||
for(var i in data) {
|
||||
|
||||
|
||||
@@ -7,41 +7,37 @@ App.checkin = App.cable.subscriptions.create('OrderReservationChannel', {
|
||||
|
||||
received: function(data) {
|
||||
var order = data.data;
|
||||
var rowCount = $('.order_reserve_cable tbody tr').length+1;
|
||||
if(order.length > 0){
|
||||
$('.order_reserve_cable tbody').html("");
|
||||
$.each(order, function(key,value){
|
||||
var rowCount = key+1;
|
||||
var date = new Date(value.created_at);
|
||||
|
||||
var isPM = date.getHours() >= 12;
|
||||
var isMidday = date.getHours() == 12;
|
||||
var time = [date.getHours() - (isPM && !isMidday ? 12 : 0),
|
||||
date.getMinutes() || '00'].join(':') +
|
||||
(isPM ? ' PM' : 'AM');
|
||||
var created_at = date.getFullYear() +'-'+ (date.getMonth() > 10? date.getMonth() : '0' + (date.getMonth() + 1)) +'-'+ date.getDate();
|
||||
|
||||
var date = new Date(order.requested_time);
|
||||
var requested_time = date.getHours()+ ':' + date.getMinutes()+ '-' + date.getMinutes();
|
||||
|
||||
var isPM = date.getHours() >= 12;
|
||||
var isMidday = date.getHours() == 12;
|
||||
var result = document.querySelector('#result');
|
||||
var time = [date.getHours() - (isPM && !isMidday ? 12 : 0),
|
||||
date.getMinutes() || '00'].join(':') +
|
||||
(isPM ? ' PM' : 'AM');
|
||||
var month = 0;
|
||||
if(parseInt(newDate.getMonth()) > 10){
|
||||
month = parseInt(newDate.getMonth()) + 1;
|
||||
row = '<tr class="custom-tr first-'+rowCount+'" style="" data-id="'+value.order_reservation_id+'" data-sr-no="'+rowCount+'">'
|
||||
+'<td width ="5%" class="align-left">'+rowCount
|
||||
+'</td>'
|
||||
+'<td width ="20%" class="align-center">'+created_at
|
||||
+'</td>'
|
||||
+'<td width ="20%" class="align-center">'+time
|
||||
+'</td>'
|
||||
+'<td width ="20%" class="align-center">'+value.grand_total
|
||||
+'</td>'
|
||||
+'<td width ="30%" class="align-center">'
|
||||
+'<span class="font-10 col-blue">'+ value.status +'</span>'
|
||||
+'</td>'
|
||||
+' </tr>'
|
||||
|
||||
$('.order_reserve_cable tbody').append(row);
|
||||
});
|
||||
}
|
||||
else{
|
||||
month = '0' + (parseInt(newDate.getMonth()) + 1);
|
||||
}
|
||||
var requested_date = date.getFullYear() +'-'+ month +'-'+ date.getDate();
|
||||
|
||||
row = '<tr class="custom-tr first-'+rowCount+'" style="" data-id="'+order.order_reservation_id+'" data-sr-no="'+rowCount+'">'
|
||||
+'<td width ="5%" class="align-left">'+rowCount
|
||||
+'</td>'
|
||||
+'<td width ="20%" class="align-center">'+requested_date
|
||||
+'</td>'
|
||||
+'<td width ="20%" class="align-center">'+time
|
||||
+'</td>'
|
||||
+'<td width ="20%" class="align-center">'+order.grand_total
|
||||
+'</td>'
|
||||
+'<td width ="30%" class="align-center">'
|
||||
+'<span class="font-10 col-blue">'+ order.status +'</span>'
|
||||
+'</td>'
|
||||
+' </tr>'
|
||||
|
||||
$('.order_reserve_cable tbody').append(row);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -38,6 +38,7 @@ $(function() {
|
||||
});
|
||||
|
||||
function refreshDetailData(){
|
||||
$('#requested_date_time').text("");
|
||||
$("#sr_number").text("");
|
||||
$("#delivery_info").text("");
|
||||
$("#contact_info").text("");
|
||||
@@ -45,6 +46,7 @@ $(function() {
|
||||
$('#sub_total').text("0.00");
|
||||
$('#delivery_fee').text("0.00");
|
||||
$('#total_charges').text("0.00");
|
||||
$('#discount_amount').text("0.00");
|
||||
$('#total_tax').text("0.00");
|
||||
$('#grand_total').text("0.00");
|
||||
}
|
||||
@@ -72,15 +74,7 @@ $(function() {
|
||||
var time = [newDate.getHours() - (isPM && !isMidday ? 12 : 0),
|
||||
newDate.getMinutes() || '00'].join(':') +
|
||||
(isPM ? ' PM' : 'AM');
|
||||
var month = 0;
|
||||
if(parseInt(newDate.getMonth()) > 10){
|
||||
month = parseInt(newDate.getMonth()) + 1;
|
||||
}
|
||||
else{
|
||||
month = '0' + (parseInt(newDate.getMonth()) + 1);
|
||||
}
|
||||
|
||||
var requested_date = newDate.getFullYear() + '-' + month +'-'+ newDate.getDate() +' '+time;
|
||||
var requested_date = newDate.getFullYear() + '-' + (newDate.getMonth() > 10? newDate.getMonth() : '0' + (newDate.getMonth() + 1)) +'-'+ newDate.getDate() +' '+time;
|
||||
|
||||
item_list.empty();
|
||||
|
||||
@@ -103,14 +97,25 @@ $(function() {
|
||||
$('.summary-items').append(row);
|
||||
}
|
||||
|
||||
if(data.discount_amount > 0){
|
||||
$("#discount").show();
|
||||
}
|
||||
|
||||
$('#requested_date_time').text(requested_date);
|
||||
$('#sub_total').text(data.total_amount);
|
||||
$('#delivery_fee').text(delivery.delivery_fee? delivery.delivery_fee : '0.0');
|
||||
$('#total_charges').text(data.convenience_charge?data.convenience_charge : '0.0');
|
||||
$('#delivery_fee').text((parseFloat(delivery.delivery_fee) > 0)? delivery.delivery_fee : '0.0');
|
||||
$('#total_charges').text((parseFloat(data.convenience_charge) > 0)? data.convenience_charge : '0.0');
|
||||
$('#discount_amount').text((parseFloat(data.discount_amount) > 0)? data.discount_amount : '0.0');
|
||||
$('#total_tax').text(data.total_tax);
|
||||
$('#grand_total').text(data.grand_total);
|
||||
|
||||
var address = delivery.address +', ' +delivery.township+", (" +delivery.direction_address+")"
|
||||
var address = delivery.address;
|
||||
if(delivery.township != null && delivery.township!=""){
|
||||
address += ', ' +delivery.township;
|
||||
}else if(delivery.direction_address!=null && delivery.direction_address!=""){
|
||||
address += ", (" +delivery.direction_address+")";
|
||||
}
|
||||
$('#requested_time').text(requested_date);
|
||||
$('#customer_name').text(data.customer_name);
|
||||
$('#phone').text(data.phone);
|
||||
$('#address').text(address);
|
||||
@@ -122,8 +127,10 @@ $(function() {
|
||||
|
||||
if(delivery.delivery_type == "service"){
|
||||
$("#delivery_info").text("(DELIVERY)");
|
||||
}else if(delivery.delivery_type == "self_pick_up"){
|
||||
}else if(delivery.delivery_type == "pick_up"){
|
||||
$("#delivery_info").text("(PICK-UP)");
|
||||
}else{
|
||||
$("#delivery_info").text("(DIRECT DELIVERY)");
|
||||
}
|
||||
|
||||
if(data.order_remark!=null && data.order_remark!=""){
|
||||
@@ -131,7 +138,7 @@ $(function() {
|
||||
}else if(data.reservation_remark!=null && data.reservation_remark!=""){
|
||||
$("#order_remark").text(data.reservation_remark);
|
||||
}
|
||||
$("#sr_number").text("No."+sr_no);
|
||||
$("#sr_number").text("NO."+sr_no);
|
||||
if (data["receipt_no"]) {
|
||||
$("#contact_info").text(data["receipt_no"]);
|
||||
}else{
|
||||
|
||||
@@ -88,4 +88,7 @@
|
||||
}
|
||||
.div_order_margin {
|
||||
margin: 0px 0px 0px -5px !important
|
||||
}
|
||||
.div_card_order {
|
||||
margin: 0px -5px !important
|
||||
}
|
||||
@@ -59,7 +59,7 @@ class Api::OrderReserve::OrderReservationController < Api::ApiController
|
||||
order_reservation = params
|
||||
order_reservation_id, flag = OrderReservation.addOrderReservationInfo(order_reservation)
|
||||
|
||||
order_reservation = OrderReservation.find(order_reservation_id)
|
||||
order_reservation = OrderReservation.latest_order.where("status = 'new'") #find(order_reservation_id)
|
||||
if flag #&& ENV["SERVER_MODE"] != 'cloud'
|
||||
ActionCable.server.broadcast "order_reservation_channel",data: order_reservation
|
||||
end
|
||||
|
||||
@@ -23,6 +23,8 @@ class Origami::AddordersController < BaseOrigamiController
|
||||
day = Date.today.wday
|
||||
@menus = Menu.all
|
||||
@menu = MenuCategory.active.where("menu_id =#{@menus[0].id}").order('order_by asc')
|
||||
puts "ssssssssssssssssssssssss"
|
||||
puts @menu.to_json
|
||||
@table_id = params[:id]
|
||||
@table = DiningFacility.find(@table_id)
|
||||
@booking = @table.get_booking
|
||||
|
||||
@@ -86,11 +86,12 @@ def create
|
||||
|
||||
# saleObj = Sale.find(sale_id)
|
||||
sale_payment = SalePayment.new
|
||||
status, @sale = sale_payment.process_payment(saleObj, @user, cash, "dinga",account_no)
|
||||
if status == true
|
||||
status, @sale,@membership_data = sale_payment.process_payment(saleObj, @user, cash, "dinga",account_no)
|
||||
|
||||
if status == true && @membership_data["status"] == true
|
||||
@out = true, "Success!"
|
||||
else
|
||||
@out =false, "Please try again payment!"
|
||||
@out =false, @membership_data["message"]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -88,11 +88,11 @@ def create
|
||||
|
||||
# saleObj = Sale.find(sale_id)
|
||||
sale_payment = SalePayment.new
|
||||
status, @sale = sale_payment.process_payment(saleObj, @user, cash, "paymal",account_no)
|
||||
if status == true
|
||||
status, @sale,@membership_data = sale_payment.process_payment(saleObj, @user, cash, "paymal",account_no)
|
||||
if status == true && @membership_data["status"] == true
|
||||
@out = true, "Success!"
|
||||
else
|
||||
@out =false, "Please try again payment!"
|
||||
@out =false, @membership_data["message"]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -20,7 +20,7 @@ authorize_resource :class => false
|
||||
payment_type = params[:payment_type]
|
||||
@sale_data = Sale.get_shift_sales_by_receipt_no(@shift_sale_range,@shift,from,to,payment_type)
|
||||
@sale_taxes = Sale.get_separate_tax(@shift_sale_range,@shift,from,to,payment_type)
|
||||
@tax_profiles = TaxProfile.order('order_by asc')
|
||||
@tax_profiles = TaxProfile.order('order_by asc').limit(2)
|
||||
@from = from
|
||||
@to = to
|
||||
# get printer info
|
||||
|
||||
@@ -78,6 +78,14 @@ class MenuCategory < ApplicationRecord
|
||||
end
|
||||
end
|
||||
|
||||
def get_sub_category
|
||||
menu_category = MenuCategory.find_by_menu_category_id(self.id)
|
||||
if menu_category
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# def generate_menu_category_code
|
||||
|
||||
@@ -5,9 +5,9 @@ class OrderReservation < ApplicationRecord
|
||||
before_create :generate_custom_id
|
||||
|
||||
has_many :order_reservation_items
|
||||
belongs_to :delivery
|
||||
has_one :delivery
|
||||
|
||||
scope :latest_order, -> { order("order_reservation_id desc, requested_time asc") }
|
||||
scope :latest_order, -> { order("order_reservation_id desc, created_at desc") }
|
||||
|
||||
SEND_TO_KITCHEN = "send_to_kitchen"
|
||||
READY_TO_DELIVERY = "ready_to_deliver"
|
||||
@@ -21,7 +21,7 @@ class OrderReservation < ApplicationRecord
|
||||
order_reservation = OrderReservation.new
|
||||
order_reservation.order_reservation_type = order_reserve[:order_type]
|
||||
order_reservation.customer_id = order_reserve[:cus_info]
|
||||
order_reservation.requested_time = DateTime.parse(order_reserve[:requested_time]).utc.strftime("%Y-%m-%d %H:%M:%S")
|
||||
order_reservation.requested_time = DateTime.parse(order_reserve[:requested_time]).utc
|
||||
order_reservation.callback_url = order_reserve[:callback_url]
|
||||
order_reservation.transaction_ref = order_reserve[:reference]
|
||||
if order_reserve[:order_info]
|
||||
|
||||
@@ -23,6 +23,7 @@ class SalePayment < ApplicationRecord
|
||||
|
||||
if (amount_due >= 0)
|
||||
payment_status = false
|
||||
membership_data = nil
|
||||
#route to payment type
|
||||
case payment_method
|
||||
when "cash"
|
||||
@@ -52,11 +53,11 @@ class SalePayment < ApplicationRecord
|
||||
when "foc"
|
||||
payment_status = foc_payment
|
||||
when "paymal"
|
||||
payment_status = paymal_payment
|
||||
payment_status,membership_data = paymal_payment
|
||||
when "JunctionPay"
|
||||
payment_status = junction_pay_payment
|
||||
when "dinga"
|
||||
payment_status = dinga_payment
|
||||
payment_status,membership_data = dinga_payment
|
||||
else
|
||||
puts "it was something else"
|
||||
end
|
||||
@@ -73,7 +74,7 @@ class SalePayment < ApplicationRecord
|
||||
end
|
||||
end
|
||||
|
||||
return true, self.save
|
||||
return true, self.save,membership_data
|
||||
else
|
||||
#record an payment in sale-audit
|
||||
# remark = "No outstanding Amount - Grand Total [#{invoice.grand_total}] | Due [#{amount_due}] | Paid [#{invoice.amount_received}]"
|
||||
@@ -430,7 +431,7 @@ class SalePayment < ApplicationRecord
|
||||
sale_update_payment_status(0)
|
||||
end
|
||||
|
||||
return payment_status
|
||||
return payment_status,membership_data
|
||||
end
|
||||
|
||||
def junction_pay_payment
|
||||
@@ -480,7 +481,7 @@ class SalePayment < ApplicationRecord
|
||||
sale_update_payment_status(0)
|
||||
end
|
||||
|
||||
return payment_status
|
||||
return payment_status,membership_data
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<!--if type quick_service or cashier for table -->
|
||||
<% if type %>
|
||||
<% if !menu.code.include? "SPL" %>
|
||||
<li class="nav-item menu_category sub_click first_<%=menu.id%>" data-id="<%=menu.id%>">
|
||||
<li class="nav-item menu_category sub_click first_<%=menu.id%>" data-id="<%=menu.id%>" data-sub-id="<%=menu.get_sub_category%>">
|
||||
<p class="hidden menu-id"><%= menu.id %></p>
|
||||
<a class="nav-link" data-toggle="tab" href="" role="tab"> <%= menu.name%>
|
||||
<ul class="sub_category_list hidden fadeInTop animated" id="sub_category_list">
|
||||
@@ -58,7 +58,7 @@
|
||||
<% else %>
|
||||
<% if @table.get_current_checkout_booking.nil? %>
|
||||
<% if !menu.code.include? "SPL" %>
|
||||
<li class="nav-item menu_category sub_click first_<%=menu.id%>" data-id="<%=menu.id%>">
|
||||
<li class="nav-item menu_category sub_click first_<%=menu.id%>" data-id="<%=menu.id%> " data-sub-id="<%=menu.get_sub_category%>">
|
||||
<p class="hidden menu-id"><%= menu.id %></p>
|
||||
<a class="nav-link" data-toggle="tab" href="" role="tab"> <%= menu.name%>
|
||||
<ul class=" sub_category_list hidden fadeInTop animated" id="sub_category_list">
|
||||
@@ -67,7 +67,7 @@
|
||||
</li>
|
||||
<% end%>
|
||||
<% else %>
|
||||
<li class="nav-item menu_category sub_click first_<%=menu.id%>" data-id="<%=menu.id%>">
|
||||
<li class="nav-item menu_category sub_click first_<%=menu.id%>" data-id="<%=menu.id%>" data-sub-id="<%=menu.get_sub_category%>">
|
||||
<p class="hidden menu-id"><%= menu.id %></p>
|
||||
<a class="nav-link" data-toggle="tab" href="" role="tab"> <%= menu.name%>
|
||||
<ul class=" sub_category_list hidden fadeInTop animated" id="sub_category_list">
|
||||
@@ -490,11 +490,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<style type="text/css">
|
||||
.fadeInRight{
|
||||
-webkit-animation-duration: 350ms !important;
|
||||
}
|
||||
</style>
|
||||
<input type="hidden" name="server_mode" value="<%=ENV["SERVER_MODE"]%>" id="server_mode">
|
||||
|
||||
<style type="text/css">
|
||||
.fadeInRight{
|
||||
-webkit-animation-duration: 350ms !important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
jQuery(function(){
|
||||
id = "<%=@menu[0].id%>";
|
||||
|
||||
@@ -203,6 +203,7 @@
|
||||
<% end %>
|
||||
</div>
|
||||
<button type="button" data-href="<%=origami_second_display_index_path%>" target="_blank" id="second_view" class="btn action-btn bg-blue waves-effect second_view hidden" style="height: 45px">Customer View</button>
|
||||
<input type="hidden" name="server_mode" value="<%=ENV["SERVER_MODE"]%>" id="server_mode">
|
||||
<script>
|
||||
|
||||
$(".cashier_view").on('click', function() {
|
||||
@@ -210,7 +211,9 @@
|
||||
});
|
||||
|
||||
$(".qs_view").on('click', function() {
|
||||
document.getElementById('second_view').click();
|
||||
if ($('#server_mode').val() != "cloud") {
|
||||
document.getElementById('second_view').click();
|
||||
}
|
||||
window.location.href = '/origami/quick_service';
|
||||
});
|
||||
|
||||
|
||||
@@ -287,7 +287,7 @@
|
||||
});
|
||||
|
||||
}else{
|
||||
swal ( "Information" , result.message);
|
||||
swal ( "Opps",result.message ,"warning" );
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -364,7 +364,7 @@
|
||||
});
|
||||
|
||||
}else{
|
||||
swal ( "Information" , result.message);
|
||||
swal ( "Opps",result.message ,"warning" );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2,8 +2,8 @@ if @order
|
||||
|
||||
json.(@order, :order_reservation_id,:order_reservation_type,:customer_id,
|
||||
:requested_time,:callback_url,:transaction_ref,:item_count,:total_customer,:payment_type,
|
||||
:payment_status,:payment_ref,:total_amount,:total_tax,
|
||||
:discount_amount,:grand_total,:status,:order_remark,
|
||||
:payment_status,:payment_ref,:taxes,:total_amount,:total_tax,
|
||||
:discount_amount,:convenience_charge,:grand_total,:status,:order_remark,
|
||||
:reservation_remark,:sale_id)
|
||||
@delivery = Delivery.find_by_order_reservation_id(@order.order_reservation_id)
|
||||
if @delivery
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 div_order_margin">
|
||||
<ul class="nav nav-tabs tab-col-teal" role="tablist">
|
||||
<li class="nav-item red" data-color="#F44336" data-type="pending">
|
||||
<a class="nav-link" data-toggle="tab" href="#pending" role="tab"><p class="num p-t-20">
|
||||
<a class="nav-link" data-toggle="tab" href="#pending" role="tab"><p class="num p-t-15 p-b-5">
|
||||
<% if !@count_on_order.nil? %>
|
||||
<% @count_on_order.each do |count_order|
|
||||
if count_order.status == "new" %>
|
||||
@@ -15,7 +15,7 @@
|
||||
<% end %></p> <%= t :pending %></a>
|
||||
</li>
|
||||
<li class="nav-item purple" data-color="#673AB7" data-type="processing">
|
||||
<a class="nav-link" data-toggle="tab" href="#processing" role="tab"><p class="num p-t-20">
|
||||
<a class="nav-link" data-toggle="tab" href="#processing" role="tab"><p class="num p-t-15 p-b-5">
|
||||
<% if !@count_on_order.nil? %>
|
||||
<% @count_on_order.each do |count_order|
|
||||
if count_order.status == "accepted" %>
|
||||
@@ -24,8 +24,8 @@
|
||||
end %>
|
||||
<% end %></p> <%= t :processing %></a>
|
||||
</li>
|
||||
<li class="nav-item darkgreen" data-color="#009688" data-type="delivery" style="background-color: #009688;">
|
||||
<a class="nav-link" data-toggle="tab" href="#delivery" role="tab"><p class="num p-t-20">
|
||||
<li class="nav-item" data-color="#009688" data-type="delivery" style="background-color: #009688;">
|
||||
<a class="nav-link" data-toggle="tab" href="#delivery" role="tab"><p class="num p-t-15 p-b-5">
|
||||
<% if !@count_on_order.nil? %>
|
||||
<% @count_on_order.each do |count_order|
|
||||
if count_order.status == "send_to_kitchen" %>
|
||||
@@ -35,7 +35,7 @@
|
||||
<% end %></p> <%= t :delivering %></a>
|
||||
</li>
|
||||
<li class="nav-item" data-color="#03A9F4" data-type="completed" style="background-color: #03A9F4;">
|
||||
<a class="nav-link" data-toggle="tab" href="#completed" role="tab"><p class="num p-t-20">
|
||||
<a class="nav-link" data-toggle="tab" href="#completed" role="tab"><p class="num p-t-15 p-b-5">
|
||||
<% if !@count_on_order.nil? %>
|
||||
<% @count_on_order.each do |count_order|
|
||||
if count_order.status == "ready_to_delivery" %>
|
||||
@@ -69,7 +69,15 @@
|
||||
<%=order.grand_total%>
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<span class="font-10 col-blue"><%= order.status %></span>
|
||||
<span class="font-10 col-blue">
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<%i+=1%>
|
||||
@@ -104,7 +112,15 @@
|
||||
<%=order.grand_total%>
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<span class="font-10 col-blue"><%=order.status%></span>
|
||||
<span class="font-10 col-blue">
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<%i+=1%>
|
||||
@@ -138,7 +154,15 @@
|
||||
<%=order.grand_total%>
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<span class="font-10 col-blue"><%=order.status%></span>
|
||||
<span class="font-10 col-blue">
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<%i+=1%>
|
||||
@@ -172,7 +196,16 @@
|
||||
<%=order.grand_total%>
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<span class="font-10 col-blue"><%=order.status%></span>
|
||||
<span class="font-10 col-blue">
|
||||
<%= order.delivery.to_json %>
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<%i+=1%>
|
||||
@@ -187,16 +220,17 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-4 col-sm-4" style="margin:0px -5px !important ">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 div_card_order">
|
||||
<div class="card">
|
||||
<div class="card-header custom-card-header" style="color:">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td width ="50%" class="header-td align-left">
|
||||
<b class="col-pink font-16"><span id="sr_number"></span> </b>
|
||||
<td width ="10%" class="header-td align-left">
|
||||
<b class="col-pink font-16"><span id="sr_number"></span></b>
|
||||
</td>
|
||||
<td width="40%" class="header-td align-left">
|
||||
<b><span class="font-15" id="requested_date_time"></span></b>
|
||||
</td>
|
||||
<td class="header-td align-left"></td>
|
||||
<td width ="50%" class="header-td font- align-right"><b><span id="contact_info"></span></b></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -237,6 +271,12 @@
|
||||
</td>
|
||||
<td width ="30%" class="footer-td align-right" id="total_charges">0.00</td>
|
||||
</tr>
|
||||
<tr id="discount">
|
||||
<td width ="70%" class="footer-td align-left">
|
||||
DISCOUNT
|
||||
</td>
|
||||
<td width ="30%" class="footer-td align-right" id="discount_amount">0.00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width ="70%" class="footer-td align-left">
|
||||
GOVERNMENT TAX
|
||||
@@ -300,6 +340,10 @@
|
||||
<span class="font-13">NAME</span><br>
|
||||
<b id="customer_name"></b>
|
||||
</td>
|
||||
<td class="body-td align-right">
|
||||
<span class="font-13">REQUESTED TIME</span><br>
|
||||
<b id="requested_time"></b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="body-td align-left">
|
||||
@@ -337,8 +381,9 @@
|
||||
<p id="order_id" class="hidden"></p>
|
||||
<p id="status" class="hidden"></p>
|
||||
<script type="text/javascript">
|
||||
jQuery(function(){
|
||||
jQuery('.first-1').click();
|
||||
});
|
||||
$(function(){
|
||||
$("#discount").hide();
|
||||
$('.first-1').click();
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -281,7 +281,7 @@
|
||||
});
|
||||
|
||||
}else{
|
||||
swal ( "Information" , result.message);
|
||||
swal ( "Opps",result.message ,"warning" );
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -328,7 +328,6 @@
|
||||
var payment_amount = parseFloat($("#used_amount").text());
|
||||
setTimeout(function(){
|
||||
code=getQRCode();
|
||||
alert(code)
|
||||
if(sale_id != 0 && code != ""){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
@@ -345,7 +344,6 @@
|
||||
url: "<%=origami_payment_paymal_path%>",
|
||||
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref,account_no:code},
|
||||
success: function(result){
|
||||
alert(result)
|
||||
if(result.status == true){
|
||||
swal({
|
||||
title: "Information!",
|
||||
@@ -359,7 +357,7 @@
|
||||
});
|
||||
|
||||
}else{
|
||||
swal ( "Information" , result.message);
|
||||
swal ( "Opps",result.message ,"warning" );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
development:
|
||||
secret_key_base: b61d85f8ed2a1a9e0eeece3443b3e8f838d002cc1d9f32115d8e93db920e2957adfedc57501d44741211538f3108b742cdeada87d5bfae796c53da1f90a3cd61
|
||||
sx_provision_url: https://connect.pos-myanmar.com/bensai/api #connect.smartsales.dev/api #connect.smartsales.asia/api #provision.zsai.ws/api
|
||||
sx_provision_url: connect.pos-myanmar.com/api #connect.smartsales.dev/api #connect.smartsales.asia/api #provision.zsai.ws/api
|
||||
server_mode: application
|
||||
cipher_type: AES-256-CBC
|
||||
sx_key: Wh@t1$C2L
|
||||
@@ -24,7 +24,7 @@ test:
|
||||
# instead read values from the environment.
|
||||
production:
|
||||
secret_key_base: c4bc81065013f9a3506d385bcbd49586c42e586488144b0de90c7da36867de9fa880f46b5c4f86f0ce9b7c783bb5a73bdb0e5605a47716567294390e726d3e22
|
||||
sx_provision_url: https://connect.pos-myanmar.com/api #192.168.1.147:3002/api
|
||||
sx_provision_url: connect.pos-myanmar.com/api #192.168.1.147:3002/api
|
||||
server_mode: application
|
||||
cipher_type: AES-256-CBC
|
||||
sx_key: Wh@t1$C2L
|
||||
|
||||
Reference in New Issue
Block a user