viewTaxy.jsp 2.53 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
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page import="com.csc.library.system.*,com.csc.library.utilities.*,com.csc.library.cscexport.*,java.util.*,com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META name="GENERATOR" content="IBM WebSphere Studio">
<META http-equiv="Content-Style-Type" content="text/css">
<LINK href="theme/Master.css" rel="stylesheet" type="text/css">
<TITLE>VIEW TPYTRAN1</TITLE>
</HEAD>
<BODY>
<%
			UProfile UP = new UProfile(); 
			UP = new UProfile();
			
			/*UP.setDbName("SQL_THAIMETAL2");         
			UP.setSchemaName("PR");
			UP.setUserName("myhradmin");
			UP.set("companyid", "10");
			UP.set("lang", "eng");	
			UP.set("appname","Payroll");*/

			/*UP.setDbName("SQL_MYHRDBS");         
			UP.setSchemaName("PR");
			UP.setUserName("myhradmin");
			UP.set("companyid", "10");
			UP.set("lang", "eng");	
			UP.set("appname","Payroll");*/

			/*UP.setDbName("BTP");         
			UP.setSchemaName("PR");
			UP.setUserName("myhradmin");
			UP.set("companyid", "05");
			UP.set("lang", "eng");	
			UP.set("appname","Payroll"); */


			UP.setDbName("PRDBS");         
			UP.setSchemaName("PR");
			UP.setUserName("myhradmin");
			UP.set("companyid", "001");
			UP.set("lang", "eng");	
			UP.set("appname","Payroll"); 


			String	tablename	=	"mempl_taxm";    

			boolean flag			=	false;
			try{
				out.println("============Start sum test =========="+"<br>");
				//1. ทำการวนหาค่าใน tpytran0
				DbInquiry inqTPY = new InitialInquiry(UP).getDbInquiry();
				inqTPY.initMyTable(tablename,"employeeid = 'J2203024'","formula_type");     
				inqTPY.setColumn("*");
				inqTPY.refresh();
				double	value		= 0.0;
				double	tmp		=	0.0;
				int			count		=	0;
				while(inqTPY.next()){
					DbRecord recTPY		= 	inqTPY.getCurrentDbRecord().cloneRecord(true);	 
					
					/*if(recTPY.getString("formula_type").equals("1")){
						out.println("formulaid    "+recTPY.getString("FORMULAID")+" "+recTPY.getDouble("AMOUNT")+"   "+recTPY.getString("formula_type")+"     "+recTPY.getString("gendate")+"<br>");
						value	+= recTPY.getDouble("AMOUNT"); 
					}*/
				
					out.println("formulaid============>"+recTPY.getString("formulaid")+" Taxindex "+recTPY.getString("tax_index") +" value ==========>"+recTPY.getDouble("amount")+"<br>");		  	
				
				}
				//out.println(value);
			}catch(Exception e){
				e.printStackTrace();
			}
			
%>
</BODY>
</HTML>