update feedback testing

This commit is contained in:
Aung Myo
2017-11-09 17:25:54 +06:30
parent cb91ad307a
commit f8cd712ad1
18 changed files with 74 additions and 48 deletions

View File

@@ -155,7 +155,9 @@
$('#visa_pay').on('click',function(){
var amount = $('#amount').text();
var sale_id = "<%= @sale_id %>";
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value"))){
console.log(amount);
console.log($("#validamount").attr("value"));
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) && amount > 0){
//start member discount 5% by pay card
var sub_total = $('#sub-total').text();
var member_id = $('#membership_id').text();
@@ -176,7 +178,7 @@
success:function(result){
if(result){
swal({
title: "Infomation!",
title: "Information!",
text: "Payment Successfully",
}, function () {
window.location.href = '/origami/sale/'+ sale_id + "/payment";
@@ -185,7 +187,11 @@
}
});
}else{
swal ( "Oops" , "Paid Amount is over!" , "error" );
if (amount>0) {
swal ( "Oops" , "Paid Amount is over!" , "error" );
}else{
swal ( "Oops" , "Enter Amount!" , "error" );
}
}
})
</script>