prevent sale void double click
This commit is contained in:
@@ -1265,7 +1265,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();
|
||||
|
||||
@@ -481,8 +481,9 @@ $(document).on('click', '.access_modal', function(event){
|
||||
type = $(this).data("type");
|
||||
$(".ok").attr("data-action",type);
|
||||
$('#AccessCodeModal').modal('show');
|
||||
});
|
||||
$('#void').on('click', function () {
|
||||
});
|
||||
|
||||
$('#void').on('click', function () {
|
||||
var access_code = localStorage.getItem("access_code");
|
||||
swal({
|
||||
title: "Alert",
|
||||
@@ -494,6 +495,7 @@ $(document).on('click', '.access_modal', function(event){
|
||||
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({
|
||||
@@ -506,7 +508,7 @@ $(document).on('click', '.access_modal', function(event){
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function check_emp_access_code(access_code,type) {
|
||||
var url = "/origami/check_emp_access_code/" + access_code ;
|
||||
|
||||
Reference in New Issue
Block a user