<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page import="com.csc.library.entry.*" %>
<%@ page import="com.csc.library.utilities.*,com.csc.library.session.*" %>
<%@page contentType="text/html; charset=UTF-8"%>
<jsp:useBean id="APSR005" scope="page" class="com.csc.library.system.Task"/>
<%
    APSR005.setChannel(request ,response);
    ReportEntry screen=null;
    screen=(ReportEntry)APSR005.process("ReportEntry",request.getParameter("__screen"));
    UProfile uf=screen.getUProfile();
    CheckNull chkNull = new CheckNull();
    CscCalendar car = new CscCalendar();
%>
<html ng-app="myHR">
    <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">
        <script language='javascript' src='../JS/SCREEN.js'></script>
        <script src="../JS/angular-1.3.15/angular.js" type="text/javascript"></script>
        <script src="../JS/ANGULAR/SCREEN_ANGULAR.js" type="text/javascript"></script>
        <script language='javascript'>setLang('<%=screen.getUProfile().get("lang")%>');</script>
        <script type="text/javascript" src="../JS/jquery-2.1.3.min.js"></script>
        <script src="../JS/VIEWCALENDAR.js"></script>

        <script language="JavaScript" type="text/JavaScript">
            function back(){
                var year = $("input[name='year']").val();
                var seq = $("input[name='seq']:checked").val();

                with(window.opener.document.cscform){
                    __APSYEAR.value = year;
                    __SEQUENCE.value = seq;
                    __fixfiltermbu2.value = "bu2id not in (select DISTINCT(subdata) from tapstran_bu where apsstate='1'  and apsyear ='"+year+"' and sequence = '"+seq+"' and apsgroup='MBU2')";
                }
                window.close();
            }

            function goHelp(helpName,inputName) {
                var helpReturn;
                var filter = "";
                with(document.cscform){
                    if (inputName=="__branch" ){
                        helpReturn="__branch:branchid,branchname:tdesc";
                    }
                }

                linkHelp_Return(helpName, helpReturn, filter);
            }

            function linkHelp_Return(help, input, filter){
                with(document.cscform){
                    var lang = window.opener.document.cscform.__language.value;
                    var param="PRU084.jsp?__helpName="+help+"&__helpReturn="+input+"&__pageCall="+__screen.value+"&__fixCon="+filter+"&__checkVerify=off&__language=" +lang;
                    window.open(param,"Help","left=150,top=150,width=600,height=400,toolbar=no,status=yes,scrollbars=yes,resizable=yes");
                }
            }
        </script>
    </head>
    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif')">
        <form name="cscform" method="post" >
            <input type="hidden" name="__cmd" value="">
            <input type="hidden" name="__language" value ="<%=screen.getUProfile().get("lang")%>">
            <script language="javascript">getInputFormatDate();</script>
            <input type="hidden" name="__calendar">
            <center>
                <table  cellpadding="0"  cellspacing="0">
                    <tr >
                        <td  class="header"> APSR009 Option, <span swlang code="SW000128">Report Option</span>&nbsp;</td>
                    </tr>
                    <tr >
                        <td  colspan="2" align="center">
                            <table  cellpadding="0" cellspacing="0" >
                                <tr>
                                    <td height="12" colspan="2"  class="blankspace"></td>
                                </tr>
                                <tr>
                                    <td colspan="2" class="blankspace"></td>
                                </tr>
                                <tr>
                                    <td width="350" align="right">
                                        <span swlang code="SW000717">Year</span>&nbsp;
                                    </td>
                                    <td width="475" align="left">
                                        <input type="number" name="year" value="<%=car.getYear()%>" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" class="blankspace"></td>
                                </tr>
                                <tr>
                                    <td width="350" align="right">
                                        <span swlang code="SW012559">Period</span>&nbsp;
                                    </td>
                                    <td width="475" align="left">
                                        <label>
                                            <input name="seq" value="1" type="radio"  checked="checked">
                                            รอบที่ 1
                                        </label>
                                        <label>
                                            <input name="seq" value="2" type="radio">
                                            รอบที่ 2
                                        </label>
                                        <label>
                                            <input name="seq" value="3" type="radio">
                                            รอบที่ 3
                                        </label>
                                        <label>
                                            <input name="seq" value="4" type="radio">
                                            รอบที่ 4
                                        </label>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" class="blankspace"></td>
                                </tr>
                                <TR>
                                    <TD colspan="2" align="center">
                                        <img src="../IMAGES/BUTTON/OK.gif" onClick="back()">
                                        &nbsp;&nbsp; <img src="../IMAGES/BUTTON/CANCEL.gif" onClick="window.close()">
                                    </TD>
                                </TR>
                                <tr >
                                    <td colspan="2" class="blankspace"></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr bordercolor="0069B3">
                        <td  class="bottom"></td>
                    </tr>
                </table>
            </center>
            <INPUT TYPE="hidden" NAME="__screen" VALUE="<%=request.getParameter("__screen")%>">
        </form>
    </body>
</html>
