update payment detal for discount
This commit is contained in:
@@ -633,33 +633,33 @@ var customer_name = "<%= @customer.name %>";
|
||||
|
||||
$('#pay').click(function() {
|
||||
sub_total = $('#sub-total').text();
|
||||
if (payment_type == 'MPU' && $('.mpu').text() == 0 && sub_total != 0.0) {
|
||||
if (parseInt(jQuery.inArray("MPU", payment_type)) != -1 && $('.mpu').text() == 0 && sub_total != 0.0) {
|
||||
swal("Oops","Please Pay with MPU Payment","warning");
|
||||
}else if(payment_type == "Redeem" && $('#ppamount').text()==0 && sub_total != 0.0){
|
||||
}else if(parseInt(jQuery.inArray("Redeem", payment_type)) != -1 && $('#ppamount').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with Redeem Payment","warning");
|
||||
}else if(payment_type == "VISA" && $('#visacount').text()==0 && sub_total != 0.0){
|
||||
}else if(parseInt(jQuery.inArray("VISA", payment_type)) != -1 && $('#visacount').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with Visa Payment","warning");
|
||||
|
||||
}else if(payment_type == "JCB" && $('#jcbcount').text()==0 && sub_total != 0.0){
|
||||
}else if(parseInt(jQuery.inArray("JCB", payment_type)) != -1 && $('#jcbcount').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with jcb Payment","warning");
|
||||
}
|
||||
else if(payment_type == "Master" && $('#mastercount').text()==0 && sub_total != 0.0){
|
||||
else if(parseInt(jQuery.inArray("Master", payment_type)) != -1 && $('#mastercount').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with Master Payment","warning");
|
||||
}
|
||||
else if(payment_type == "UNIONPAY" && $('#unionpaycount').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with UNIONPAY Payment","warning");
|
||||
}
|
||||
else if(payment_type == "Alipay" && $('#alipaycount').text()==0 && sub_total != 0.0){
|
||||
else if(parseInt(jQuery.inArray("Alipay", payment_type)) != -1 && $('#alipaycount').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with Alipay Payment","warning");
|
||||
}
|
||||
else if(payment_type == "JUNCTIONPAY" && $('#junctionpaycount').text()==0 && sub_total != 0.0){
|
||||
else if(parseInt(jQuery.inArray("JUNCTIONPAY", payment_type)) != -1 != -1 && $('#junctionpaycount').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with JUNCTIONPAY Payment","warning");
|
||||
}
|
||||
else if(payment_type == "Credit" && $('#credit').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with Credit Payment","warning");
|
||||
}else if(payment_type == "PAYMAL" && $('#paymalcount').text()==0 && sub_total != 0.0){
|
||||
}else if(parseInt(jQuery.inArray("PAYMAL", payment_type)) != -1 && $('#paymalcount').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with Paymal Payment","warning");
|
||||
}else if(payment_type == "DINGA" && $('#dingacount').text()==0 && sub_total != 0.0){
|
||||
}else if(parseInt(jQuery.inArray("DINGA", payment_type)) != -1 && $('#dingacount').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with Dinga Payment","warning");
|
||||
}else{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user