Merge branch 'r-1902001-01' into foodcourt

This commit is contained in:
Thein Lin Kyaw
2020-08-25 11:56:57 +06:30
8 changed files with 124 additions and 91 deletions

View File

@@ -9,7 +9,9 @@
</span>
</ul>
</div> -->
<div id="loading_wrapper" style="display:none;">
<div id="loading"></div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
@@ -657,13 +659,14 @@
swal({
title: "Confirmation !",
text: 'Are You Sure to assign this customer' + customer + '!',
text: 'Are you sure to assign this customer' + customer + '!',
showCancelButton: true,
confirmButtonColor: "green",
confirmButtonText: "Yes!",
cancelButtonClass: 'btn btn-danger',
closeOnConfirm: false,
closeOnConfirm: true,
}, function () {
$( "#loading_wrapper").show();
$.ajax({
type: "POST",
url: "/origami/"+sale_id+"/"+cashier_type+"/customers/update_sale" ,

View File

@@ -817,10 +817,8 @@
if ($("#server_mode").val() != "cloud") { // first bill not used in cloud
if (discount) {
if(checkReceiptNoInFirstBillData(receipt_no,"")){
$("button.change_tax").hide();
$("#pay").show();
}else{
$("button.change_tax").show();
$("#pay").hide();
}
}
@@ -832,6 +830,7 @@
var sale_id = this.id;
window.location.href = '/origami/table/' + dining_id + "/table_invoice/" + sale_id;
})
$(".tables").on('click', function () {
localStorage.setItem('dinning_type','table');
var customer_id = $(".customer-id").text();
@@ -1157,32 +1156,35 @@
})
$('#add_invoice').on('click', function () {
$("#first_bill").prop('disabled',true);
$("#pay").prop('disabled',true);
var dining_id = "<%= @dining.id %>";
var sale_id = $("#sale_id").val(); //<%= @obj_sale.sale_id rescue "" %>
var ajax_url = "/origami/sale/append_order";
// var tax_type = localStorage.getItem("tax_type");
var tax_type = $("#check_tax").val();
$.ajax({
type: "POST",
url: ajax_url,
data: 'dining_id=' + dining_id + "&sale_id=" + sale_id + "&tax_type=" + tax_type,
success: function (result) {
swal({
title: "Information!",
text: "Invoice updated",
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
$("#first_bill").removeAttr('disabled');
$("#pay").removeAttr('disabled');
window.location.reload();
});
}
});
$("#loading_wrapper").show();
$("#add_invoice").prop('disable', true);
$("#first_bill").prop('disabled',true);
$("#pay").prop('disabled',true);
var dining_id = "<%= @dining.id %>";
var sale_id = $("#sale_id").val(); //<%= @obj_sale.sale_id rescue "" %>
var ajax_url = "/origami/sale/append_order";
// var tax_type = localStorage.getItem("tax_type");
var tax_type = $("#check_tax").val();
$.ajax({
type: "POST",
url: ajax_url,
data: 'dining_id=' + dining_id + "&sale_id=" + sale_id + "&tax_type=" + tax_type,
success: function (result) {
swal({
title: "Information!",
text: "Invoice updated",
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
$("#first_bill").removeAttr('disabled');
$("#pay").removeAttr('disabled');
window.location.reload();
});
$("#loading_wrapper").hide();
}
});
})
//show cusotmer rebate amount