Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into pre_master

This commit is contained in:
Yan
2017-06-14 10:16:55 +06:30
52 changed files with 1332 additions and 700 deletions

View File

@@ -192,7 +192,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;
});
@@ -205,10 +205,11 @@ $(document).ready(function(){
var url = "origami/"+customer_id+"/get_customer/"
}
$('.customer_detail').removeClass('hide');
$('.customer_detail').removeClass('hide');
//Start Ajax
$.ajax({
type: "GET",
$.ajax({
type: "GET",
url: url,
data: {},
dataType: "json",
@@ -217,8 +218,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);
}
}
});
}