member credit payment

This commit is contained in:
Thein Lin Kyaw
2020-07-10 13:04:12 +06:30
parent 832f5d29c9
commit 13fcb69dee

View File

@@ -680,8 +680,10 @@ $(document).ready(function(){
$('#pay').click(function() { $('#pay').click(function() {
sub_total = $('#sub-total').text(); sub_total = $('#sub-total').text();
member = $('#membership_id').text(); member = $('#membership_id').text();
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) { if (payment_type && payment_type.length > 0 && parseInt(jQuery.inArray("Credit", payment_type)) == -1 && !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"); swal("Oops","Please Pay with " + payment_methods.find(x => payment_type.indexOf(x) >= 0) + " Payment","warning");
} else if (payment_type && payment_type.length > 0 && parseInt(jQuery.inArray("Credit", payment_type)) != -1 && $('#credit').text() == 0 && sub_total != 0.0 && member) {
swal("Oops","Please Pay with Credit Payment","warning");
} else { } else {
$( "#loading_wrapper").show(); $( "#loading_wrapper").show();
if($('#balance').text() > 0){ if($('#balance').text() > 0){