PRR043.jsp 9.71 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page import="com.csc.library.entry.*,com.csc.library.utilities.*" %>
<%@page contentType="text/html; charset=UTF-8" language="java" %>
<%request.setCharacterEncoding("UTF-8"); %>
<jsp:useBean id="ASR002" scope="page" class="com.csc.library.system.Task"/>
<%
   ASR002.setChannel(request ,response);
   ReportEntry screen=null;
   screen=(ReportEntry)ASR002.process("ReportEntry",request.getParameter("__screen"));
   UProfile uf=screen.getUProfile();
   CscCalendar cs=new CscCalendar();
%>
<html>
<head>
<title>ReportOption</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../CSS/TISCO.css" rel="stylesheet" type="text/css">
<link href="../CSS/bootstrap.css" rel="stylesheet"  type="text/css">
<link href="../CSS/bootstrap_csc_backend.css" rel="stylesheet"  type="text/css">
<script type="text/javascript" src="../JS/jquery-2.1.3.min.js"></script>
<script type='text/javascript' src="../JS/bootstrap.js"></script>
<script language='javascript' src='../JS/SCREEN.js'></script>
<script language='javascript' src='../JS/CALENDAR.js'></script>
<script language='javascript'>setLang('<%=screen.getUProfile().get("lang")%>');</script>
<script src="../JS/VIEWCALENDAR.js"></script>

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function back(){
	var z=0;
	var filter = "";
	with(document.cscform){
		 for(z=0;z<elements.length;z++){
			if(elements[z].type.indexOf("select")>-1){
				 setParent(elements[z].name,elements[z].options[elements[z].selectedIndex].value);
			}else {
				if(elements[z].type.indexOf("radio")>-1){
					if (elements[z].checked)  {
						setParent(elements[z].name, elements[z].value);
					}
				}else {
		 			setParent(elements[z].name,elements[z].value);
				}
		     }
		}
		var mouth = __period_month.value;
		var year = __period_year.value
		//var day = getDayInMonths(mouth,'',year);
		var day = getDayInMonths(mouth,'',year);

		if(mouth.length==1){
			mouth = "0"+__period_month.value;
		}
		//filter = "(employeeid in(select employeeid from mempl_taxm where gendate like '"+year+"-"+mouth+"%' and calsoc='1') and calsoc='1' or (resigndate >='"+year+"-"+mouth+"-"+day+"' and calsoc='1'))";
		//filter = "(employeeid in(select employeeid from mempl_taxm where gendate like '"+year+"-"+mouth+"%' and calsoc='1' and startdate <='"+year+"-"+mouth+"-"+day+"' ) or (calsoc='1' and resigndate >='"+year+"-"+mouth+"-"+day+"' and startdate <='"+year+"-"+mouth+"-"+day+"') )";
		filter = "(employeeid in(select employeeid from mempl_taxm where gendate like '"+year+"-"+mouth+"%' and calsoc='1' ) or (calsoc='1' and resigndate >='"+year+"-"+mouth+"-"+day+"' and startdate <='"+year+"-"+mouth+"-"+day+"') and (employeeid not in(select employeeid from mempl_taxm where gendate like '2016-06%' and calsoc='1') and STARTDATE not between '"+year+"-"+mouth+"-01' and '"+year+"-"+mouth+"-"+day+"') )";
	}
	window.opener.document.cscform.__fixfiltermemployee.value = filter;
	window.close();
}


function setParent(inputName,inputValue){
	with(window.opener.document.cscform){
	 for(var  z=0;z<elements.length;z++){
	 	if(elements[z].name==inputName){
			   if(elements[z].name=="__language"){
					for(var k=0;k<__language.length;k++){
						if(__language.options[k].value==inputValue){
						     __language.options[k].selected=true;
						}
					}
			  }else{
			   elements[z].value=inputValue;
			   }
 		}
	 }
	}
}

function goHelp(helpName,inputName) {
	var helpReturn;
	if (inputName=="__codeid" ) {
	 	helpReturn="__codeid:codeid,MLEAVE_REPORT@EDESC";
	}
	linkHelp_Return(helpName,helpReturn);
}

function linkHelp_Return(help,input){
	with(document.cscform){
		var param="PRU084.jsp?__helpName="+help+"&__helpReturn="+input+"&__pageCall="+__screen.value+"&__checkVerify=off";
		window.open(param,"Help","left=150,top=150,width=600,height=400,toolbar=no,status=yes,scrollbars=yes,resizable=yes");
	}
}

function setLimitSOC(val){
    with(document.cscform){
		__LIMITSOC.value = val;
	}
}

//-->
</script>

</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif')">
<form name="cscform" method="post" >
<input type="hidden" name="__cmd" value="">
<input type="hidden" name="__language" value ="<%=screen.getUProfile().get("lang")%>">
<input type="hidden" name="__dateformat" value ="YYYY-MM-DD">
<input type="hidden" name="__calendar">
  <div align="center">
    <table  cellpadding="0"  cellspacing="0">
      <tr >
        <td  class="header"> PRR043,
		  <script language="javascript">swapLang('Report Option');</script>&nbsp;</td>
      </tr>
      <tr >
        <td  colspan="2">
          <div align="center">
            <table  cellpadding="0" cellspacing="0" >
              <tr>
                <td colspan="2"  class="blankspace"></td>
              </tr>
				 <tr>
					<td width="150"><div align="right"><script language="javascript">swapLang('Period month');</script>&nbsp;</div></td>
				   <td width="475">
				   <select name="__period_month" >
				   			<option value="1" selected>1</option>
				   			<option value="2">2</option>
				   			<option value="3">3</option>
				   			<option value="4">4</option>
				   			<option value="5">5</option>
				   			<option value="6">6</option>
				   			<option value="7">7</option>
				   			<option value="8">8</option>
				   			<option value="9">9</option>
				   			<option value="10">10</option>
				   			<option value="11">11</option>
				   			<option value="12">12</option>
				   </select>&nbsp;
					   <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('calendar2','','IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)">					   </a>
					</td>
				</tr>
				 <tr>
					<td><div align="right"><script language="javascript">swapLang('Period year');</script>&nbsp;</div></td>
				   <td><input type="text" name="__period_year" value="<%=cs.getEngYYYY()%>">&nbsp;
					   <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('calendar2','','IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)">					   </a>
					</td>
				</tr>

				 <tr>
					<td><div align="right"><script language="javascript">swapLang('Confirm Date');</script>&nbsp;</div></td>
				   <td><input type="text" name="__curr_date" value="<%=cs.getYYYYMMDD()%>">&nbsp;
					   <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('calendar2','','IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)">					   </a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('calendar21','','IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)"><img src="IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="Calendar" name="calendar21" width="20" height="20" border="0" align="absmiddle" id="calendar21" onClick="viewCal('__curr_date')"></a>
					</td>
				</tr>
				<tr>
					<td><div align="right"><script language="">swapLang('Tax 40')</script></div>
					</td>
					<td>&nbsp;<input name="__tax40" type="radio" value="1" > 40 (1)  &nbsp;<input name="__tax40" type="radio" value="2"> 40 (2)&nbsp;<input name="__tax40" type="radio" value="3"checked> 40 (1)(2)
					</td>
				</tr>
                <tr>
                    <td>
                        <div align="right"><%=screen.getUProfile().get("lang").equalsIgnoreCase("THA")?"รูปแบบค่าจ้าง":"Salary Format"%></div>
                    </td>
                    <td>
                        &nbsp;<input name="LIMITSOC" type="radio" value="0" onclick="setLimitSOC(this.value);" checked>&nbsp;<%=screen.getUProfile().get("lang").equalsIgnoreCase("THA")?"ฐานเงินเดือน":"Salary"%>&nbsp;
                        &nbsp;<input name="LIMITSOC" type="radio" value="1" onclick="setLimitSOC(this.value);">&nbsp;<%=screen.getUProfile().get("lang").equalsIgnoreCase("THA")?"ไม่เกิน 15,000":"Limit 15,000"%>
                        <input type="hidden" name="__LIMITSOC" value="0">
                    </td>
                </tr>
              <tr >
                <td colspan="2" class="blankspace"></td>
              </tr>

              <tr>
                <td  class="buttonline" colspan="7"><div align="center">
                  <button type="button" class="btn btn-primary width100" swlang code="SW013169" onClick="back();">OK</button>&nbsp;
                  <button type="button" class="btn btn-primary width100" swlang code="SW006927" onClick="window.close();">CANCEL</button>
                </div>
                </td>
              </tr>
              <tr >
                <td colspan="2" class="blankspace"></td>
              </tr>
            </table>
          </div></td>
      </tr>
      <tr bordercolor="0069B3">
        <td  class="bottom"></td>
      </tr>
    </table>
  </div>
<INPUT TYPE="hidden" NAME="__screen" VALUE="<%=request.getParameter("__screen")%>">
</form>
</body>
</html>