update discount with junctionpay

This commit is contained in:
Aung Myo
2018-05-17 10:40:29 +06:30
parent e5ea6a90e8
commit 942380afff
2 changed files with 7 additions and 6 deletions

View File

@@ -571,6 +571,7 @@ var customer_name = "<%= @customer.name %>";
if ($("#server_mode").val() != "cloud") { // first bill not used in cloud if ($("#server_mode").val() != "cloud") { // first bill not used in cloud
payment_type = checkReceiptNoInFirstBillData(receipt_no,"payment"); payment_type = checkReceiptNoInFirstBillData(receipt_no,"payment");
console.log(payment_type) console.log(payment_type)
console.log(parseInt(jQuery.inArray("MPU", payment_type)))
if (member_id && member_discount) { if (member_id && member_discount) {
if(parseInt(jQuery.inArray("Credit", payment_type)) == -1){ if(parseInt(jQuery.inArray("Credit", payment_type)) == -1){
$("#credit_payment").hide(); $("#credit_payment").hide();
@@ -654,7 +655,7 @@ var customer_name = "<%= @customer.name %>";
else if(parseInt(jQuery.inArray("Alipay", payment_type)) != -1 && $('#alipaycount').text()== 0 && sub_total != 0.0 && member){ else if(parseInt(jQuery.inArray("Alipay", payment_type)) != -1 && $('#alipaycount').text()== 0 && sub_total != 0.0 && member){
swal("Oops","Please Pay with Alipay Payment","warning"); swal("Oops","Please Pay with Alipay Payment","warning");
} }
else if(parseInt(jQuery.inArray("JUNCTIONPAY", payment_type)) != -1 != -1 && $('#junctionpaycount').text()==0 && sub_total != 0.0 && member){ else if(parseInt(jQuery.inArray("JUNCTIONPAY", payment_type)) != -1 && $('#junctionpaycount').text()==0 && sub_total != 0.0 && member){
swal("Oops","Please Pay with JUNCTIONPAY Payment","warning"); swal("Oops","Please Pay with JUNCTIONPAY Payment","warning");
} }
else if(payment_type == "Credit" && $('#credit').text()==0 && sub_total != 0.0 && member){ else if(payment_type == "Credit" && $('#credit').text()==0 && sub_total != 0.0 && member){

View File

@@ -20,11 +20,11 @@ class ActionController::Base
end end
else else
#check for license file #check for license file
if check_license # if check_license
current_license(ENV["SX_PROVISION_URL"]) # current_license(ENV["SX_PROVISION_URL"])
else # else
redirect_to activate_path # redirect_to activate_path
end # end
end end
end end