Merge branch 'r-1902001-01' into foodcourt

This commit is contained in:
Thein Lin Kyaw
2020-08-26 11:39:01 +06:30
2 changed files with 30 additions and 28 deletions

View File

@@ -1264,7 +1264,7 @@
closeOnConfirm: false
}, function (isConfirm) {
if (isConfirm) {
$('.confirm').prop("disabled",true);
$('.confirm').prop("disabled", true);
var sale_id = $("#sale_id").val();//"<%= @obj_sale.sale_id rescue "" %>"
var ajax_url = "/origami/sale/" + sale_id + '/cashier/void';
var remark = $("#remark").val();

View File

@@ -478,35 +478,37 @@ $('#back').on('click',function(){
// });
$(document).on('click', '.access_modal', function(event){
type = $(this).data("type");
$(".ok").attr("data-action",type);
$('#AccessCodeModal').modal('show');
});
$('#void').on('click', function () {
type = $(this).data("type");
$(".ok").attr("data-action",type);
$('#AccessCodeModal').modal('show');
});
$('#void').on('click', function () {
var access_code = localStorage.getItem("access_code");
swal({
title: "Alert",
text: "Are you sure want to Void?",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, void it!",
closeOnConfirm: false
}, function (isConfirm) {
if (isConfirm) {
var sale_id = $('#sale_id').val();
var ajax_url = "/origami/sale/" + sale_id +'/'+'cashier'+ '/void';
$.ajax({
type: 'POST',
url: ajax_url,
data: {'access_code':access_code},
success: function () {
window.location.href = '/origami/sale/'+sale_id;
}
});
swal({
title: "Alert",
text: "Are you sure want to Void?",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, void it!",
closeOnConfirm: false
}, function (isConfirm) {
if (isConfirm) {
$('.confirm').prop("disabled", true);
var sale_id = $('#sale_id').val();
var ajax_url = "/origami/sale/" + sale_id +'/'+'cashier'+ '/void';
$.ajax({
type: 'POST',
url: ajax_url,
data: {'access_code':access_code},
success: function () {
window.location.href = '/origami/sale/'+sale_id;
}
});
});
});
}
});
});
function check_emp_access_code(access_code,type) {
var url = "/origami/check_emp_access_code/" + access_code ;