PRU167.jsp 6.75 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="com.csc.library.entry.*,com.csc.library.system.*,com.csc.library.utilities.*,com.csc.library.session.*,com.csc.library.database.*"%>
<jsp:useBean id="PRU167" class="com.csc.library.system.Task" scope="page" />
<jsp:useBean id="CSCQUQUE" class="com.csc.library.system.Task" scope="page" />

<%
	PRU167.setChannel(request ,response);
   	ProcessEntry screen=(ProcessEntry)PRU167.process("ProcessEntry","Process");
   	screen.process();

        CSCQUQUE.setChannel(request, response);
	HelpEntry screenque = (HelpEntry) CSCQUQUE.process("HelpEntry","CSC_QUQUEHELP");

        String tname = "สร้าง Template บัญชีแยกประเภท";
        String ename = "Generate Payroll Journal Voucher Template";

	screenque.getInquiry().setFilter("COMPANYID = '"+screenque.getUProfile().get("companyid")+"' AND TNAME ='"+tname+"' AND ENAME = '"+ename+"'");
        screenque.getInquiry().setOrderBy("start_time DESC");
        screenque.getInquiry().refresh();
%>

<html ng-app="myHR">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="../CSS/TISCO.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 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 language="javascript">getTitleName();</script>
<script language="javascript">

function process() {
	with(document.cscform){
		bCon=confirm("Generate Payroll Journal Voucher Template");
		if (bCon==true)	{
			__cmd .value = "save";
			submit();
		}
	}
}
</script>

</head>
<body leftmargin="0" topmargin="0" >

<div align="center">
<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
<script language="javascript">initToolTips();</script>

<form name="cscform" method="post" action="PRU167.jsp">
	<input type="hidden" name="__cmd" value="">	
	<input type="hidden" name="__screen" value="PRU167"> 
	<input type="hidden" name="__help" value=""> 
	<input type="hidden" name="__companyid" value="<%=screen.getUProfile().get("companyid")%>"> 
	<input type="hidden" name="__notNull" value="">
	<input  type="hidden"name="__fixCon" value="">
	<input type="hidden" name="__referPage" value="">
	<input type="hidden" name="__process" value="">
	<input type="hidden" name="__tname" value="<%=tname%>">
	<input type="hidden" name="__ename" value="<%=ename%>">
	<input type="hidden" name="__ptype" value="">
	<input type="hidden" name="__prclass" value="GeneratePayrollJVTemplate">
	<%=screen.getTagConfirm()%> 
	 <br>
    <table>
      <tr> 
       <td class="header" colspan="2" >PRU167, <span swlang code="SW012723">Generate Payroll Journal Voucher Template</span><!-- <script language="JavaScript">swapLang("Generate Payroll Journal Voucher Template");</script> -->&nbsp;</td>
      </tr>
      <tr> 
        <td> 
           <table  cellspacing="0" cellpadding="0">


             <tr>
               <td  class="buttonline" colspan="7"><div align="center">
                 <button type="button" class="btn btn-primary width100" swlang code="SW013173" onClick="process();">PROCESS</button>
               </div>
               </td>
             </tr>
            <%
                if(screenque.nextRec()){
                    CscCalendar start_time = new CscCalendar(screenque.getDataLabel("START_TIME"));
                    CscCalendar end_time = new CscCalendar(screenque.getDataLabel("END_TIME"));
                    String status = screenque.getDataLabel("PROCESS_STATUS");
                    String showstatus = "";
                    if(status.equalsIgnoreCase("C")){
                        showstatus = "Cancle";
                    } else if(status.equalsIgnoreCase("D")){
                        showstatus = "Delete";
                    } else if(status.equalsIgnoreCase("F")){
                        showstatus = "Finished";
                    } else if(status.equalsIgnoreCase("R")){
                        showstatus = "Running";
                    } else if(status.equalsIgnoreCase("S")){
                        showstatus = "Sleep";
                    } else if(status.equalsIgnoreCase("W") || status.equalsIgnoreCase("T")){
                        showstatus = "Waiting";
                    } else if(status.equalsIgnoreCase("E")){
                        showstatus = "Error";
                    } else if(status.equalsIgnoreCase("K")){
                        showstatus = "Kill process by system";
                    }
            %>
            <tr>
                <td>
                    <table cellpadding="0" cellspacing="0" class="tablewithborder">
                        <tr>
                            <td align="center" class="row3"><%=screenque.getLabel("PARENTID")%></td>
                            <td align="center" class="row3"><span swlang code="SW000306">Start Date</span></td>
                            <td align="center" class="row3"><span swlang code="SW000296">Start Time</span></td>
                            <td align="center" class="row3"><span swlang code="SW000276">End Date</span></td>
                            <td align="center" class="row3"><span swlang code="SW000297">End Time</span></td>
                            <td align="center" class="row3"><%=screenque.getLabel("PROCESS_STATUS")%></td>
                        </tr>
                        <tr>
                            <td align="center"><%=screenque.getDataLabel("PARENTID")%></td>
                            <td align="center"><%=start_time.getDDMMYYYY()%></td>
                            <td align="center"><%=start_time.getHHMMSS()%></td>
                            <td align="center"><%if(!status.equalsIgnoreCase("R"))out.println(end_time.getDDMMYYYY());%></td>
                            <td align="center"><%if(!status.equalsIgnoreCase("R"))out.println(end_time.getHHMMSS());%></td>
                            <td align="center"><%=showstatus%></td>
                        </tr>
                    </table>
                </td>
            </tr>
            <%  } %>
            <tr>
                  <td class="blankspace"></td>
            </tr>
          </table>
        </td>
      </tr>
      <tr > 
         <td class="bottom" >
        </td>
      </tr>
    </table>
<script language="JavaScript">checkConfirm();</script>
</form></div>
</body>
</html>