Uncaught TypeError: Cannot read property 'BuyerPhone' of undefined
at Object.success (customjs.js:1772)
at i (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at A (jquery.min.js:4)
at XMLHttpRequest.<anonymous> (jquery.min.js:4)
function InvoiceOrQuotePrint(billId, type) {
var changeText;
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "abc.aspx/GetData",
data: JSON.stringify({ InvId: billId, InvType: type }),
dataType: "json",
success: function (data) {
var html = '';
var response = data.d.InvoiceReportAllDetails[0];
var response1 = data.d.IReportAllDetails;
var BuyerPhone = response.BuyerPhone;
var BuyerFax = response.BuyerFax;
var SellerPhone = response.SellerPhone;
var SellerFax = response.SellerFax;
var Attn = response.Attn;
var SellerGstIn2 = response.SellerGstIn;
}
so please help me from this issue