fixed otherpayment & redeem

This commit is contained in:
NyanLinHtut
2020-06-22 09:56:49 +06:30
parent ec62d54f3b
commit d5323f603b
5 changed files with 10 additions and 9 deletions

View File

@@ -680,7 +680,7 @@ $(document).ready(function(){
$('#pay').click(function() {
sub_total = $('#sub-total').text();
member = $('#membership_id').text();
if (payment_type && !other_payments.some(x => payment_type.indexOf(x[0]) >= 0 && x[1] > 0 ) && sub_total != 0.0 && member) {
if (payment_type && payment_type.length > 0 && !other_payments.some(x => payment_type.indexOf(x[0]) >= 0 && x[1] > 0) && sub_total != 0.0 && member) {
swal("Oops","Please Pay with " + payment_methods.find(x => payment_type.indexOf(x) >= 0) + " Payment","warning");
} else {
$( "#loading_wrapper").show();