update bug sale

This commit is contained in:
Aung Myo
2017-06-16 18:04:39 +06:30
parent cd804a3d18
commit cb43afc405
6 changed files with 116 additions and 64 deletions

View File

@@ -227,20 +227,24 @@ $(document).ready(function(){
dataType: "json",
success: function(data) {
$("#customer_name").text(data["customer"].name);
$.each(data["response_data"]["data"], function (i) {
if(data["response_data"]["data"][i]["accountable_type"] == "RebateAccount"){
var balance = data["response_data"]["data"][i]["balance"];
if (data["response_data"]["status"]==true) {
$('.rebate_amount').removeClass('hide');
row =
'<td class="charges-name">' + data["response_data"]["data"][i]["accountable_type"] +'</td>'
+'<td class="item-attr">' + balance + '</td>';
if (data["response_data"]["data"].length) {
$.each(data["response_data"]["data"], function (i) {
if(data["response_data"]["data"][i]["accountable_type"] == "RebateAccount"){
var balance = data["response_data"]["data"][i]["balance"];
if (data["response_data"]["status"]==true) {
$('.rebate_amount').removeClass('hide');
row =
'<td class="charges-name">' + data["response_data"]["data"][i]["accountable_type"] +'</td>'
+'<td class="item-attr">' + balance + '</td>';
$(".rebate_amount").html(row);
}
$(".rebate_amount").html(row);
}
}
});
}
});
}else{
$('.rebate_amount').addClass('hide');
}
}
});
//End Ajax