Edit in Reference No in CB

This commit is contained in:
San Wai Lwin
2018-04-26 17:23:01 +06:30
parent d0ad95c8d6
commit 8e7fd2d747
7 changed files with 23 additions and 46 deletions

View File

@@ -201,9 +201,8 @@
var receipt_no = "<%= @receipt_no %>";
console.log(amount);
console.log($("#validamount").attr("value"));
$("#reference_no_Err").html("");
if(reference_no.length > 0){
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) && amount > 0){
$("#reference_no_Err").html("");
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();
@@ -244,14 +243,11 @@
});
}
}else{
if (amount>0) {
swal ( "Oops" , "Paid Amount is over!" , "error" );
}else{
swal ( "Oops" , "Enter Amount!" , "error" );
}
if (amount>0) {
swal ( "Oops" , "Paid Amount is over!" , "error" );
}else{
swal ( "Oops" , "Enter Amount!" , "error" );
}
}else{
$("#reference_no_Err").html("can't be blank");
}
});
</script>