add double click event for all payment

This commit is contained in:
phyusin
2017-12-08 11:20:30 +06:30
parent 2faf5ba386
commit deda2dd0c7
7 changed files with 33 additions and 3 deletions

View File

@@ -161,6 +161,7 @@ $('#jcb_pay').on('click',function(){
var amount = $('#amount').text();
var sale_id = "<%= @sale_id %>";
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) && amount > 0){
$(this).off("click");
//start member discount 5% by pay card
var sub_total = $('#sub-total').text();
var member_id = $('#membership_id').text();
@@ -183,6 +184,10 @@ $('#jcb_pay').on('click',function(){
swal({
title: "Information!",
text: "Payment Successfully",
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
},function () {
window.location.href = '/origami/sale/'+ sale_id + "/payment";
});