changed pay button event

This commit is contained in:
yarzar_code
2020-08-10 18:28:03 +06:30
parent d6f6e51e6f
commit 975d0f3ecd

View File

@@ -746,16 +746,6 @@ $(document).ready(function(){
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref,account_no:customer_mamber_card_no},
success: function(result){
if(result.status == true){
swal({
title: "Information!",
text: result.message,
type: 'success',
html: true,
closeOnConfirm: true,
closeOnCancel: false,
allowOutsideClick: false
}, function (isConfirm) {
$('.confirm').attr("disabled","disabled");
sub_total = $('#sub-total').text();
member = $('#membership_id').text();
@@ -788,15 +778,27 @@ $(document).ready(function(){
}
/* end delete receipt no in first bill*/
localStorage.removeItem("cash");
swal({
title: "Payment Successful!",
text: "Thank You !",
type: 'success',
html: true,
closeOnConfirm: true,
closeOnCancel: false,
allowOutsideClick: false
},
function (isConfirm) {
$('.confirm').attr("disabled","disabled");
window.location.href = "<%= foodcourt_food_court_path %>";
});
$("#loading_wrapper").hide();
}
});
var second_display_lookup = $("#display_type").val();
if ($('#server_mode').val() != "cloud" && second_display_lookup == 2){
customer_display_view(null,"reload");
}
});
} else {
swal({
title: 'Oops',
@@ -807,11 +809,11 @@ $(document).ready(function(){
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/foodcourt/sale/'+ sale_id +"/"+cashier_type + "/payment";
location.reload();
});
}
$("#loading_wrapper").hide();
}
}
});
}else{
swal({