fixed conflix after pull split bill
This commit is contained in:
@@ -251,8 +251,8 @@ $('#back').on('click',function(){
|
||||
|
||||
function warnBeforeRedirect(linkURL) {
|
||||
swal({
|
||||
title: "Oops",
|
||||
text: "Are you sure you want to Logout ?",
|
||||
title: "Alert!",
|
||||
text: "Are you sure you want to close cashier?",
|
||||
type: "warning",
|
||||
showCancelButton: true
|
||||
}, function() {
|
||||
|
||||
@@ -386,10 +386,8 @@
|
||||
end
|
||||
%>
|
||||
</table>
|
||||
<button class='btn btn-primary' id='add_invoice'> Add to existing invoice</button>
|
||||
<% if !@spit_bill.nil? && @spit_bill == '1' %>
|
||||
<button class='btn btn-primary' id='split_bill'> Split Bill</button>
|
||||
<% end %>
|
||||
|
||||
<button class='btn btn-primary btn-block waves-effect' id='add_invoice'> Add to existing invoice</button>
|
||||
<% end %>
|
||||
<% if @sale_array.size > 1 %>
|
||||
<br><br>
|
||||
@@ -439,6 +437,11 @@
|
||||
<!-- <button type="button" id="other-charges" class="btn btn-block bg-blue waves-effect" disabled>Charges</button> -->
|
||||
<button type="button" class="btn btn-block bg-blue waves-effect" id='move'>Move</button>
|
||||
<button type="button" id="request_bills" class="btn btn-block bg-blue waves-effect">Req.Bill</button>
|
||||
<% if !@split_bill.nil? %>
|
||||
<% if @split_bill == '1' %>
|
||||
<button type="button" id="split_bills" class="btn btn-block bg-blue waves-effect">Split Bill</button>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<!-- <button type="button" id="first_bill" class="btn btn-block bg-blue waves-effect" disabled>First Bill</button> -->
|
||||
<!-- <button type="button" id="pay" class="btn btn-block bg-blue waves-effect" disabled>Pay</button> -->
|
||||
<!-- <button type="button" class="btn btn-block bg-blue waves-effect" disabled> Void</button> -->
|
||||
@@ -461,6 +464,11 @@
|
||||
<button type="button" id="first_bill" class="btn btn-block bg-blue waves-effect">First Bill</button>
|
||||
<%end%>
|
||||
<% end %>
|
||||
<% if !@split_bill.nil? %>
|
||||
<% if @split_bill == '1' %>
|
||||
<button type="button" id="split_bills" class="btn btn-block bg-blue waves-effect">Split Bill</button>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<button type="button" id="pay" class="btn btn-block bg-blue waves-effect">Pay</button>
|
||||
|
||||
<% end %>
|
||||
@@ -571,7 +579,7 @@
|
||||
$("#survey").on('click', function () {
|
||||
var sale = $('#sale_id').val();
|
||||
if (sale) {
|
||||
var sale_id = sale
|
||||
var sale_id = sale;
|
||||
} else {
|
||||
var sale_id = "<%= @dining.id %>";
|
||||
}
|
||||
@@ -712,30 +720,6 @@
|
||||
|
||||
// Bill Request
|
||||
$('#request_bills').click(function () {
|
||||
var lookup_split_bill = '<%= @spit_bill %>';
|
||||
if(lookup_split_bill == '1'){
|
||||
swal({
|
||||
title: "Information!",
|
||||
text: "Do you want to Split bill?",
|
||||
type: "success",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#009900",
|
||||
confirmButtonText: "Yes, split it!",
|
||||
closeOnConfirm: false
|
||||
}, function (isConfirm) {
|
||||
if (isConfirm) {
|
||||
var dining_id = "<%= @dining.id %>";
|
||||
window.location.href = '/origami/table/' + dining_id + "/split_bills";
|
||||
}else{
|
||||
requestBillProcess();
|
||||
}
|
||||
});
|
||||
}else{
|
||||
requestBillProcess();
|
||||
}
|
||||
});
|
||||
|
||||
function requestBillProcess(){
|
||||
var order_id = $('#save_order_id').attr('data-order');
|
||||
var ajax_url = "/origami/" + order_id + "/request_bills";
|
||||
$.ajax({
|
||||
@@ -750,8 +734,14 @@
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//split bill process
|
||||
$('#split_bills').click(function(){
|
||||
var dining_id = "<%= @dining.id %>";
|
||||
window.location.href = '/origami/table/' + dining_id + "/split_bills";
|
||||
});
|
||||
|
||||
$('#move').on('click', function () {
|
||||
var dining_id = "<%= @dining.id %>";
|
||||
|
||||
Reference in New Issue
Block a user