update feedback testing
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user