async function bindOrderDetails() { let user_number = $('.User_phoneum').text(); // validatesession() debugger let cookieRes = COOKIE_HELPER_ACTIONS.getCookie(); let { userId } = cookieRes; //let userId = '106631380000048'; debugger; console.log(cookieRes); let port = SERVERNAME; // let port = "http://localhost:3088"; let url = `${port}/apis/v4/Bizgaze/integrations/products/salesorderdetailsbyorgid/organizationid/${userId}`; // /apis/v4/bizgaze/integrations/products/salesorderdetailsbyorgid/phonenumber/ // https://anwi.bizgaze.app/apis/v4/Bizgaze/integrations/products/salesorderdetailsbyorgid/organizationid/{organizationid} const config = { url, method: "get", headers: { 'Authorization': `stat ${STAT} `, 'Content-Type': 'application/json' } }; debugger let res = await axios(config); if (res.data.result == '[]' || res.data.result === null) { $(".user_order_details").append(`
No orders Found
`); return; } const orderDetailsres = JSON.parse(res.data.result); console.log(orderDetailsres); let new_arrr = orderDetailsres; console.log(new_arrr); $(".user_order_details").html(``) console.log('hello') let user_order_details = ``; let order_itemTotal = ''; let order_netTotal = ''; let order_quantity = ''; let order_taxAmount = ''; for (let i = 0; i < new_arrr.length; i++) { let current = new_arrr[i] let updatedCurent_total = current.nettotal.toLocaleString() order_itemTotal = current.itemtotal; order_netTotal = current.nettotal; order_quantity = current.Quantity; order_taxAmount = current.taxamount; user_order_details += `
${order_itemTotal} ${order_netTotal} ${order_taxAmount} ${order_quantity}

ORDER NO: ${current.OrderNo}

ORDER PLACED

${current.OrderDate}

TOTAL

₹${updatedCurent_total}

Delivered TO

${current.OrganizationName}

View order details

Invoice

${current.itemname}
`; } $(".user_order_details").append(user_order_details); $('.order_details_main_container').click(function () { let current_serial_no = $(this).find('.serial_no').text(); // window.localStorage.setItem('orderDate',current_order_date); // window.localStorage.setItem('orderSerialno',current_serial_no); // window.localStorage.setItem('Userphonenumber',user_number); $(this).attr('href', `./orderdetails.html#${current_serial_no}`) }) } function toasterOpts() { toastr.options = { "closeButton": true, "debug": false, "newestOnTop": true, "progressBar": true, "positionClass": "toast-top-center", "preventDuplicates": true, "onclick": null, "showDuration": "300", "hideDuration": "1000", "timeOut": "5000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" } }