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

@@ -158,7 +158,7 @@ $(document).on('click', '.cashier_number', function(event){
$('#jcb_pay').on('click',function(){
var amount = $('#amount').text();
var sale_id = "<%= @sale_id %>";
if(parseFloat(amount) <= parseFloat($("#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();
@@ -179,7 +179,7 @@ $('#jcb_pay').on('click',function(){
success:function(result){
if(result){
swal({
title: "Infomation!",
title: "Information!",
text: "Payment Successfully",
},function () {
window.location.href = '/origami/sale/'+ sale_id + "/payment";
@@ -188,7 +188,11 @@ $('#jcb_pay').on('click',function(){
}
});
}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>