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

@@ -93,10 +93,10 @@ class Origami::SurveysController < BaseOrigamiController
if @type != "quick_service"
dining_facility = DiningFacility.find(params[:dining_id])
cashier_zone = CashierTerminalByZone.find_by_zone_id(dining_facility.zone_id)
cashier_zone = cashier_zone.cashier_terminal_id
cashier_terminal_id = cashier_zone.cashier_terminal_id
else
shift = ShiftSale.find(sale.shift_sale_id)
cashier_zone = shift.cashier_terminal_id
cashier_terminal_id = shift.cashier_terminal_id
end
shift_by_terminal = ShiftSale.find_by_cashier_terminal_id_and_shift_closed_at(cashier_terminal_id,nil)

View File

@@ -517,7 +517,7 @@
// window.location.href = '/origami/room/' + dining_id;
// }
window.location.href = '/origami/sale/' + split_sale_id + "/payment";
window.location.href = '/origami/sale/' + split_sale_id + "/cashier/payment";
}
});
}
@@ -538,7 +538,7 @@
// }else{
// window.location.href = '/origami/room/' + dining_id;
// }
window.location.href = '/origami/sale/' + split_sale_id + "/payment";
window.location.href = '/origami/sale/' + split_sale_id + "/cashier/payment";
}
});
}

View File

@@ -74,12 +74,12 @@
</div>
<%if !@dining_facility.nil? %>
<input type="hidden" name="table_id" value="<%= @dining_facility.id %>">
<input type="hidden" name="table_type" value="<%= @table_type %>">
<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;
}
}
});