add auth token:

exit
This commit is contained in:
Aung Myo
2017-06-13 18:28:22 +06:30
parent e5c29f6074
commit 7f7d579d2f
12 changed files with 106 additions and 66 deletions

View File

@@ -185,7 +185,7 @@ $(document).ready(function(){
}else{
var sale_id = $(".selected-item").find(".order-cid").text();
}
window.location.href = '/origami/'+ sale_id + "/add_customer"
window.location.href = '/origami/'+ sale_id + "/customers"
return false;
});
@@ -199,6 +199,7 @@ $(document).ready(function(){
}
$('.customer_detail').removeClass('hide');
//Start Ajax
$.ajax({
type: "GET",
@@ -210,8 +211,16 @@ $(document).ready(function(){
$.each(data["response_data"]["data"], function (i) {
if(data["response_data"]["data"][i]["accountable_type"] == "RebateAccount"){
var balance = data["response_data"]["data"][i]["balance"];
console.log(balance);
$("#customer_amount").text(balance);
if (data["response_data"]["status"]==true) {
$('.rebate_amount').removeClass('hide');
console.log(balance);
row =
'<td class="charges-name">' + data["response_data"]["data"][i]["accountable_type"] +'</td>'
+'<td class="item-attr">' + balance + '</td>';
$(".rebate_amount").append(row);
}
}
});
}