origamijs
This commit is contained in:
@@ -188,11 +188,17 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
function show_customer_details(customer_id){
|
function show_customer_details(customer_id){
|
||||||
|
|
||||||
|
if(window.location.pathname.substring(0, 12) == "/origami/SAL"){
|
||||||
|
var url = customer_id+"/get_customer/"
|
||||||
|
}else{
|
||||||
|
var url = "origami/"+customer_id+"/get_customer/"
|
||||||
|
}
|
||||||
|
|
||||||
$('.customer_detail').removeClass('hide');
|
$('.customer_detail').removeClass('hide');
|
||||||
//Start Ajax
|
//Start Ajax
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: "origami/"+customer_id+"/get_customer/",
|
url: url,
|
||||||
data: {},
|
data: {},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
@@ -201,10 +207,10 @@ $(document).ready(function(){
|
|||||||
if(data["response_data"]["data"][i]["accountable_type"] == "RebateAccount"){
|
if(data["response_data"]["data"][i]["accountable_type"] == "RebateAccount"){
|
||||||
var balance = data["response_data"]["data"][i]["balance"];
|
var balance = data["response_data"]["data"][i]["balance"];
|
||||||
console.log(balance);
|
console.log(balance);
|
||||||
if (balance) {
|
if (balance == "0.0") {
|
||||||
$("#customer_amount").text(balance);
|
$("#customer_amount").text('0.0');
|
||||||
}else{
|
}else{
|
||||||
$("#customer_amount").text('00');
|
$("#customer_amount").text(balance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ end
|
|||||||
phone = customer_params[:contact_no]
|
phone = customer_params[:contact_no]
|
||||||
email = customer_params[:email]
|
email = customer_params[:email]
|
||||||
date_of_birth = customer_params[:date_of_birth]
|
date_of_birth = customer_params[:date_of_birth]
|
||||||
id = customer_params[:membership_id]
|
id = @crm_customer.membership_id
|
||||||
member_group_id = params[:member_group_id]
|
member_group_id = params[:member_group_id]
|
||||||
|
|
||||||
membership = MembershipSetting.find_by_membership_type("paypar_url")
|
membership = MembershipSetting.find_by_membership_type("paypar_url")
|
||||||
|
|||||||
Reference in New Issue
Block a user