Pull from master
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
<%end%>
|
||||
</ul>
|
||||
</li>
|
||||
<div id="menu-slimscroll" data-height="0">
|
||||
<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>
|
||||
@@ -499,30 +499,54 @@
|
||||
<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_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 %>
|
||||
<% 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 class="modal-footer p-r-30">
|
||||
|
||||
@@ -56,6 +56,9 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
cashier_type = window.location.href.indexOf("quick_service");
|
||||
console.log(cashier_type)
|
||||
|
||||
var payment_method = "";
|
||||
$('.payment-type').on('click',function(){
|
||||
$('.payment-type').css("background-color","#7a62d3")
|
||||
@@ -80,11 +83,19 @@
|
||||
url: "<%= origami_cash_ins_path %>",
|
||||
data: "reference="+ reference + "&remark=" + remark + "&amount="+ amount + "&payment_method="+payment_method + "&payment_method_reference="+ payment_method_reference,
|
||||
success:function(result){
|
||||
window.location.href = '/origami';
|
||||
if (cashier_type == -1) {
|
||||
window.location.href = '/origami';
|
||||
}else{
|
||||
window.location.href = '/origami/quick_service/pending_order';
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
$('#back').on('click',function(){
|
||||
window.location.href = '/origami';
|
||||
if (cashier_type == -1) {
|
||||
window.location.href = '/origami';
|
||||
}else{
|
||||
window.location.href = '/origami/quick_service/pending_order';
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
cashier_type = window.location.href.indexOf("quick_service");
|
||||
$('#cash_out').on('click',function(){
|
||||
var reference = $('#reference').val();
|
||||
var remark = $('#remark').val();
|
||||
@@ -33,12 +34,22 @@
|
||||
url: "<%= origami_cash_outs_path %>",
|
||||
data: "reference="+ reference + "&remark=" + remark + "&amount="+ amount,
|
||||
success:function(result){
|
||||
window.location.href = '/origami';
|
||||
|
||||
if (cashier_type == -1) {
|
||||
window.location.href = '/origami';
|
||||
}else{
|
||||
window.location.href = '/origami/quick_service/pending_order';
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
$('#back').on('click',function(){
|
||||
window.location.href = '/origami';
|
||||
cashier_type = window.location.href.indexOf("quick_service");
|
||||
if (cashier_type == -1) {
|
||||
window.location.href = '/origami';
|
||||
}else{
|
||||
window.location.href = '/origami/quick_service/pending_order';
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -29,7 +29,9 @@ if (menu.menu_categories)
|
||||
|
||||
if category.menu_items
|
||||
json.items category.menu_items do |item|
|
||||
json.partial! 'origami/addorders/menu_item', item: item
|
||||
if item.is_available
|
||||
json.partial! 'origami/addorders/menu_item', item: item
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -463,10 +463,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_doemal_new_order"></div>
|
||||
<div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_doemal_new_order"></div>
|
||||
<div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_new_order"></div>
|
||||
<div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_order_send_to_kitchen"></div>
|
||||
<div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_order_ready_to_delivery"></div> -->
|
||||
<div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_order_ready_to_delivery"></div>
|
||||
</div>
|
||||
|
||||
<p id="ref_no" class="hidden"></p>
|
||||
@@ -582,92 +582,3 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade text-center" id="<%= @shop.shop_code ? @shop.shop_code : '' %>_doemal_new_order" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-md" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title text-center" id="doemal_new_orderLabel">New Order</h4><hr>
|
||||
</div>
|
||||
<div class="modal-body doemal_new_orderBody">
|
||||
<div class="form-group text-center">
|
||||
You have new order <b><span id="new_order"></span></b> requested for <b><span id="new_order_date"></span></b>
|
||||
</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-blue new_order_close" data-value="<%= @shop.shop_code ? @shop.shop_code : '' %>" data-dismiss="modal">CLOSE</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade text-center" id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_new_order" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-md" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title text-center" id="notify_new_orderLabel">You have new orders</h4><hr>
|
||||
</div>
|
||||
<div class="modal-body notify_new_orderBody">
|
||||
<div class="form-group text-center">
|
||||
Are you accept or reject for these orders <b><span id="notify_new_order_lists"></span></b>?
|
||||
</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-blue notify_new_close" data-value="<%= @shop.shop_code ? @shop.shop_code : '' %>" data-dismiss="modal">CLOSE</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade text-center" id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_order_send_to_kitchen" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-md" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title text-center" id="notify_order_send_to_kitchenLabel">You have to send order to kitchen</h4><hr>
|
||||
</div>
|
||||
<div class="modal-body notify_order_send_to_kitchenBody">
|
||||
<div class="form-group text-center">
|
||||
Could you send these orders <b><span id="notify_order_send_to_kitchen_lists"></span></b> to kitchen?
|
||||
</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-blue notify_order_send_close" data-value="<%= @shop.shop_code ? @shop.shop_code : '' %>" data-dismiss="modal">CLOSE</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade text-center" id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_order_ready_to_delivery" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-md" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title text-center" id="notify_order_ready_to_deliveryLabel">You have orders that are ready to deliver</h4><hr>
|
||||
</div>
|
||||
<div class="modal-body notify_order_ready_to_deliveryBody">
|
||||
<div class="form-group text-center">
|
||||
Could you ready these orders <b><span id="notify_order_ready_to_delivery_lists"></span></b> to deliver?
|
||||
</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-blue notify_order_ready_close" data-value="<%= @shop.shop_code ? @shop.shop_code : '' %>" data-dismiss="modal">CLOSE</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="container-fluid">
|
||||
`<div class="container-fluid">
|
||||
<div id="loading_wrapper" style="display:none;">
|
||||
<div id="loading"></div>
|
||||
</div>
|
||||
@@ -447,9 +447,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="mr-2 btn btn-link bg-red waves-effect print_receipt"> Print
|
||||
<button type="button" class="mr-2 m-t-5 btn-lg btn-block bg-red waves-effect print_receipt"> Print
|
||||
</button>
|
||||
<button type="button" class="btn btn-link bg-blue waves-effect btn_pdf_close" data-dismiss="modal">
|
||||
<button type="button" class="btn-lg btn-block bg-blue waves-effect btn_pdf_close" data-dismiss="modal">
|
||||
CLOSE
|
||||
</button>
|
||||
</div>
|
||||
@@ -571,6 +571,7 @@ var customer_name = "<%= @customer.name %>";
|
||||
if ($("#server_mode").val() != "cloud") { // first bill not used in cloud
|
||||
payment_type = checkReceiptNoInFirstBillData(receipt_no,"payment");
|
||||
console.log(payment_type)
|
||||
console.log(parseInt(jQuery.inArray("MPU", payment_type)))
|
||||
if (member_id && member_discount) {
|
||||
if(parseInt(jQuery.inArray("Credit", payment_type)) == -1){
|
||||
$("#credit_payment").hide();
|
||||
@@ -654,7 +655,7 @@ var customer_name = "<%= @customer.name %>";
|
||||
else if(parseInt(jQuery.inArray("Alipay", payment_type)) != -1 && $('#alipaycount').text()== 0 && sub_total != 0.0 && member){
|
||||
swal("Oops","Please Pay with Alipay Payment","warning");
|
||||
}
|
||||
else if(parseInt(jQuery.inArray("JUNCTIONPAY", payment_type)) != -1 != -1 && $('#junctionpaycount').text()==0 && sub_total != 0.0 && member){
|
||||
else if(parseInt(jQuery.inArray("JUNCTIONPAY", payment_type)) != -1 && $('#junctionpaycount').text()==0 && sub_total != 0.0 && member){
|
||||
swal("Oops","Please Pay with JUNCTIONPAY Payment","warning");
|
||||
}
|
||||
else if(payment_type == "Credit" && $('#credit').text()==0 && sub_total != 0.0 && member){
|
||||
@@ -987,7 +988,8 @@ var customer_name = "<%= @customer.name %>";
|
||||
}
|
||||
|
||||
//print pdf function
|
||||
$(".print_receipt").on('click',function(){
|
||||
// $(".print_receipt").on('click',function(){
|
||||
$(document).on('touchstart click', '.print_receipt', function(event){
|
||||
var sale_id = $('#sale_id').text();
|
||||
var filename = $("#filename").val();
|
||||
var printer_name = $("#printer_name").val();
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<% @completed.each do |sale| %>
|
||||
<div class="card completed bg-red text-white" data-id = "<%= sale.sale_id %>">
|
||||
<div class="card-block">
|
||||
<%= sale.receipt_no %><span style="font-size:12px;float:right;line-height:inherit;">Billed</span>
|
||||
<%= sale.receipt_no %><span style="font-size:12px;float:right;line-height:inherit;"><%= sale.sale_status %></span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -172,6 +172,8 @@
|
||||
<button type="button" id="reprint" class="btn bg-blue btn-block">Reprint</button>
|
||||
<% if current_user.role != "waiter" %>
|
||||
<button id="close_cashier" type="button" class="btn btn-block btn-lg bg-blue waves-effect"> <%= t("views.btn.close_cashier") %></button>
|
||||
<button id="cash_in" type="button" class="btn btn-block btn-lg bg-blue waves-effect"> <%= t("views.btn.cash_in") %> </button>
|
||||
<button id="cash_out" type="button" class="btn btn-block btn-lg bg-blue waves-effect"> <%= t("views.btn.cash_out") %> </button>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -201,7 +203,13 @@ $(document).ready(function(){
|
||||
var linkURL = '/origami/shift/quick_service/close';
|
||||
warnBeforeRedirect(linkURL);
|
||||
});
|
||||
$('#cash_in').on('click',function(){
|
||||
window.location.href = '/origami/quick_service/cash_ins';
|
||||
})
|
||||
|
||||
$('#cash_out').on('click',function(){
|
||||
window.location.href = '/origami/quick_service/cash_outs';
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<% @completed.each do |sale| %>
|
||||
<div class="card completed bg-red text-white" data-id = "<%= sale.sale_id %>">
|
||||
<div class="card-block">
|
||||
<%= sale.receipt_no %><span style="font-size:12px;float:right;line-height:inherit;">Billed</span>
|
||||
<%= sale.receipt_no %><span style="font-size:12px;float:right;line-height:inherit;"><%= sale.sale_status %></span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -55,7 +55,9 @@
|
||||
</button>
|
||||
<% if current_user.role != "waiter" %>
|
||||
<button id="close_cashier" type="button" class="btn btn-block btn-lg bg-blue waves-effect"> <%= t("views.btn.close_cashier") %></button>
|
||||
<% end %>
|
||||
<button id="cash_in" type="button" class="btn btn-block btn-lg bg-blue waves-effect"> <%= t("views.btn.cash_in") %> </button>
|
||||
<button id="cash_out" type="button" class="btn btn-block btn-lg bg-blue waves-effect"> <%= t("views.btn.cash_out") %> </button>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -83,6 +85,14 @@
|
||||
warnBeforeRedirect(linkURL);
|
||||
});
|
||||
|
||||
$('#cash_in').on('click',function(){
|
||||
window.location.href = '/origami/quick_service/cash_ins';
|
||||
})
|
||||
|
||||
$('#cash_out').on('click',function(){
|
||||
window.location.href = '/origami/quick_service/cash_outs';
|
||||
})
|
||||
|
||||
function warnBeforeRedirect(linkURL) {
|
||||
swal({
|
||||
title: "Alert!",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<% @completed.each do |sale| %>
|
||||
<div class="card completed bg-red text-white" data-id = "<%= sale.sale_id %>">
|
||||
<div class="card-block">
|
||||
<%= sale.receipt_no %><span style="font-size:12px;float:right;line-height:inherit;">Billed</span>
|
||||
<%= sale.receipt_no %><span style="font-size:12px;float:right;line-height:inherit;"><%= sale.sale_status %></span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -188,6 +188,8 @@
|
||||
<%end%>
|
||||
<% if current_user.role != "waiter" %>
|
||||
<button id="close_cashier" type="button" class="btn btn-block btn-lg bg-blue waves-effect"> <%= t("views.btn.close_cashier") %></button>
|
||||
<!-- <button id="cash_in" type="button" class="btn btn-block btn-lg bg-blue waves-effect"> <%= t("views.btn.cash_in") %> </button>
|
||||
<button id="cash_out" type="button" class="btn btn-block btn-lg bg-blue waves-effect"> <%= t("views.btn.cash_out") %> </button> -->
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -321,5 +323,13 @@ $(document).ready(function(){
|
||||
window.location.href = '/oqs/'+ assigned_order_item_id + "/edit/pending";
|
||||
}
|
||||
});
|
||||
|
||||
$('#cash_in').on('click',function(){
|
||||
window.location.href = '/origami/quick_service/cash_ins';
|
||||
})
|
||||
|
||||
$('#cash_out').on('click',function(){
|
||||
window.location.href = '/origami/quick_service/cash_outs';
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 ">
|
||||
<div class="form-group p-l-10 p-r-10">
|
||||
|
||||
<%= f.input :child, input_html: { value: @survey_data.child, class: 'col-md-10', :onChange => "total_customer();" }%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 ">
|
||||
|
||||
Reference in New Issue
Block a user