+<\/span>-<\/span><\/div># if(Quantity > 1) {#
#} #'}]})}function t(n){kendo.ui.progress($(n.masterRow[0]).closest(".k-grid"),!0);$.ajax({url:"/SAPPortal/SAPBatchLineItemWithParent?lineParentId="+n.data.ParentId,dataType:"json",success:function(t){t!=null&&t.length>0&&$.each(n.masterRow,function(i,r){var f=n.sender.dataItem(r),u;f!=null&&(u=t.filter(n=>n.CustomerSAPDetailId===f.Id),u!=null&&u.length>0&&$("").appendTo($(r).next().find(".k-detail-cell")).kendoGrid({dataSource:{data:u,schema:{model:{id:"Id",fields:{BatchNo:{editable:!1,type:"string"},Expiry:{editable:!1,type:"date"},Quantity:{editable:!1,type:"number"}}}}},scrollable:!1,sortable:!0,pageable:!1,columns:[{field:"BatchNo",title:"Batch Number"},{field:"Expiry",title:"Expiry",template:"#= (Expiry == null) ? '' : kendo.toString(kendo.parseDate(Expiry, 'MMMM dd yyyy'), 'MMMM dd yyyy') #"},{field:"Quantity",title:"Quantity"}]}))});kendo.ui.progress($(n.masterRow[0]).closest(".k-grid"),!1)},error:function(t){kendo.ui.progress($(n.masterRow[0]).closest(".k-grid"),!1);console.log("error on loading batch:"+t)}})}$("#customer-order-history-grid").kendoGrid({dataSource:{type:"json",transport:{read:{url:"/en/SAPPortal/CustomerHeaderList",type:"POST",dataType:"json",data:additionalOrderData}},schema:{data:"Data",total:"Total",errors:"Errors",model:{id:"Id",fields:{Id:{editable:!1,type:"number"},DocumentNumber:{editable:!1,type:"string"},POReferenceNumber:{editable:!1,type:"string"},Status:{editable:!1,type:"string"},DocumentDate:{editable:!1,type:"date"},DocumentDueDate:{editable:!1,type:"date"},Total:{editable:!1,type:"number"},OutstandingBalance:{editable:!1,type:"number"},ShipToAddressId:{editable:!1,type:"string"}}}},error:function(n){display_kendoui_grid_error(n);this.cancelChanges()},pageSize:25,serverPaging:!0,serverFiltering:!0,serverSorting:!0},groupable:!0,sortable:{mode:"single",allowUnsort:!1},pageable:{refresh:!0,pageSizes:[25,50,100],messages:{display:"Showing {0}-{1} from {2} records",empty:"No Pages",page:"Page","of":"Of",itemsPerPage:"Items Per Page",first:"First",previous:"Previous",next:"Next",last:"Last",refresh:"Refresh",allPages:"All",morePages:"More Pages"}},detailTemplate:kendo.template($("#ordertemplate").html()),detailInit:n,scrollable:!1,columns:[{field:"",title:"",width:"130px",template:"",filterable:!1},{field:"DocumentNumber",title:"Document Number"},{field:"POReferenceNumber",title:"PO Number"},{field:"Status",title:"Status"},{field:"DocumentDate",title:"Document Date",format:"{0:d}"},{field:"DocumentDueDate",title:"Document Due Date",format:"{0:d}"},{field:"Total",title:"Total",format:"{0:c}"},{field:"OutstandingBalance",title:"Outstanding Balance",format:"{0:c}"},{field:"ShipToAddressId",title:"Ship To Address"}]})})