EMP_LEAVEDESC.jsp 6.5 KB
Newer Older
Thitichaipun Wutthisak committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
<%@page contentType="text/html; charset=UTF-8" language="java" %>
<%@page import="com.csc.library.entry.HelpEntry,com.csc.library.system.*,com.csc.library.utilities.*,com.csc.library.formula.*"%>
<%@page import="com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*"  %>
<%@ include file="../CHECKPROFILE.jsp" %>
<% request.setCharacterEncoding("UTF-8"); %>
<jsp:useBean id="EMV" class="com.csc.library.system.Task" scope="page" />
<jsp:setProperty name="EMV" property="appname" value="empview" />
<%
	EMV.setChannel(request,response);

	ThaiUtilities thaicode=new ThaiUtilities();
	CheckNull chk = new CheckNull();
	String empID=thaicode.ASCII2Unicode(chk.chkNullString(request.getParameter("__empID")));
	String empName=thaicode.ASCII2Unicode(chk.chkNullString(request.getParameter("__empName")));
	String leaveDesc=thaicode.ASCII2Unicode(chk.chkNullString(request.getParameter("__lv_desc")));

	HelpEntry screen = (HelpEntry) EMV.process("HelpEntry","PI_LEAVEDESCHELP");
	screen.inq.setFilter("employeeid = '"+empID+"' ");
	screen.process();

	java.text.DecimalFormat df = new java.text.DecimalFormat("00.00");
	FormulaString fs=new FormulaString();
%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" ng-app="myHR">
<html>
<title><%=leaveDesc%></title>
	<head>

		<link rel="stylesheet" href="<%=request.getContextPath()%>/CSS/font-awesome.css">
		<link rel="stylesheet" type="text/css" href="../CSS/Bootstrap/css/bootstrap.css" />
		<link rel="stylesheet" type="text/css" href="../CSS/EMPVIEW_LAYOUT.min.css" />

		<script type="text/javascript" src="../JS/jquery-2.1.3.min.js"></script>
		<script type="text/javascript" src="../JS/EVENTS.js"></script>
		<script type="text/javascript" src="../JS/UTILITIES.js"></script>
		<script type="text/javascript" src="../JS/ACTIVE_OBJECT.js"></script>
		<script type="text/javascript" src="../JS/SCREEN.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>
			setLang("<%=screen.getUProfile().get("lang")%>");

			function chkDateTime1(valueSearch){
				var tmpval="";
				with(document.cscform){
					var valueSearch1=valueSearch.split("-");
					if(valueSearch1.length==3){
						if(valueSearch1[1].length==1){
							valueSearch1[1]="0"+valueSearch1[1];
						}
						if(valueSearch1[0].length==1){
							valueSearch1[0]="0"+valueSearch1[0];
						}
						valueSearch1[2]=parseInt(valueSearch1[2]);
						return valueSearch=valueSearch1[2]+"-"+valueSearch1[1]+"-"+valueSearch1[0];
					 }
				}
			}
		</script>
	</head>
	<body>
		<div class="bg-com"></div>
			<div class="container csc-content">
				<form name="cscform" class="form-horizontal" method="post">
					<input type="hidden" name="__screen"  value="PI_LEAVEDESC">
					<input type="hidden" name="__fixCon" value="<%=request.getParameter("__fixCon")%>">
					<input type="hidden" name="__cmd"  value="">
					<input type="hidden" name="__language" value="<%=screen.getUProfile().get("lang")%>">
					<input type="hidden" name="__companyid" value='<%=screen.getUProfile().get("companyid")%>'>
					<input type="hidden" name="__employeeid" value="<%=request.getParameter("__employeeid")%>">
					<input type="hidden" name="__referPage" value="">
					<input type="hidden" name="__childFilter">
					<input type="hidden" name="__date_start" value="<%=request.getParameter("__date_start")%>">
					<input type="hidden" name="__date_end" value="<%=request.getParameter("__date_end")%>">
					<input type="hidden" name="date_start" value="<%=request.getParameter("date_start")%>">
					<input type="hidden" name="date_end" value="<%=request.getParameter("date_end")%>">
					<input type="hidden" name="__gorec">
					<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
					<script>initToolTips();</script>

					<%
						String d1 = "";
						String d2 = "";
						CscCalendar c1 = null;
						CscCalendar c2 = null;
						try {
							d1 = (String) StaticConfig.getConfigCompany(screen.getUProfile(), "ta1001");
							d2 = (String) StaticConfig.getConfigCompany(screen.getUProfile(), "ta1002");
							if (d1!=null && d2!=null && !d1.equals("") && !d2.equals("")) {
								c1 = new CscCalendar(d1);
								c2 = new CscCalendar(d2);
							}
						} catch (Exception e) {
							e.printStackTrace();
						}
					%>

					<div class="csc-block-white">
						<div class="center">
							<h4><%=leaveDesc%> <label swlang code='SW001838'>of</label> <label swlang code='SW000307'>Employee</label>
								<%=empID%>&nbsp;:&nbsp;<%=empName%>
							</h4>
						</div>
						<div class="container csc-content">
							<table class="table table-head table-hover table-bordered table-title-left table-content-center">
								<thead>
									<tr>
										<th class="table-title" colspan=6>

											<%
												//out.println(c1+" : "+c2);
												if (c1!=null && c2!=null && !c1.equals(c2)) {
													if (screen.getUProfile().get("lang").equalsIgnoreCase("tha")) {
														out.println(c1.getDDThaiYYYY()+" - "+c2.getDDThaiYYYY());
													} else {
														out.println(c1.getDDEngYYYY()+" - "+c2.getDDEngYYYY());
													}
												}
											%>
										</th>
									</tr>
									<tr>
										<th swlang code='SW001393'>No.</th>
										<th swlang code='SW001834'>Leave Date</th>
										<th swlang code='SW001835'>Leave Time</th>
										<th><label swlang code="SW000024">Total</label> (<label swlang code="SW011233">HH MM</label>)</th>
										<th swlang code='SW001836'>Documnet No</th>
										<th swlang code='SW000717'>Year</th>
									</tr>
								</thead>
								<tbody>
									<%
										int i=0;
										//out.println(screen.inq.recCount());
										while (screen.inq.next()) {
											i++;
									%>
									<tr>
										<td><%=i%></td>
										<td><%=screen.getString("dateid")%></td>
										<td>
											<%=screen.getString("lv_bg_date")%>:<%=df.format(screen.inq.getCurrentDbRecord().getDouble("lv_bg_time"))%> - <%=screen.getString("lv_en_date")%>:<%=df.format(screen.inq.getCurrentDbRecord().getDouble("lv_en_time"))%>
										</td>
										<td><%=screen.getString("m_lv")%></td>
										<td><%=screen.getString("docid")%></td>
										<td><%=screen.getString("yearid")%></td>
									</tr>
									<% } %>
								</tbody>
							</table>

							<div class="center">
								<a class="btn btn-primary" swlang code="SW012104" onclick="javascript:window.close()">Close</a>
							</div>
						</div>
					</div>
				</form>
			</div>
	</body>
</html>