WEL014_NSTDA.jsp 7.06 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
<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="com.csc.library.entry.*,com.csc.library.system.*,com.csc.library.utilities.*"%>
<jsp:useBean id="WEL014" class="com.csc.library.system.Task" scope="page" />
<%
	WEL014.setChannel(request, response);
	HelpEntry screen = (HelpEntry) WEL014.process("HelpEntry","WEL014_NSTDA");
	 screen.inq.setFilter("employeeid='"+screen.getUProfile().get("employeeid")+"'");
	screen.process();
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
<link href="../CSS/MENU.css" rel="stylesheet" type="text/css">
<link href="../CSS/TISCO.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="../JS/SCREEN.js"></script>
<script language='javascript' src="../JS/VIEWCALENDAR.js"></script>
<script language='javascript' src="../JS/ICONSMENU.js"></script>
<script language='javascript' src="../JS/HOTKEY.js"></script>
<script language='javascript'>setLang('<%=screen.getUProfile().get("lang")%>');</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function postnew(page){
    with(document.cscform){
	           open(page,"post","height=420,width=600");
	}
}

function helpSearch(empid,docno,formula){
	with(document.cscform){		
		//alert("empid="+empid+",docno="+docno+",formula="+formula);
		__help.value="__employeeid#"+empid+",__docno#"+docno+",__formulaid#"+formula+",__companyid#"+__companyid.value;
		__lockPage.value="true";
		alert("__help="+__help.value);
		action="PRU071.jsp";
		submit();
	}
}

function gotopage(page,idno){
		with(document.cscform){
					action=page;
					__welid.value=idno;
					__fixCon.value="welid='"+idno+"'";
					__cmd.value="search";
					__readposter.value="count";					
					submit();
		}
}

function gotopage1(page,idno){
		with(document.cscform){
					action=page;
					__complainid.value=idno;
					__fixCon.value="complainid='"+idno+"'";
					__cmd.value="search";
					__readposter.value="count";					
					submit();
		}
}

function GoSave() {}
function GoDelete(){}
function GoSearch(){}
function GoUpdate(){}

function goHelp1(helpName,inputName){
			var helpReturn;
                     helpReturn="__employeeid1:employeeid";
				 linkHelp_Return(helpName,helpReturn);
}

function goHelp2(helpName,inputName){
			var helpReturn;
                     helpReturn="__employeeid2:employeeid";
				 linkHelp_Return(helpName,helpReturn);
}

function goHelp3(helpName,inputName){
			var helpReturn;
                     helpReturn="__welid1:welid";
				 linkHelp_Return(helpName,helpReturn);
}

function goHelp4(helpName,inputName){
			var helpReturn;
                     helpReturn="__welid2:welid";
				 linkHelp_Return(helpName,helpReturn);
}

//-->
</script>

<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>
<body>
<div class="centered">
<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
<script language="javascript">initToolTips();</script>
<form name="cscform" method="post">
 

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

<%=screen.InitialVariable()%>

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

<input name="__cmd" type="hidden" value="">
  <input type="hidden" name="__calendar">
  <script language="javascript">getInputFormatDate();</script>

  <input type="hidden" name="__language" value="eng">
	<input type="hidden" name="__help" value="">
	<input type="hidden" name="__goPage" value="">
	<input type="hidden" name="__orderBy" value="">
	<input type="hidden" name="__helpReturn" value="">
	<input type="hidden" name="__helpName" value="">
	<input type="hidden" name="__pageCall" value="">
	<input type="hidden" name="__referPage" value="">
	<input name="__language" type="hidden" value="<%=screen.getUProfile().get("lang")%>">
	<input type="hidden" name="__lockPage" value="">
	<input type="hidden" name="__employeeid" value="">
	<input type="hidden" name="__docno" value="">
	<input type="hidden" name="__formulaid" value="">
  	<input type="hidden" name="__companyid"  value="<%=screen.getUProfile().get("companyid")%>">	
	<input type="hidden" name="__welid" value="">
	<input type="hidden" name="__complainid" value="">
	<input type="hidden" name="__fixCon" value="">
	<input type="hidden" name="__reader" value="">
	<input type="hidden" name="__readposter" value="">
	<input name="__screen" type="hidden" value="WEL014">
  <div align="center">
    <table width="641" class="largest">
<tr > 
        <td width="645" colspan="2" class="header" >WEL014, <script language="javascript">swapLang('Welfare list');</script>&nbsp;</td>
      </tr>
      <tr > 
        <td ><table width="638" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#808080" class="inframe">
            <tr> 
              <td colspan="5" class="blankspace"> </td>
            </tr>
            <tr> 
              <td colspan="5" class="row1"><span class="header">
                <script language="javascript">swapLang('Welfare list');</script>
              </span></td>
            </tr>
            <tr> 
              <td width="150" class="title1"><div align="center"><%=screen.getLabel("WELID")%></div></td>
              <td width="485" class="title1"><span class="row1"><span class="header">
                <script language="javascript">swapLang('Description');</script>
              </span></span></td>
              <td width="485" class="title1"><%=screen.getLabel("MWELFARE","WELCOST")%></td>
              <td width="485" class="title1"><%=screen.getLabel("SUMCOST")%></td>
              <td width="485" class="title1"><script language="javascript">swapLang('Remain');</script></td>
            </tr>
			<%
		    java.text.DecimalFormat df=new java.text.DecimalFormat("#,##0.00");
			CheckNull chk=new CheckNull();
			double _welcost=0,_sumcost=0,_total=0;
			while (screen.nextRec()){			
				     _welcost=0;
				     _sumcost=0;
					 _total=0;
				     screen.getInquiry().getCurrentDbRecord().set("_wid",screen.getString("welid"));
				     screen.getInquiry().getCurrentDbRecord().set("_empid",screen.getUProfile().get("employeeid"));					 
				     screen.getInquiry().getCurrentDbRecord().set("_budid",screen.getString("MWELFARE","budid"));					 
				     _welcost=Double.parseDouble(chk.chkNullString(screen.getInquiry().getString("MWELFARE","WELAMOUNT"),"0"));
				     _sumcost=screen.getInquiry().getCurrentDbRecord().getDouble("SUMCOST");			     
					 _total=_welcost-_sumcost;
			%>
            <tr> 
              <td class="columnlabel_baseline"><div align="center"><a href="javascript:gotopage('WEL013.jsp','<%=screen.getString("welid")%>');"><%=screen.getString("WELID")%></a></div></td>
              <td><%=screen.getString("MWELFARE","TDESC")%></td>
              <td><%=df.format(_welcost)%></td>
              <td><%=df.format(_sumcost)%></td>
              <td><%=df.format(_total)%></td>
            </tr>
            <%
			   }
			%>
            <tr> 
              <td colspan="5" class="blankspace"></td>
            </tr>
          </table>
          
        </td>
      </tr>
      <tr> 
        <td class="bottom" >
          </td>
      </tr>
    </table>
   
    <p>&nbsp;</p>
  </div>
</form>
</body>
</html>