check some function
This commit is contained in:
@@ -93,10 +93,10 @@ class Origami::SurveysController < BaseOrigamiController
|
|||||||
if @type != "quick_service"
|
if @type != "quick_service"
|
||||||
dining_facility = DiningFacility.find(params[:dining_id])
|
dining_facility = DiningFacility.find(params[:dining_id])
|
||||||
cashier_zone = CashierTerminalByZone.find_by_zone_id(dining_facility.zone_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
|
else
|
||||||
shift = ShiftSale.find(sale.shift_sale_id)
|
shift = ShiftSale.find(sale.shift_sale_id)
|
||||||
cashier_zone = shift.cashier_terminal_id
|
cashier_terminal_id = shift.cashier_terminal_id
|
||||||
end
|
end
|
||||||
|
|
||||||
shift_by_terminal = ShiftSale.find_by_cashier_terminal_id_and_shift_closed_at(cashier_terminal_id,nil)
|
shift_by_terminal = ShiftSale.find_by_cashier_terminal_id_and_shift_closed_at(cashier_terminal_id,nil)
|
||||||
|
|||||||
@@ -517,7 +517,7 @@
|
|||||||
// window.location.href = '/origami/room/' + dining_id;
|
// 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{
|
// }else{
|
||||||
// window.location.href = '/origami/room/' + dining_id;
|
// 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";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,12 +74,12 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<%if !@dining_facility.nil? %>
|
<%if !@dining_facility.nil? %>
|
||||||
<input type="hidden" name="table_id" value="<%= @dining_facility.id %>">
|
<input type="hidden" name="table_id" id="table_id" value="<%= @dining_facility.id %>">
|
||||||
<input type="hidden" name="table_type" value="<%= @table_type %>">
|
<input type="hidden" name="table_type" id="table_type" value="<%= @table_type %>">
|
||||||
<%= f.input :dining_name, :as => :hidden, :input_html => { :value => @dining_facility.name } %>
|
<%= f.input :dining_name, :as => :hidden, :input_html => { :value => @dining_facility.name } %>
|
||||||
<%else%>
|
<%else%>
|
||||||
<input type="hidden" name="table_id" value="0">
|
<input type="hidden" name="table_id" id="table_id" value="0">
|
||||||
<input type="hidden" name="table_type" value="0">
|
<input type="hidden" name="table_type" id="table_type" value="0">
|
||||||
<%= f.input :dining_name, :as => :hidden, :input_html => { :value => 0 } %>
|
<%= f.input :dining_name, :as => :hidden, :input_html => { :value => 0 } %>
|
||||||
<%end%>
|
<%end%>
|
||||||
<input type="hidden" name="sale_id" value="<%=@id%>">
|
<input type="hidden" name="sale_id" value="<%=@id%>">
|
||||||
@@ -275,17 +275,17 @@ var cashier_type = "<%= @cashier_type %>";
|
|||||||
});
|
});
|
||||||
// click back button for redirect
|
// click back button for redirect
|
||||||
$('#back').on('click',function(){
|
$('#back').on('click',function(){
|
||||||
table_type = $('#table_type').val()
|
var table_type = $('#table_type').val();
|
||||||
table_id = $('#table_id').val()
|
var table_id = $('#table_id').val();
|
||||||
|
|
||||||
if (cashier_type == "quick_service") {
|
if (cashier_type == "quick_service") {
|
||||||
window.location.href = '/origami/sale/<%= @id %>/<%= @cashier_type %>/payment/';
|
window.location.href = '/origami/sale/<%= @id %>/<%= @cashier_type %>/payment/';
|
||||||
}else{
|
}else{
|
||||||
if(table_type == "Table"){
|
if(table_type == "Table"){
|
||||||
window.location.href = "/origami/table/" + table_id
|
window.location.href = "/origami/table/" + table_id;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
window.location.href = "/origami/room/" + table_id
|
window.location.href = "/origami/room/" + table_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user