<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="com.csc.library.entry.HelpEntry,com.csc.library.system.*,com.csc.library.utilities.*"%>
<%@page import="com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*,org.json.simple.*"  %>
<jsp:useBean id="AS102" class="com.csc.library.system.Task" scope="page" />
<%
	AS102.setChannel(request,response);
	UIManager screen = (UIManager) AS102.process("MultiEntry","AS102");
	screen.referLangOn();
	MultiLine multi = screen.getMultiLine("MKPIS1");
        if(request.getParameter("__cmd") == null){
            screen.getTable("MKPIS1").clearRecord();
        }
	multi.setLabelBox("check box");

	if((request.getParameter("__cmd")!=null)&&(request.getParameter("__cmd").equals("ack"))){
		if((request.getParameter("__manyChild")!=null)&&(request.getParameter("__manyChild").equals("true"))){
			screen.getRecord().getString("gen");
		}else{
			screen.getTable("MKPIS1").goRec(screen.getTable("MKPIS1").recCount(),false);
			DbRecord rec=screen.getTable("MKPIS1").getCurrentRecordManager();
			screen.getTable("MKPIS1").goRec(screen.getTable("MKPIS1").recCount()-1,false);
			rec.set(screen.getTable("MKPIS1").getMinorKey(),screen.getTable("MKPIS1").getInt(screen.getTable("MKPIS1").getMinorKey())+1);
			rec.set("KPIID",screen.getTable("MKPIS1").getString("KPIID"));
			rec.set("companyid",screen.getUProfile().get("companyid"));
		}
	}

	if((request.getParameter("__cmd")!=null)&&(request.getParameter("__cmd").equals("addChild"))){
		screen.getTable("MKPIS1").goRec(screen.getTable("MKPIS1").recCount(),false);
		DbRecord rec=screen.getTable("MKPIS1").getCurrentRecordManager();
		screen.getTable("MKPIS1").goRec(screen.getTable("MKPIS1").recCount()-1,false);
		rec.set(screen.getTable("MKPIS1").getMinorKey(),screen.getTable("MKPIS1").getInt(screen.getTable("MKPIS1").getMinorKey())+1);
		rec.set("KPIID",screen.getTable("MKPIS1").getString("KPIID"));
		rec.set("COMPANYID",screen.getUProfile().get("companyid"));
	}

	CheckNull chk=new CheckNull();
	ThaiUtilities thatUtils = new ThaiUtilities();

	String style ="";
	String __cmd  = chk.chkNullString(request.getParameter("__cmd"));
	if(__cmd.equals("daily_attendance")){
		style = "display:none;";
		screen.getTable("MKPIS1").clearRecord();
		String json = chk.chkNullString(request.getParameter("__json"));
		JSONObject json_obj = (JSONObject) JSONValue.parse(json);
		JSONArray emp_list = (JSONArray) json_obj.get("emp_list");
		if(emp_list.size() > 0){
			screen.getRecord().clearField();
			String ot_type = json_obj.get("ot_type").toString();
			for(int i=0;i<emp_list.size();i++){
				JSONArray arr = (JSONArray) emp_list.get(i);
				String employeeid = arr.get(0).toString();
				CscCalendar dateid = new CscCalendar(arr.get(1).toString());
				try {
					screen.getTable("MKPIS1").goRec(screen.getTable("MKPIS1").recCount(),false);
					DbRecord rec=screen.getTable("MKPIS1").getNewRecord();
					rec.set(screen.getTable("MKPIS1").getMinorKey(),screen.getTable("MKPIS1").getInt(screen.getTable("MKPIS1").getMinorKey())+1);
					rec.set("employeeid",employeeid);
					rec.set("start_date",dateid);
					rec.set("end_date",dateid);
					rec.set("ot_type",ot_type);
					rec.set("companyid",screen.getUProfile().get("companyid"));

					screen.getTable("MKPIS1").putNewRecord(rec);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		}
	}

	if(screen.getTable("MKPIS1").recCount()==0){
		//out.println("<br>"+"33333");
		DbRecord rec1=screen.getTable("MKPIS1").getNewRecord();
		screen.getTable("MKPIS1").goRec(screen.getTable("MKPIS1").recCount(),false);
		rec1.set(screen.getTable("MKPIS1").getMinorKey(),"1");
		screen.getTable("MKPIS1").putNewRecord(rec1);
	}
%>
<html ng-app="myHR">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../CSS/TISCO.css" rel="stylesheet" type="text/css">
<link href="../CSS/bootstrap.css" rel="stylesheet"  type="text/css">
<link href="../CSS/bootstrap_csc_backend.css" rel="stylesheet"  type="text/css">
<script type="text/javascript" src="../JS/jquery-2.1.3.min.js"></script>
<script type='text/javascript' src="../JS/bootstrap.js"></script>
<script language="JavaScript" src="../JS/SCREEN.js"></script>
<script language="javascript">setLang('<%=screen.getUProfile().get("lang")%>');</script>
<script type='text/javascript' src='../JS/jquery-1.11.1.min.js'></script>
<script type='text/javascript' src='../JS/jquery-ui-1.11.4.js'></script>
<script type='text/javascript' src='../JS/angular-1.3.15/angular.js'></script>
<script type='text/JavaScript' SRC='../JS/ANGULAR/SCREEN_ANGULAR.js'></script>
<script type='text/javascript' src='../JS/DATEINPUT.js'></script>
<script type='text/javascript' src='../JS/ICONSMENU.js'></script>
<script type='text/javascript' src='../JS/VIEWCALENDAR.js'></script>
<script language="JavaScript" src="../JS/DateTimeDiff.js"></script>
<script src="../JS/angular-1.3.15/angular.js" type="text/javascript"></script>
<script src="../JS/ANGULAR/SCREEN_ANGULAR.js" type="text/javascript"></script>
<script language="JavaScript" type="text/JavaScript">
<!--
function deleteMulti(){
	with(document.cscform){
		bCon=confirm(MyCode[4]);
	 	if (bCon==true)	{
			__cmd.value="DelChild";
			submit();
		}
	}
}

function saveChild(){
	with(document.cscform){
		__cmd.value="addChild";
		__ack.value="add";
		__clean.value = "1";
		action="AS102.jsp";
		submit();
	}
}

function saveManyChild(){
	with(document.cscform){
		__cmd.value="ack";
		__ack.value="ack";
		__manyChild.value="true";
		__clean.value = "1";
		action="AS102.jsp";
		submit();
	}
}

function childMulti(record){
	with(document.cscform){
		window.open(__childMulti.value+".jsp?__cmd=&__gorec="+record+"&__ack=edit&__codeid="+window.cscform.__codeid.value+"&__companyid="+window.cscform.__companyid.value);
		//submit();
	}
}

function hotLink(page){
	window.open(page,"Help","left=150,top=150,width=700,height=500,toolbar=no,status=no,scrollbars=yes");
}

function goHelp(helpName,inputName) {
	var helpReturn;
	var fcon=document.cscform.__fixCon.value;
	if (inputName=="__bu3" ) {
	 	helpReturn="__bu3:BU3ID,MBU3@TDESC";
	} else if (inputName=="__bu4" ) {
	 	helpReturn="__bu4:BU4ID,MBU4@TDESC";
	}
	linkHelp_Return(helpName,helpReturn);
	document.cscform.__fixCon.value = fcon;
}

function showHelp1(page){
	with(document.cscform){
    	action=page;
	   	submit();
  	}
}

function setTextBox(str,obj){
	with(document.cscform){
    	for (j=0;j<elements.length; j++){
			if(elements[j].name.indexOf(str) != -1){
				//alert(eval(obj+".value"));
				elements[j].value = eval(obj+".value");
			}
		}
	}
}

function chBox(){
 	with (document.cscform){
  		if(checkval.checked){
			checkAll();
		}else{
			decheckAll();
		}
   	}
}

function chk_Time(){
	var count=0;
	with(document.cscform){
    	for (j=0;j<elements.length; j++){
			if(elements[j].name.indexOf("start_date") > -1){
				if(!isValidDate(elements[j].value)){
					count+=1;
					elements[j].focus();
					elements[j].select();
					break;
				}
			}
			if(elements[j].name.indexOf("start_time") > -1){
				if(!isValidTime(elements[j].value)){
					count+=1;
					elements[j].focus();
					elements[j].select();
					break;
				}
			}
			if(elements[j].name.indexOf("end_date") > -1){
				if(!isValidDate(elements[j].value)){
					count+=1;
					elements[j].focus();
					elements[j].select();
					break;
				}
			}
			if(elements[j].name.indexOf("end_time") > -1){
				if(!isValidTime(elements[j].value)){
					count+=1;
					elements[j].focus();
					elements[j].select();
					break;
				}
			}
	    }//for
		if(count>0){
			return false;
		}else{
		  	return true;
		}
	}
}

/*function chk_Time2(){
	var count=0;
	var rec=0;
	with(document.cscform){
    	for (j=0;j<elements.length; j++){
			if(elements[j].name.indexOf("__MKPIS1$start_date$")>-1){
				rec+=1;
			}
		}
		//alert(rec);
		for (i=1;i<=rec; i++){
			if (!datetimeDifference(eval("__MKPIS1$start_date$"+i+".value"),
			eval("__MKPIS1$end_date$"+i+".value"),
			eval("__MKPIS1$start_time$"+i+".value"),
			eval("__MKPIS1$end_time$"+i+".value"))) {
				count+=1;
				break;
			}
		}

		if(count>0){
			return false;
		}else{
		  	return true;
		}
	}
	return true;
}*/

function chk_Time(){
	var count=0;
	with(document.cscform){
    	for (j=0;j<elements.length; j++){
			if(elements[j].name.indexOf("start_date") > -1){
				if(!isValidDate(elements[j].value)){
					count+=1;
					elements[j].focus();
					elements[j].select();
					break;
				}
			}
			if(elements[j].name.indexOf("start_time") > -1){
				if(!isValidTime(elements[j].value)){
					count+=1;
					elements[j].focus();
					elements[j].select();
					break;
				}
			}
			if(elements[j].name.indexOf("END_DATE") > -1){
				if(!isValidDate(elements[j].value)){
					count+=1;
					elements[j].focus();
					elements[j].select();
					break;
				}
			}
			if(elements[j].name.indexOf("end_time") > -1){
				if(!isValidTime(elements[j].value)){
					count+=1;
					elements[j].focus();
					elements[j].select();
					break;
				}
			}
	    }//for
		if(count>0){
			return false;
		}else{
		  	return true;
		}
	}
}

function chk_Time2(){
	var count=0;
	var rec=0;
	with(document.cscform){
    	for (j=0;j<elements.length; j++){
			if(elements[j].name.indexOf("__MKPIS1$start_date$")>-1){
				rec+=1;
				i=elements[j].name.substring(18,elements[j].name.length);
				if(typeof eval("__MKPIS1$start_date$"+i)!="undefined"){
					if (!datetimeDifference(eval("__MKPIS1$start_date$"+i+".value"),
						eval("__MKPIS1$end_date$"+i+".value"),
						eval("__MKPIS1$start_time$"+i+".value"),
						eval("__MKPIS1$end_time$"+i+".value"))) {
							count+=1;
							break;
						}
				}
			}
		}
		if(count>0){
			return false;
		}else{
		  	return true;
		}
	}
	return true;
}

function chTime(str){
	with(document.cscform){
		if(!dateDifference(eval("__MKPIS1$start_date$"+str+".value"),eval("__MKPIS1$end_date$"+str+".value"))){
			eval("__MKPIS1$start_date$"+str+".focus()");
			eval("__MKPIS1$start_date$"+str+".select()");
			return false;
		}
		if(!datetimeDifference(eval("__MKPIS1$start_date$"+str+".value"),eval("__MKPIS1$end_date$"+str+".value"),eval("__MKPIS1$start_time$"+str+".value"),eval("__MKPIS1$end_time$"+str+".value"))){
			eval("__MKPIS1$start_date$"+str+".focus()");
			eval("__MKPIS1$start_date$"+str+".select()");
			return false;
		}
		return true;
	}
}

function chk_RTime(){
	var stremp="";
	with(document.cscform){
		for(var i=0;i<elements.length;i++){
			if(elements[i].name.indexOf("__MKPIS1:")>-1){
				stremp=elements[i].name.substring(elements[i].name.indexOf(":")+1,elements[i].name.length);
				chk_ReturnTime(stremp);
			}
		}
	}
}

function chk_ReturnTime(str){
	var mvalue="";
    with(document.cscform){
		mvalue=gettimeDiff2(eval("__MKPIS1$start_time$"+str+".value"),eval("__MKPIS1$end_time$"+str+".value"));
		totaltime.value=mvalue;
		eval("__MKPIS1$total_time$"+str+".value='"+mvalue+"'");
	}
}

function GoSave(){	confirmSave(); }

function GoUpdate(){ update(); }

function GoDelete(){ edelete(); }

function GoSearch(){ search(); }

function beforeCalendar(mtxt,fname){
	var startdates="";
	var strtmp=fname;
    with(document.cscform){
		for(i=0;i<elements.length;i++){
			if(elements[i].type=="text"){
				if(elements[i].name.indexOf(strtmp)>-1){
					startdates+=","+elements[i].name;
					 //  alert(" mytxt : "+startdates +"name : "+elements[i].name);
				}
			}
		}
		viewCal(''+mtxt+startdates+'')
	}
}

function SubTime(T1,T2){
	with(document.cscform){
		//alert("T1 -->> "+T1 +"  T2 -->> " +T2);
		 var Time1=T1.split(".");
		 var Time2=T2.split(".");

		 var T11=parseInt(Time1[0]);
		 var T12=parseInt(Time1[1]);
		 var T21=parseInt(Time2[0]);
		 var T22=parseInt(Time2[1]);
		 //alert("T11 -->> "+T11+"  T12 -->> "+T12+"  T21 -->> "+T21+"  T22 -->> "+T22);

		 var TS1=(T11*60)+T12;
		 var TS2=(T21*60)+T22;
		 //alert("TS1 -->> "+TS1 +"  TS2  --->> "+TS2);

		 var Tsub=TS2-TS1;
		 var Tsub1=parseInt(Tsub/60);
		 var Tsub2=""+Tsub%60;
		 //alert("Tsub2 -->> "+Tsub2+"length -->> "+Tsub2.length);
		 if(Tsub2.length<2){
				Tsub2="0"+Tsub2;
		 }
		 var Tsub=Tsub1+"."+Tsub2;
		 //alert("time -->> "+Tsub);
		totaltime.value=Tsub;
		setTextBox('total_time','totaltime');
	}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function setBu(){
	with(document.cscform){
		var j = 0;
		for (j=0;j<elements.length; j++){
			if(elements[j].name.indexOf("__MKPIS1$BU3$") != -1){
				elements[j].value = __bu3.value;
			}
		}
		for (j=0;j<elements.length; j++){
			if(elements[j].name.indexOf("__MKPIS1$BU4$") != -1){
				elements[j].value = __bu4.value;
			}
		}

	}
}

//-->
</script>
</head>
<body onLoad="MM_preloadImages('../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif')" >
 <div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
<script language="javascript">initToolTips();</script>
<form name="cscform" method="post" action="AS102.jsp">


<!----------BEGIN CSC INITIAL ZONE ------------------------>

<%=screen.InitialVariable()%>

<!----------END CSC INITIAL ZONE -------------------------->

<input type="hidden" name="__screen" value="AS102">
  <input type="hidden" name="__help" value="">
  <input type="hidden" name="__cmd" value="">
  <input type="hidden" name="__notNull" value='<%=screen.getRequire()%>'>
  <input type="hidden" name="__childMulti" value="AS102">
  <input type="hidden" name="__gorec" value="">
  <input type="hidden" name="__ack" value="" >
  <input type="hidden" name="__calendar" value="">
  <input type="hidden" name="__clean" value="1">
  <script language="javascript">getInputFormatDate();</script>
  <input type="hidden" name="__language" value ="<%=screen.getUProfile().get("lang")%>">
  <input type="hidden" name="__multiTable" value="MKPIS1">
  <input type="hidden" name="__helpReturn" value="">
  <input type="hidden" name="__companyid" value="<%=screen.getUProfile().get("companyid")%>">
  <% if (screen.getDataLabel("employeeid").equals("")) {%>
  <input type="hidden" name="__employeeid" value="<%=screen.getUProfile().get("actor")%>">
  <% } else {%>
  <input type="hidden" name="__employeeid" value="<%=screen.getDataLabel("employeeid")%>">
  <%}%>
  <input type="hidden" name="__fixCon" value="">
  <input type="hidden" name="__cmdchild" value="">
  <input type="hidden" name="__autonum" value="KPIID, ">
  <input type="hidden" name="__wfcmd" value="false">
  <input type="hidden" name="__wf_status" value="<%=chk.chkNullString(request.getParameter("__wf_status"))%>">
  <input type="hidden" name="__maxrec" value="<%=screen.getTable("MKPIS1").recCount()%>">
  <input type="hidden" name="__lastrec" value="<%=screen.getTable("MKPIS1").recCount()%>">
  <input type="hidden" name="__manyChild" value="" >
  <input type="hidden" name="totaltime" value=""	>
  	<div align="center">
  	<script language="javascript">
		var swap = new swaplang();
	var titlename = swap.swap2String("SW012692");
    	document.write(Icons("AS102,"+titlename));
	</script>
	<br>
	<table cellpadding="0"  cellspacing="0" class="maxsize">
    <tr >
    	<td class="header"> AS102,&nbsp;KPIs SetUp&nbsp;</td>
	</tr>
    <tr >
    	<td  colspan="2"> <div align="center">
        	<table  class="maxsize" cellpadding="0" cellspacing="0" >
            <tr>
            	<td  class="blankspace">
					<table class="maxsize" border="0" cellpadding="0" cellspacing="0" >
                		<tr>
                    		<td colspan="9" ><div align="center">
                        		<table class="maxsiz"  border="1" align="center" cellpadding="0" cellspacing="0">
									<tr>
										<td width="15%" ><div align="right"><%=screen.getLabel("KPIID")%>&nbsp;</div></td>
										<td width="30%"><span align="left"><%=screen.getInput("KPIID")%></td>
									</tr>
									<%
										String cmdValue = chk.chkNullString(request.getParameter("__cmd"));
										String bu3ID="", bu3Name="";
										String bu4ID="", bu4Name="";
										if(cmdValue.equals("addChild")||cmdValue.equals("DelChild")||cmdValue.equals("save")){
											bu3ID = chk.chkNullString(request.getParameter("__bu3"));
											bu3Name = thatUtils.ASCII2Unicode(chk.chkNullString(request.getParameter("MBU3@TDESC")));
											bu4ID = chk.chkNullString(request.getParameter("__bu4"));
											bu4Name = thatUtils.ASCII2Unicode(chk.chkNullString(request.getParameter("MBU4@TDESC")));
										}else{
											bu3ID = screen.getDataLabel("BU3");
											bu3Name = screen.getDataLabel("MBU3","TDESC");
											bu4ID = screen.getDataLabel("BU4");
											bu4Name = screen.getDataLabel("MBU4","TDESC");
										}
									%>
									<tr>
										<td ><div align="right"><%=screen.getLabel("BU3")%>&nbsp;</div></td>
										<td>
											<input type="text" name="__bu3" size="15" value="<%=bu3ID%>" onMouseOut="toolTip()">&nbsp;<a href="javascript:goHelp('MBU3HELP','__bu3')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image21','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Help" name="Image21" width="20" height="20" border="0" align="absmiddle"></a>
											<input type="text" name="MBU3@TDESC" value="<%=bu3Name%>" readonly size="40" onMouseOut="toolTip()"></td>
									</tr>
									<tr>
										<td ><div align="right"><%=screen.getLabel("BU4")%>&nbsp;</div></td>
										<td>
											<input type="text" name="__bu4" size="15" value="<%=bu4ID%>" onMouseOut="toolTip()">&nbsp;<a href="javascript:goHelp('MBU4HELP','__bu4')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image21','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Help" name="Image21" width="20" height="20" border="0" align="absmiddle"></a>
											<input type="text" name="MBU4@TDESC" value="<%=bu4Name%>" readonly size="40" onMouseOut="toolTip()"></td>
									</tr>
								
                            </table>
                    	</div>
						</td>
                    </tr>
                    <tr>
						<td colspan="9">
					  		<table class="maxsize tablewithborder"  border="1" align="center" cellpadding="1" cellspacing="1" bgcolor="#666666">
								<tr>
									<td width="" align="center" valign="middle" class="title1"><input type="checkbox" name="checkval" value="all" onClick="chBox();" ></td>
									<td width="" class="title1"><div align="center">No.</div></td>
									<td width="" class="title1"><div align="center"><%=multi.getLabel("MKPIS1","KPIDESC")%></div></td>
									<td width="" class="title1"><div align="center"><%=multi.getLabel("MKPIS1","RATE5")%></div></td>
									<td width="" class="title1"><div align="center"><%=multi.getLabel("MKPIS1","RATE4")%></div></td>
									<td width="" class="title1"><div align="center"><%=multi.getLabel("MKPIS1","RATE3")%></div></td>
									<td width="" class="title1"><div align="center"><%=multi.getLabel("MKPIS1","RATE2")%></div></td>
									<td width="" class="title1"><div align="center"><%=multi.getLabel("MKPIS1","RATE1")%></div></td>
									<td width="" class="title1"><div align="center"><%=multi.getLabel("MKPIS1","WEIGHT")%></div></td>
								</tr>
						<%
						  	screen.getTable("MKPIS1").first();
							for(int i=1;!multi.eof();i++){
						%>
								<tr>
									<td><div align="center"><%=multi.getInputCheckBox()%><input name="__MKPIS1$KPIID$<%=multi.getData("MKPIS1","LINE_NO")%>" value="<%=multi.getData("MKPIS1","KPIID")%>" type="hidden"></div></td>
									<td><div align="center"><%=i%></div></td>
									<td><div align="center"><%=multi.getInput("MKPIS1","KPIDESC")%><%=multi.getInput("MKPIS1","BU3")%><%=multi.getInput("MKPIS1","BU4")%></div></td>
									<td><div align="center"><%=multi.getInput("MKPIS1","RATE5")%></div></td>
									<td><div align="center"><%=multi.getInput("MKPIS1","RATE4")%></div></td>
									<td><div align="center"><%=multi.getInput("MKPIS1","RATE3")%></div></td>
									<td><div align="center"><%=multi.getInput("MKPIS1","RATE2")%></div></td>
									<td><div align="center"><%=multi.getInput("MKPIS1","RATE1")%></div></td>
									<td><div align="center"><%=multi.getInput("MKPIS1","WEIGHT")%></div></td>
								</tr>
						<%
								multi.next();
							}
						%>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
              <tr >
                <td class="blankspace"></td>
              </tr>

						<tr>
							<td  class="buttonline" colspan="7"><div align="center">
								<button type="button" class="btn btn-primary width100" swlang code="SW013165" onClick="saveChild();">ADD</button>&nbsp;
								<button type="button" class="btn btn-primary width100" swlang code="SW013166" onClick="deleteMulti();">DELETE</button>
							</div>
							</td>
						</tr>
			<tr >
			  <td class="blankspace"></td>
			  </tr>
            </table>
          </div></td>
      </tr>
	    <%if(screen.getDataLabel("CREATE_BY")!=""){ %>
			<tr>
				<td align="right">
					<%
					String userNameID = "";
					String EmpID = "";
					String FULLname = "";
					DbInquiry inq = new InitialInquiry(screen.getUProfile()).getDbInquiry("Memployee", false);
					inq.setColumn("*");
					inq.setFilter("employeeid='"+screen.getDataLabel("CREATE_BY")+"' ");
					DbInquiry child = new InitialInquiry(screen.getUProfile()).getDbInquiry("Muser", false);
					child.setColumn("*");
					inq.putChild(child);
					inq.refresh();
					if(inq.next()){
						userNameID = chk.chkNullString(inq.getChild("muser").getString("usernameid"),"--");
						EmpID = chk.chkNullString(inq.getString("employeeid"),"--");
						FULLname = chk.chkNullString(inq.getString("fullname"),"--");
					}
					%>
					Create By : <%//=screen.getDataLabel("CREATE_BY")%> <%=userNameID%> , <%=EmpID%> , <%=FULLname%> : <%=screen.getDataLabel("CREATE_DATE")%> : <%=screen.getDataLabel("CREATE_TIME")%>
				</td>
			</tr>
		<%}%>
      <tr >
        <td  class="bottom"></td>
      </tr>
    </table>
  </div>
<script language="javascript">
	setBu();
</script>

<!----------BEGIN CSC ENDING ZONE ------------------------>

<%=screen.endJSP()%>

<!----------END CSC ENDING ZONE -------------------------->

</form>
</body>
</html>
