WEL083_LPN.jsp 5.66 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="com.csc.library.entry.HelpEntry,com.csc.library.system.*,com.csc.library.utilities.CheckNull,com.csc.library.session.*,java.text.*"%>
<jsp:useBean id="WEL083_LPN" class="com.csc.library.system.Task" scope="page" />
<%
	WEL083_LPN.setChannel(request, response);
	HelpEntry screen = (HelpEntry) WEL083_LPN.process("HelpEntry", "WEL083_LPN");
	screen.setMaxLine(20);	
	screen.process();
	//out.print(request.getParameter("__clubid"));
%>
<html>
<head>
<title><%=screen.getInquiry().getCurrentDbRecord().getDescription()%></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../CSS/TISCO.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="../JS/SCREEN.js"></script>
<script language="javascript">setLang('<%=screen.getUProfile().get("lang")%>');</script>
<script language='javascript' src='./JS/SWAPLANG.js'></script>
<script language="JavaScript" type="text/JavaScript">
<!--
//-->

function goPages(clubid,pages){
  		with(document.cscform){
			//with(window.opener.document.cscform){
			__fixCon.value ="clubid='"+clubid+"'";			
			  action = pages+".jsp";			  
			  submit();	     				  
		}
		//window.close();
}

function goProfile(){
  		with(document.cscform){
			  action="CI001.jsp";
			  submit();
		}
}
	function backhead(){
		with(document.cscform){
		//with(window.opener.document.cscform){
			__fixCon.value ="";
			action = "WEL082_LPN.jsp"
	    	submit();
	     	//window.close();
		}
	}
</script>
</head>
<%
		String helpReturn="";
		if(request.getParameter("__helpReturn")!=null){
			helpReturn=request.getParameter("__helpReturn");
		}
%>
<body leftmargin="0" topmargin="0">
<form name="cscform" method="post" >


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

<%=screen.InitialVariable()%>

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

<input type="hidden" name="__cmd" value="">
<input type="hidden" name="__help" value="">
<input type="hidden" name="__goPage" value="">
<input type="hidden" name="__orderBy" value="<%=request.getParameter("__orderBy")%>">
<input type="hidden" name="__helpReturn" value="<%=helpReturn%>">
<input type="hidden" name="__helpName" value="<%=request.getParameter("__helpName")%>">
<input type="hidden" name="__pageCall" value="<%=request.getParameter("__screen")%>">
 <input type="hidden" name="__fixCon" value="<%=request.getParameter("__fixCon")%>">
 <input type="hidden" name="__companyid" value="<%=screen.getUProfile().get("companyid")%>">
  <input type="hidden" name="__clubid" value="<%=request.getParameter("__clubid")%>">
 <br>
 <div align="center">
 <table height="" align="center" cellpadding="0" cellspacing="0" >
    <tr bgcolor="#3366CC">
      <td  height="20" class="header">WEL083_LPN, <script language="javaScript">swapLang("Budget Of Club")</script>&nbsp;</td>
  </tr><%  screen.nextRec(); %>
  <tr><td>&nbsp;&nbsp;&nbsp;<script language="javaScript">swapLang("Club1")</script>&nbsp;&nbsp;<%= screen.getString("mclub","tdesc") %></td></tr>
		  <tr>
		  <td>
		  <table height="" align="center" cellpadding="0" cellspacing="0" class="inframe">
		  <tr >
					<td class="title1"><div align="center">&nbsp;&nbsp;<%=screen.getLabel("mbudgclub","yearid")%></div></td>
					<td class="title1"><div align="center">&nbsp;&nbsp;<%=screen.getLabel("mbudgclub","budget")%></div></td>					
					<td class="title1"><div align="center">&nbsp;&nbsp;<%=screen.getLabel("mbudgclub","used")%></div></td>					
					<td class="title1"><div align="center">&nbsp;&nbsp;<script language="javascript">swapLang("Remain")</script></div></td>					
		  </tr>
		   <% 
		   		//screen.getInquiry().first();
				//screen.getInquiry().refresh();
		   		int seq = 1;
				DbInquiry dba_t1 = (DbInquiry) screen.getInquiry().getCurrentDbRecord().getChild("mbudgclub");
				dba_t1.refresh();										
				//if(dba_t1.recCount()>0)	{						
						while(dba_t1.next()){																												
					dba_t1.referLangOn();					
					//while(screen.nextRec()){ 
						if(screen.checkLinePage()){   						
							DecimalFormat df = new DecimalFormat("#,###.##");
							double lastbudget = ((DbInquiry)screen.getInquiry().getChild("mbudgclub")).getCurrentDbRecord().getDouble("budget") - ((DbInquiry)screen.getInquiry().getChild("mbudgclub")).getCurrentDbRecord().getDouble("used");
							String lastbudgets = df.format(lastbudget);
			%>
			  <tr> 
						<td height="21"  class="forborder" ><div align="center"nowrap><%=screen.getString("mbudgclub","yearid")%></div></td>         
						<td  class="forborder"><div align="center">&nbsp;<%=screen.getString("mbudgclub","budget")%></div></td>  						
						<td  class="forborder"><div align="center">&nbsp;<%=screen.getString("mbudgclub","used")%></div></td>						
						<td  class="forborder"><div align="center">&nbsp;<%=lastbudgets%></div></td>						
			 </tr>
		  <%	seq++;
						dba_t1.referLangOff();						
				}						
				 if(screen.outLinePage()){ break; }
				   }%>
		  </table>
		  </td>
		  </tr>
		    <tr><td class="blankspace">
		  </td></tr>
		<tr>
                  <td colspan="2" class="buttonline"  >
				  <!--input type="hidden" name="__clubid" value="<%//=screen.getString("clubid")%>"-->
				  <input type="hidden" name="clubname" value="<%=screen.getString("mclub","tdesc")%>">
                  	<a href="javascript:goPages('<%=screen.getString("clubid")%>','WEL084_LPN');"><img src="../IMAGES/BUTTON/ADD.gif" border="0"></a>&nbsp;&nbsp;
                  	<a href="javascript:backhead();"><img src="../IMAGES/BUTTON/BACK.gif" border="0"></a>
                  </td>
            </tr>
		  <tr><td class="bottom">
		  </td></tr>
  
  </table>
</div>
</form>
</body>
</html>