change query for credit sales

This commit is contained in:
phyusin
2018-07-16 16:32:02 +06:30
parent 5b4ca6bf20
commit 3859bdebcf
4 changed files with 67 additions and 18 deletions

View File

@@ -980,10 +980,13 @@
if(parseInt(jQuery.inArray("Credit", type)) == -1){
if (parseInt(jQuery.inArray("MPU", type)) != -1 || parseInt(jQuery.inArray("VISA", type)) != -1 || parseInt(jQuery.inArray("JCB", type)) != -1 || parseInt(jQuery.inArray("Master", type)) != -1 || parseInt(jQuery.inArray("UNIONPAY", type)) != -1 || parseInt(jQuery.inArray("Redeem", type)) != -1 || parseInt(jQuery.inArray("PAYMAL",type))!= -1) {
if(!location.pathname.includes("credit_payment")){
calculate_member_discount(sale_id,"Card",tax_type);
}
}else{
calculate_member_discount(sale_id,"Cash",tax_type);
if(!location.pathname.includes("credit_payment")){
calculate_member_discount(sale_id,"Cash",tax_type);
}
}
}
var ajax_url = "/origami/sale/" + sale_id + "/first_bill";