e-Payslip_DHAS.jsp 19.7 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 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277
<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@page import="com.csc.library.entry.HelpEntry,com.csc.library.system.*,com.csc.library.utilities.*,java.text.*,com.csc.library.databean.*,java.util.Enumeration"%>
<%@ page import="com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*"  %>
<% request.setCharacterEncoding("UTF-8"); %>
<jsp:useBean id="EMV" class="com.csc.library.system.Task" scope="page"/>
<jsp:setProperty name="EMV" property="appname" value="empview" />
<%
	CheckNull chk=new CheckNull();
	DecimalFormat df = new DecimalFormat("#,###,##0.00");
	DecimalFormat df2 = new DecimalFormat("00");

	EMV.setChannel(request, response);	
	HelpEntry screen = (HelpEntry) EMV.process("HelpEntry","EMV_PAYSLIP_REHELP"); 
	screen.inq.setFilter(" EMPLOYEEID='"+screen.getUProfile().get("employeeid")+"'");
	screen.inq.refresh();	
	screen.inq.next();

	String paymentDate = screen.getInquiry().getChild("tpy_his0").getString("gendate"); 

	int PeriodMonth = Integer.parseInt(chk.chkNullString(request.getParameter("PERIOD_MONTH"),""));
	int PeriodYear =  Integer.parseInt(chk.chkNullString(request.getParameter("PERIOD_YEAR"),""));

	

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/template-emv-main.dwt.jsp" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Employee View</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- InstanceBeginEditable name="head" -->
<!-- Begin CSS Links -->
<!-- <link rel="stylesheet" type="text/css" href="../CSS/DDMENU.css" />
<link rel="stylesheet" type="text/css" href="../CSS/EMV_DEFAULT.css" />
<link rel="stylesheet" type="text/css" href="../CSS/EMV_LAYOUT.css" />
<link rel="stylesheet" type="text/css" href="../CSS/EMV_LAYOUT_ONE.css" />
<link rel="stylesheet" type="text/css" href="../CSS/EMV_TEXT.css" />
<style type="text/css">
	.bg-gray {
		background: #ddd !important;
	}
</style> -->
<!-- End CSS Links -->
<!-- Begin Scripts -->
<script language="JavaScript"  type="text/javascript"src="../JS/EVENTS.js"></script>
<script language="JavaScript"  type="text/javascript" src="../JS/UTILITIES.js"></script>
<script language="JavaScript"  type="text/javascript"src="../JS/ACTIVE_OBJECT.js"></script>
<!-- Begin script for Dropdown Menu -->
<!-- DO NOT EDIT -->
<script language="JavaScript"  type="text/javascript" src="../JS/DDMENU.js"></script>
<!--[if lt IE 7]><script language="JavaScript" type="text/javascript" src="../JS/IEHOVER-FIX.js"></script><![endif]-->
<!-- DO NOT EDIT -->
<!-- End script for Dropdown Menu -->
<script language="JavaScript"  type="text/javascript"src="../JS/SCREEN.js"></script>
<script language="JavaScript" type="text/javascript">
	setLang("<%=screen.getUProfile().get("lang")%>");
	setPageTitle(swap2String("Working Information"));
	

	function viewData(){
		with(document.cscform){
			if(__employeeid.value!=""){
				__cmd.value="search";
				var m= months.value;
				if(m<10){
					m="0"+m;
				}
				FILTERDATE.value="gendate>='"+years.value+"-"+m+"-"+"01' and gendate <='"+years.value+"-"+m+"-"+"31'";
				mm.value=m;
				yyyy.value=years.value;
				submit();
			}else{
				alert(MyCode[0]);
			}
		}
	}
	
</script>
<style>
	.inc-desc{
		font-family: Cordia New; 
		font-size: 14.0px; 
		font-weight: bold;
	}
	.emp-info{
		font-family: Cordia New; 
		font-size: 12.0px; 
		font-weight: bold;
	}
	.emp-info-normal{
		font-family: Cordia New; 
		font-size: 12.0px; 
	}
</style>
<!-- End Scripts -->
<!-- Begin Head -->

<!-- End Head -->
<!-- InstanceEndEditable -->
</head>
<body>



<table style="width: 600px" cellpadding="0" cellspacing="0" border="0" bgcolor="white" align="center">
		<tr>
			<td style="width: 150px"><img src="../IMAGES/EMPVIEW/HondaLogoLessing.jpg" width="118" height="25"/><br><span style="font-family: Cordia New; font-size: 12.0px; font-weight: bold;">Honda Leasing (Thailand) Co.,Ltd.</span></td>
			<td style="width: 250px"><span style="font-family: Cordia New; font-size: 12.0px; font-weight: bold;">บริษัท ฮอนด้า ลีสซิ่ง (ประเทศไทย) จำกัด</span><br><span style="font-family: Cordia New; font-size: 10.0px; font-style: italic;">2784 Soi Sukumvit 66/1, Bangna,Bangkok 10260 Telephone (662) 736-4200</span></td>
			<td style="width: 200px" ><span style="font-family: sansserif; font-size: 24.0px;">e-Payslip</span></td>
		</tr>
</table>

<table style="width: 600px" cellpadding="0" cellspacing="0" border="0" bgcolor="white" align="center">
	<tr valign="top">
	  <td colspan="3">&nbsp;</td>
	</tr>
	<tr>
	  <td style="width: 250px"><span class="emp-info">ประจำเดือน (Of the month) : <%=new CscCalendar(PeriodYear,PeriodMonth,1).getThaiLongMonth()+" "+PeriodYear%>   </span></td>
	  <td style="width: 350px" colspan="2"><span class="emp-info">วันที่จ่ายเงิน (Payment Date) :<%=new CscCalendar(paymentDate).getDate()+" "+new CscCalendar(paymentDate).getThaiLongMonth()+" "+PeriodYear%> </span></td>
	</tr>
	<tr>
	  <td style="width: 250px"><span class="emp-info">ชื่อ-นามสกุล (Employee Name) : <%=screen.getString("FULLNAME")%></span></td>
	  <td style="width: 175px"><span class="emp-info">รหัสพนักงาน (Employee Code) : <%=screen.getString("EMPLOYEEID")%></span></td>
	  <td style="width: 175px"><span class="emp-info">วันที่เริ่มทำงาน (Hire Date) : <%=new CscCalendar( screen.getString("startdate")).getDate()+" "+new CscCalendar( screen.getString("startdate")).getThaiLongMonth()+" "+new CscCalendar( screen.getString("startdate")).getYear()%></span></td>
	</tr>
	<tr>
	  <td style="width: 250px"><span class="emp-info">ตำแหน่ง (Position) : <%=screen.getInquiry().getChild("mposition").getString("tdesc")%></span></td>
	  <td style="width: 350px" colspan="2"><span class="emp-info">หน่วยงาน (Organization) : <%=screen.getInquiry().getChild("mbu3").getString("tdesc")%></span></td>
	</tr>
	<tr>
	<!--   <td><span class="emp-info">&nbsp;</span></td> -->
	  <td><span class="emp-info" >สถานที่ปฎิบัติงาน (Location) :</span></td>
	</tr>
</table>

<table style="width: 600px" cellpadding="0" cellspacing="0" border="0" bgcolor="white" align="center">
	<tr valign="top">
	  <td colspan="42">&nbsp;</td>
	</tr>
	<tr valign="top">
	  <td colspan="42"><span style="font-family: Cordia New; color: #FF0000; font-size: 12.0px; font-weight: bold;">หมายเหตุ บริษัทถือว่าข้อความในเอกสารฉบับนี้เป็นความลับ ห้ามเปิดเผยให้ผู้อื่นทราบโดยเด็ดขาด</span></td>
	</tr>
	<tr valign="top">
	  <td colspan="42"><span style="font-family: Cordia New; font-size: 12.0px; font-style: italic;">Please Use this e-letter as the payroll or other income payment slip. The infomation is confidential. please do not reveal it to any one.</span></td>
	</tr>
</table>


<table style="width: 600px" cellpadding="0" cellspacing="0" border="0" bgcolor="white" align="center">
	<tr valign="top">
		<td colspan="3" style="width:300px; background-color: #FF9999; border-top: solid 1px #000000; border-left: solid 1px #000000; border-bottom:1px solid #000000;text-align:center" ><span class="inc-desc">รายได้(Earnings)</span></td>
		<td colspan="3" style="width:300px; background-color: #FF9999; border-top: solid 1px #000000; border-left: solid 1px #000000; border-bottom:1px solid #000000; border-right:1px solid #000000;text-align:center" ><span class="inc-desc">รายการหัก(Deductions)</span></td>
	</tr>

	<tr valign="top">
	  <td style="width:200px; background-color: #FFCCCC; border-left: solid 1px #000000; border-bottom:1px solid #000000;text-align:center" ><span class="inc-desc">รายละเอียด (Description)</span></td>
	  <td style="width:50px; background-color: #FFCCCC; border-left: solid 1px #000000; border-bottom:1px solid #000000;text-align:center" ><span class="inc-desc">Hours</span></td>
	  <td style="width:50px; background-color: #FFCCCC; border-left: solid 1px #000000; border-bottom:1px solid #000000;text-align:center" ><span class="inc-desc">Amount</span></td> 
	  <td style="width:200px; background-color: #FFCCCC; border-left: solid 1px #000000; border-bottom:1px solid #000000;text-align:center" ><span class="inc-desc">รายละเอียด (Description)</span></td>
	  <td style="width:50px; background-color: #FFCCCC; border-left: solid 1px #000000; border-bottom:1px solid #000000;text-align:center" ><span class="inc-desc">Hours</span></td>
	  <td style="width:50px; background-color: #FFCCCC; border-left: solid 1px #000000; border-bottom:1px solid #000000;border-right:1px solid #000000;text-align:center" ><span class="inc-desc">Amount</span></td>	 
	</tr>

	<%
	double incomes=0;
	double deducts=0;
	for(int i=1;i<=15;i++){
		double income = new CheckNull().chkNullStringToDouble(screen.getInquiry().getChild("tpy_his0").getString("incformula"+df2.format(i)));
		double deduct = new CheckNull().chkNullStringToDouble(screen.getInquiry().getChild("tpy_his0").getString("expformula"+df2.format(i)));
		//out.print(deduct+"<br>");
		incomes+=income;
		deducts+=deduct;
	%>
	<tr valign="top">
	  <td style="border-left: solid 1px #000000;"><span class="inc-desc">&nbsp;<%=screen.getInquiry().getChild("tpy_his0").getString("inccaption"+df2.format(i))%></span></td>
	  <td style="border-left: solid 1px #000000;"><span class="inc-desc">&nbsp;</span></td>
	  <td style="border-left: solid 1px #000000;text-align:right;padding-right:2px;"><span class="inc-desc">&nbsp;<%=(income>0?df.format(income):"")%></span></td>
	  <td style="border-left: solid 1px #000000;"><span class="inc-desc">&nbsp;<%=screen.getInquiry().getChild("tpy_his0").getString("expcaption"+df2.format(i))%></span></td>
	  <td style="border-left: solid 1px #000000;"><span class="inc-desc">&nbsp;</span></td>
	  <td style="border-left: solid 1px #000000;border-right: solid 1px #000000;text-align:right;padding-right:2px;">&nbsp;<span class="inc-desc"><%=(deduct>0?df.format(deduct):"")%></span></td>
	</tr>
	<%}%>

	<tr valign="top">
	  <td style="width:250px; border-left: solid 1px #000000; border-top: solid 1px #000000; border-bottom: solid 1px #000000;" colspan="2"><span class="inc-desc">&nbsp;รวมรายได้ (Gross Earning)</span></td>
	  <td style="width:50px; border-left: solid 1px #000000; border-top: solid 1px #000000; border-bottom: solid 1px #000000;text-align:right;padding-right:2px;"><span class="inc-desc"><%=df.format(incomes)%></span></td>
	  <td style="width:250px; border-left: solid 1px #000000; border-top: solid 1px #000000; border-bottom: solid 1px #000000;" colspan="2"><span class="inc-desc">&nbsp;รวมรายหัก (Gross Deductions)</span></td>
	  <td style="width:50px; border: solid 1px #000000;text-align:right;padding-right:2px;"><span class="inc-desc"><%=df.format(deducts)%></span></td>
	</tr>
	<tr valign="top">
	  <td style="width:250px;" colspan="3">&nbsp;</td>
	  <td style="width:250px; border-left: solid 1px #000000; border-bottom: solid 1px #000000;" colspan="2"><span class="inc-desc">&nbsp;เงินได้สุทธิ (Net Pay)</span></td>
	  <td style="width:50px; border-left: solid 1px #000000; border-bottom: solid 1px #000000;border-right: solid 1px #000000;text-align:right;padding-right:2px;"><span class="inc-desc"><%=df.format(incomes-deducts)%></span></td>
	</tr>
<table>
<br>

<table style="width: 600px" cellpadding="0" cellspacing="0" border="0" bgcolor="white" align="center">
	<tr valign="top">
		  <td style="width:85px; border-left: solid 1px #000000; border-top: solid 1px #000000; border-bottom: solid 1px #000000;text-align: center;"><span class="emp-info">เงินเดือนทั้งปี<br/>Salary YTD</span></td>
		  <td style="width:85px; border-left: solid 1px #000000; border-top: solid 1px #000000; border-bottom: solid 1px #000000; text-align: center;"><span class="emp-info">รายได้อื่นทั้งปี<br/>Other Income YTD</span></td>
		  <td style="width:85px; border-left: solid 1px #000000; border-top: solid 1px #000000; border-bottom: solid 1px #000000; text-align: center;"><span class="emp-info">ภาษีทั้งปี<br/>TAX YTD</span></td>
		  <td style="width:85px; border-left: solid 1px #000000; border-top: solid 1px #000000; border-bottom: solid 1px #000000; text-align: center;"><span class="emp-info">ประกันสังคมทั้งปี<br/>Social Security YTD</span></td>
		  <td style="width:90px; border-left: solid 1px #000000; border-top: solid 1px #000000; border-bottom: solid 1px #000000; text-align: center;"><span class="emp-info">เงินกองทุนฯสะสมทั้งปี<br/>Provident Fund YTD</span></td>
		  <td style="width:85px; border-left: solid 1px #000000; border-top: solid 1px #000000; border-bottom: solid 1px #000000; text-align: center;"><span class="emp-info">รายการหักอื่นทั้งปี<br/>Other Deduct YTD</span></td>
		  <td style="width:85px; border-left: solid 1px #000000; border-top: solid 1px #000000; border-bottom: solid 1px #000000; border-right: solid 1px #000000; text-align: center;"><span class="emp-info">รายได้สุทธิทั้งปี<br/>Net Income YTD</span></td>
	</tr>
	<tr valign="top">
		  <td style="width:85px; border-left: solid 1px #000000;  border-bottom: solid 1px #000000;text-align: center;"><span class="emp-info"><%=df.format(Double.parseDouble(screen.getInquiry().getString("salary_ytd")))%></span></td>
		  <td style="width:85px; border-left: solid 1px #000000;  border-bottom: solid 1px #000000;text-align: center;"><span class="emp-info"><%=df.format(Double.parseDouble(screen.getInquiry().getString("other_income_ytd")))%></span></td>
		  <td style="width:85px; border-left: solid 1px #000000;  border-bottom: solid 1px #000000;text-align: center;"><span class="emp-info"><%=df.format(Double.parseDouble(screen.getInquiry().getString("tax_ytd")))%></span></td>
		  <td style="width:85px; border-left: solid 1px #000000;  border-bottom: solid 1px #000000;text-align: center;"><span class="emp-info"><%=df.format(Double.parseDouble(screen.getInquiry().getString("social_ytd")))%></span></td>
		  <td style="width:90px; border-left: solid 1px #000000; border-bottom: solid 1px #000000;text-align: center;"><span class="emp-info"><%=df.format(Double.parseDouble(screen.getInquiry().getString("pvf_ytd")))%></span></td>
		  <td style="width:85px; border-left: solid 1px #000000;  border-bottom: solid 1px #000000;text-align: center;"><span class="emp-info"><%=df.format(Double.parseDouble(screen.getInquiry().getString("other_deduct_ytd")))%></span></td>
		  <td style="width:85px; border-left: solid 1px #000000; border-bottom: solid 1px #000000; border-right: solid 1px #000000;text-align: center;"><span class="emp-info">
		  <%=df.format(Double.parseDouble(screen.getInquiry().getString("salary_ytd"))+Double.parseDouble(screen.getInquiry().getString("other_income_ytd"))-Double.parseDouble(screen.getInquiry().getString("tax_ytd"))-Double.parseDouble(screen.getInquiry().getString("social_ytd"))-Double.parseDouble(screen.getInquiry().getString("pvf_ytd"))-	Double.parseDouble(screen.getInquiry().getString("other_deduct_ytd")))%>
		  </span></td>
	</tr>
</table>

<br>
<table style="width: 600px" cellpadding="0" cellspacing="0" border="0" bgcolor="white" align="center">
	<tr valign="top">
		  <td style="width:85px; border-left: solid 1px #000000; border-top: solid 1px #000000; border-bottom: solid 1px #000000;border-right: solid 1px #000000;text-align: center;"><span class="emp-info">บัญชีธนาคาร<br/>Bank Account/Branch</span></td>
		  <td style="width:85px; ">&nbsp;</td>
		  <td style="width:120px; border-left: solid 1px #000000; border-top: solid 1px #000000; border-bottom: solid 1px #000000;text-align: center;"><span class="emp-info">เงินกองทุนสำรองฯส่วนพนักงาน<br/>PVF Employee Accum.</span></td>
		  <td style="width:120px; border-left: solid 1px #000000; border-top: solid 1px #000000; border-bottom: solid 1px #000000;text-align: center;"><span class="emp-info">เงินกองทุนสำรองฯส่วนบริษัท<br/>PVF Company Accum.</span></td>
		  <td style="width:120px; border-left: solid 1px #000000; border-top: solid 1px #000000; border-bottom: solid 1px #000000;border-right: solid 1px #000000;text-align: center;"><span class="emp-info">เงินกองทุนสำรองฯรวม<br/>PVF Total</span></td>
		  <td style="width:35px; ">&nbsp;</span></td>
		  <td style="width:35px; ">&nbsp;</td>
	</tr>
	<tr valign="top">
		<td style="border-left: solid 1px #000000;  border-bottom: solid 1px #000000;border-right: solid 1px #000000;text-align: center;"><span class="emp-info"><%=screen.getInquiry().getChild("mempl_bank").getString("bankid")%>&nbsp;<%=screen.getInquiry().getChild("mempl_bank").getString("accountid")%></span></td>
		<td>&nbsp;</td>
		<td style="border-left: solid 1px #000000;  border-bottom: solid 1px #000000;text-align: center;"><span class="emp-info"><%=df.format(Double.parseDouble(screen.getInquiry().getString("emp_pvf")))%></span></td>
		<td style="border-left: solid 1px #000000;  border-bottom: solid 1px #000000;text-align: center;"><span class="emp-info"><%=df.format(Double.parseDouble(screen.getInquiry().getString("com_pvf")))%></span></td>
		<td style="border-left: solid 1px #000000; border-bottom: solid 1px #000000;border-right: solid 1px #000000;text-align: center;" ><span class="emp-info"><%=df.format(Double.parseDouble(screen.getInquiry().getString("emp_pvf"))+Double.parseDouble(screen.getInquiry().getString("com_pvf")))%></span></td>
		<td>&nbsp;</span></td>
		<td>&nbsp;</td>
	</tr>
</table>
<br>

<table style="width: 600px" cellpadding="0" cellspacing="0" border="0" bgcolor="white" align="center">
<tr>
  <td style="width: 300px">&nbsp;</td>
  <td style="width: 300px"><span class="emp-info"><b>เรียน ท่านผู้เกี่ยวข้อง</b></span><br><span class="emp-info-normal">เอกสารฉบับนี้เป็นเอกสารสำคัญ มีลายเซนต์ผู้มีอำนาจลงนามจากระบบอิเลคทรอนิคส์<br/>ออกโดย บริษัท ฮอนด้า ลีสซิ่ง (ประเทศไทย) จำกัด ซึ่งสามารถใช้แทนหนังสือรับรอง<br/>การทำงานและหนังสือรับรองเงินเดือนได้</span></td>
</tr>
<tr>
  <td colspan="2">&nbsp;</td>
</tr>
<tr>
  <td style="width: 300px">&nbsp;</td>
  <td style="width: 300px"><span class="emp-info"><b>To whom it may concern</b></span><br><span class="emp-info-normal">This is certify that document is electronically issued with the authorized<br/>person's signature by Honda Leasing (Thailand) Co.,Ltd. The document<br/>can be used as a reference for employment status and salary verification.</span></td>
</tr>
</table>
<br>
<br>
<table style="width: 600px" cellpadding="0" cellspacing="0" border="0" bgcolor="white" align="center">
<tr>
  <td style="width: 450px" colspan="3">&nbsp;</td>
  <td style="width: 150px" align="center" > <img src="HondaPic/signature.jpg" border="0"/></td>
</tr>

<tr>
<td style="width: 450px" colspan="3">&nbsp;</td>
<td style="width: 150px" align="center" ><span class="emp-info">Date : <%=new CscCalendar().getDate()+" "+new CscCalendar().getThaiLongMonth()+" "+new CscCalendar().getEngYYYY()%></span></td>
</tr>
</table>




</body>
</html>