check some function

This commit is contained in:
phyusin
2018-02-19 18:05:30 +06:30
parent ee86b7ed30
commit 8ccf45d06f
3 changed files with 13 additions and 13 deletions

View File

@@ -73,13 +73,13 @@
<div class="hidden" id="newTemplate" >
</div>
<%if !@dining_facility.nil?%>
<input type="hidden" name="table_id" value="<%= @dining_facility.id %>">
<input type="hidden" name="table_type" value="<%= @table_type %>">
<%if !@dining_facility.nil? %>
<input type="hidden" name="table_id" id="table_id" value="<%= @dining_facility.id %>">
<input type="hidden" name="table_type" id="table_type" value="<%= @table_type %>">
<%= f.input :dining_name, :as => :hidden, :input_html => { :value => @dining_facility.name } %>
<%else%>
<input type="hidden" name="table_id" value="0">
<input type="hidden" name="table_type" value="0">
<input type="hidden" name="table_id" id="table_id" value="0">
<input type="hidden" name="table_type" id="table_type" value="0">
<%= f.input :dining_name, :as => :hidden, :input_html => { :value => 0 } %>
<%end%>
<input type="hidden" name="sale_id" value="<%=@id%>">
@@ -275,17 +275,17 @@ var cashier_type = "<%= @cashier_type %>";
});
// click back button for redirect
$('#back').on('click',function(){
table_type = $('#table_type').val()
table_id = $('#table_id').val()
var table_type = $('#table_type').val();
var table_id = $('#table_id').val();
if (cashier_type == "quick_service") {
window.location.href = '/origami/sale/<%= @id %>/<%= @cashier_type %>/payment/';
}else{
if(table_type == "Table"){
window.location.href = "/origami/table/" + table_id
window.location.href = "/origami/table/" + table_id;
}
else {
window.location.href = "/origami/room/" + table_id
window.location.href = "/origami/room/" + table_id;
}
}
});