<%-- 
    Document   : Trnsaction Authorization
    Created on : Aug 3, 2015, 2:23:35 PM
    Author     : Administrator
--%>
<%@page import="DataEntryBean.myWorlistBean"%>
<%@page import="LoginDb.DbHandler"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.util.ArrayList"%>

<html>
    <head>

        <title>Transaction Authorization</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script src="${pageContext.request.contextPath}/js/Calendar.js?pacs=<%=((new java.util.Date()).getTime())%>"></script>
        <link rel="stylesheet" type="text/css" href="/PacsApplication/css/TableCSSCode.css?pacs=<%=((new java.util.Date()).getTime())%>" />
        <link rel="shortcut icon" href="${pageContext.request.contextPath}/img/favicon.ico?pacs=<%=((new java.util.Date()).getTime())%>" type="image/x-icon" />
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" type="text/css" href="/PacsApplication/css/styles.css?pacs=<%=((new java.util.Date()).getTime())%>"/>
        <link rel="stylesheet" type="text/css" href="/PacsApplication/css/ButtonAndText.css?pacs=<%=((new java.util.Date()).getTime())%>" />
        <link rel="stylesheet" type="text/css" href="/PacsApplication/css/info.css?pacs=<%=((new java.util.Date()).getTime())%>" />
        <script type="text/javascript" src="${pageContext.request.contextPath}/jquery-ui-1.10.4.custom/development-bundle/jquery-1.10.2.js?pacs=<%=((new java.util.Date()).getTime())%>"></script>
        <script type="text/javascript" src="/PacsApplication/chromejs/chrome.js?pacs=<%=((new java.util.Date()).getTime())%>"></script>
        <script type="text/javascript" src="/PacsApplication/js/iFrame_killer.js"></script>
        <style>
            .underline_on_hover:hover{
                text-decoration: underline;
                color: teal;
                cursor: pointer;
}
        </style>
    </head>

    <body  onload="noBack()">
        <script type="text/javascript">
            function noBack()
            {
                window.history.forward();
            }

            function tranauthfunction(transactionauthform)
            {
                if (document.getElementById("checkOption").value == ""){

                    alert("You must select option for the authorization.");
                    transactionauthform.checkOption.focus();
                    return false;

                }

                document.forms[0].handle_id.value = "Search";
                document.forms[0].action = '/PacsApplication/TransactionAuthorizationServlet';
                document.forms[0].submit();
            }
            function ShowParent()
            {
                document.forms[0].action = "TransactionAuthorization.jsp";
                document.forms[0].submit();
            }

            function ActOnWorklist(index) {


                if ((document.getElementById('remarks' +index).value == "") || (document.getElementById('remarks' +index).value == null)) {

                    alert("Authorization Remarks is missing.");
                    return false;
                }
                if ((document.getElementById('AuthStatus' +index).value == "") || (document.getElementById('AuthStatus' +index).value == null)) {

                    alert("Please select Authorization Status.");
                    return false;
                }

                $('#'+index).hide(750);

                document.forms[0].handle_id.value = "Authorise";
                document.forms[0].detailId.value = index;
                document.forms[0].action = '/PacsApplication/TransactionAuthorizationServlet';
                document.forms[0].submit();

            }

            function ViewDetails(index){

                document.forms[0].handle_id.value = "ViewDetails";
                document.forms[0].detailId.value = index;
                document.forms[0].action = '/PacsApplication/ReadOnlyServlet';
                document.forms[0].submit();

            }

            function checkop(){

                if (document.getElementById("checkOption").value == ""){

                    document.getElementById("transactiontype").disabled=true;
                }

                else if (document.getElementById("checkOption").value == "TXN"){

                    document.getElementById("transactiontype").disabled=false;

                }

                else if (document.getElementById("checkOption").value == "ACC"){

                    document.getElementById("transactiontype").disabled=true;

                }
            }

            function popup_Details(width, height, index, lov) {
                if (window.innerWidth) {
                    LeftPosition = (window.innerWidth - width) / 2;
                    TopPosition = ((window.innerHeight - height) / 2) - 20;
                }
                else {
                    LeftPosition = (parseInt(window.screen.width) - width) / 2;
                    TopPosition = ((parseInt(window.screen.height) - height) / 2) - 20;
                }
                attr = 'resizable=yes,scrollbars=yes,width=' + width + ',height=' +
                    height + ',screenX=300,screenY=200,left=' + LeftPosition + ',top=' +
                    TopPosition + '';
                var screenName = "TransactionAuthorization.jsp";
                //var cust_no = document.getElementById("cust_no"+index).value;
               // var account_no = document.getElementById("account_no"+index).value;
                if($('#account_no2'+index).length > 0)
                  //  var account_no2 = document.getElementById("account_no2"+index).value;
                if($('#tranInd'+index).length > 0)
                   // var tranInd = document.getElementById("tranInd"+index).value;
                var  lovKey=lov;
                if(lov == "custDetails")
                    popWin = open('${pageContext.request.contextPath}/CommonSearchInformationLOV.jsp?cust_no=' + cust_no + '&screenName=' + screenName+'&lovKey='+lovKey, 'GetDetails', attr);
                else if(lov == "accDetails1")
                    popWin = open('${pageContext.request.contextPath}/CommonSearchInformationLOV.jsp?account_no=' + account_no + '&tranInd=' + tranInd + '&screenName=' + screenName+'&lovKey='+lovKey, 'GetDetails', attr);
                else if(lov == "accDetails2")
                    popWin = open('${pageContext.request.contextPath}/CommonSearchInformationLOV.jsp?account_no2=' + account_no2 + '&tranInd=' + tranInd + '&screenName=' + screenName+'&lovKey='+lovKey, 'GetDetails', attr);
                popWin.focus();

            }
            
            // to restrict back button
            history.pushState(null, null, location.href);
            window.addEventListener('popstate', function(event) {
                history.pushState(null, null, location.href);
            });

        </script>
        <script>

            function downloadFiles() {

                if (document.forms[0].cbs_ref_no.value == "" )
                {
                    alert("CBS Ref Number cannot be empty.");

                    return false;
                }

                document.forms[0].reportPath.value = "/Reports/Journal_vouchar";
                document.forms[0].reportName.value = "Journal_vouchar";
                document.forms[0].DOWNLOAD.value = "P";

                document.forms[0].action = '/PacsApplication/ExcelReportServlet';
                document.forms[0].submit();

            }

        </script>



        <%
                    String displayFlag = "";
                    Object display = request.getAttribute("displayFlag");
                    if (display != null) {
                        displayFlag = display.toString();
                    }
        %>

        <%
                    String ModuleName = new String();

                    ModuleName = (String) session.getAttribute("moduleName");
        %>

        <% if (ModuleName.equalsIgnoreCase("KCC")) {%>
        <jsp:include page="MenuHead.jsp" flush="true" />
        <%} else if (ModuleName.equalsIgnoreCase("Deposit")) {%>
        <jsp:include page="/Deposit/MenuHead_Deposit.jsp" flush="true" />
        <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%>
        <jsp:include page="/Loan/MenuHead_Loan.jsp" flush="true" />
        <%} else if (ModuleName.equalsIgnoreCase("Share")) {%>
        <jsp:include page="/Share_Module/MenuHead_Share.jsp" flush="true" />
        <%}else if (ModuleName.equalsIgnoreCase("SpecialBothKcc") || ModuleName.equalsIgnoreCase("SpecialKcc")) {%>
        <jsp:include page="/MenuHead.jsp" flush="true" />
        <%}else if (ModuleName.equalsIgnoreCase("SpecialBothDep")) {%>
        <jsp:include page="/Deposit/MenuHead_Deposit.jsp" flush="true" />
        <%}else if (ModuleName.equalsIgnoreCase("SpecialBoth")) {%>
        <jsp:include page="/Deposit/MenuHead_Deposit.jsp" flush="true" />
        <%}else if (ModuleName.equalsIgnoreCase("Special")) {%>
        <jsp:include page="/Deposit/MenuHead_Deposit.jsp" flush="true" />
        <%}%>
        <br>
        <%!
            String blankNull(String s) {
                return (s == null) ? "" : s;
            }

            String blankCash(String s) {
                return (s == null) ? "CASH" : s;
            }
        %>

        <%
                    String error_msg = "";
                    Object error = request.getAttribute("message");
                    if (error != null) {
                        error_msg = error.toString();
                    }

                    String showButton = "";
                    Object err = request.getAttribute("showButton");
                    if (err != null) {
                        showButton = err.toString();
                    }

                    String auth_id = (String) session.getAttribute("user");
        %>

        <%
                    Object almyWorlistBeanObj = request.getAttribute("almyWorlistBean");
                    ArrayList<myWorlistBean> almyWorlistBean = new ArrayList<myWorlistBean>();
                    if (almyWorlistBeanObj != null) {
                        almyWorlistBean = (ArrayList<myWorlistBean>) request.getAttribute("almyWorlistBean");
                    }
        %>
        <%
                    Object myWorlistBeanObj = request.getAttribute("myWorlistBeanObj");
                    myWorlistBean omyWorlistBean = new myWorlistBean();

                    if (myWorlistBeanObj != null) {
                        omyWorlistBean = (myWorlistBean) request.getAttribute("myWorlistBeanObj");

                    }
        %>

        <fieldset style="border-color: black; background-image: url('/PacsApplication/img/download.jpg'); border-width: 3px">
            <legend style="padding: 8px; border-radius: 20px; background-color: #006600; color: white">Transaction Authorization</legend>
            <form id="transactionauthform" name="transactionauthform" method="post" action=""> 


                <%if (!error_msg.equalsIgnoreCase("")) {%>
                <center><div class="info" id="errorMessage"><center><%= error_msg%></center></div>
                    <%if(showButton.equalsIgnoreCase("Y")) {%>
                    <center><input type="button" Value="Print Voucher" onclick="javascript:downloadFiles();"></center>

                    <input type="hidden" name="reportPath" value=""/>
                    <input type="hidden" name="reportName" value=""/>
                    <input type="hidden" name="DOWNLOAD" value=""/>
                    <input type="hidden" name="cbs_ref_no" value="<%=(error_msg.split("#")[1]).trim()%>"/>
                    <input type="hidden" name="auth_id" value="<%=auth_id%>"/>
                    <%}%>
                </center>
                <% }%>
                <br>
                <br>
                <center>
                    <lable style=" font-family: Berlin Sans FB; font-weight:  normal;">Authorization For<font color="red" >*</font>:</lable>
                    <select id="checkOption" onchange="checkop()" name="checkOption">
                        <option value=""> --Select-- </option>

                        <%Connection connection = null;
                                    ResultSet rs = null;
                                    Statement statement = null;
                                    connection = DbHandler.getDBConnection();
                                    try {
                                        statement = connection.createStatement();
                                        rs = statement.executeQuery("select t.authorization_code,t.authorization_type from ipks_authorization_mst t where authorization_code='" + omyWorlistBean.getCheckOption() + "'");
                        %>
                        <% if (omyWorlistBean.getCheckOption() != null || !(blankNull(omyWorlistBean.getCheckOption()).equalsIgnoreCase(""))) {%>
                        <option value="<%=omyWorlistBean.getCheckOption()%>" selected ><%while (rs.next()) {%>
                            <%=rs.getString(2)%>
                            <%}%></option> <%}%>
                            <%
                                           // statement.close();
                                           // connection.close();
                                        } catch (Exception e) {
                System.out.println("Error occurred during processing.");
            } finally {
                try {
                    if(statement !=null)
                        statement.close();
                    if (connection != null)
                    connection.close();

            } catch (Exception e) {               
               System.out.println("Error Occurred during connection close.");
            }

            }
                            %>
 
                        <%
                                    connection = DbHandler.getDBConnection();
                                    try {
                                        statement = connection.createStatement();
                                        rs = statement.executeQuery("select t.authorization_code,t.authorization_type from ipks_authorization_mst t where authorization_code<>'" + omyWorlistBean.getCheckOption() + "'");
                                        while (rs.next()) {%>
                        <option value="<%=rs.getString(1)%>"><%=rs.getString(2)%></option>
                        <%}
                                       // statement.close();
                                       // connection.close();
                                    } catch (Exception e) {
                System.out.println("Error occurred during processing.");
            } finally {
                try {
                    if(statement !=null)
                        statement.close();
                    if (connection != null)
                    connection.close();

            } catch (Exception e) {               
               System.out.println("Error Occurred during connection close.");
            }

            }
                        %>
                    </select>
                </center>
                <br>
                <br>
                <div id="filterDiv" >
                    <center>
                        <table>

                            <tr>
                                <td>Transaction Ref. Number: </td>
                                <td><input type="text" name="refno" id="refno" value="<%=blankNull(omyWorlistBean.getRefno())%>" style="text-align:right;" onkeypress='return event.charCode >= 48 && event.charCode <= 57' /></td>
                                <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                                <td style="text-align: right" >Transaction Type: </td>
                                <td><select id="transactiontype" name="transactiontype" disabled >
                                        <option value="" disabled selected style="display:none;" <%if (blankNull(omyWorlistBean.getTransactiontype()).equals("")) {%> selected <%}%>>--Select--</option>
                                        <option value="DR" <%if (blankNull(omyWorlistBean.getTransactiontype()).equals("DR")) {%> selected <%}%>>Debit</option>
                                        <option value="CR" <%if (blankNull(omyWorlistBean.getTransactiontype()).equals("CR")) {%> selected <%}%>>Credit</option>

                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td><br></td>
                            </tr>
                            <tr style="display:none">
                                <td>From Date: </td>
                                <td><input value="<%=blankNull(omyWorlistBean.getFromDate())%>" type="text" id="fromDate" style="text-align:center;" name="fromDate" readonly /> <a href="#" onclick="return getCalendar(document.forms[0].fromDate);"><img src="${pageContext.request.contextPath}/img/calendar.jpg" name="imgr" border="0" width="25" height="20" /></a></td>
                                <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                                <td style="text-align: right">To Date: </td>
                                <td><input value="<%=blankNull(omyWorlistBean.getToDate())%>" type="text" id="toDate" style="text-align:center;" name="toDate" readonly /> <a href="#" onclick="return getCalendar(document.forms[0].toDate);"><img src="${pageContext.request.contextPath}/img/calendar.jpg" name="imgr" border="0" width="25" height="20" /></a></td>
                            </tr>

                        </table>
                        <br><br>

                        <input type="button" value="Submit" onclick="javascript:tranauthfunction(transactionauthform)">
                        <input type="button" value="Reset" name="reset" onclick="ShowParent();" />
                    </center>
                </div><br><br>

                <input name="handle_id" id="handle_id" type="hidden" value="" />
                <input name="detailId" id="detailId" type="hidden" value="" />

                <%if (displayFlag.equalsIgnoreCase("Y")) {%>
                <center>
                    <div id="displayDiv" >

                        <% if (omyWorlistBean.getCheckOption().equalsIgnoreCase("TXN")) {%>
                        <div style="width:930px;overflow: scroll;">
                            <table border="2" width="auto" cellspacing="1" cellpadding="1" style="text-align: center ;overflow-y: scroll; font-size: 15px">
                                <thead class="CSSTableGenerator">
                                    <tr>
                                        <td>Reference No</td>
                                        <td>Account No1</td>
                                        <td>Name</td>                                        
                                        <td>Account No2</td>
                                        <% if (ModuleName.equalsIgnoreCase("Loan")) {%>
                                        <td>Sanctioned Amount</td>
                                        <%} else {%>
                                        <td>Account Balance</td>
                                        <%}%>
                                        <td>Transaction Type</td>
                                        <td>Transaction Date</td>
                                        <td>Amount</td>
                                        <% if (ModuleName.equalsIgnoreCase("Loan") || ModuleName.equalsIgnoreCase("KCC") ) {%>
                                        <td>Principal Repayment</td>
                                        <td>Interest Repayment</td>
                                        <%}%>
                                        <td>Charges</td>
                                        <td>Initiator ID</td>
                                        <td>Remarks</td>
                                        <td>Status</td>
                                        <td>Act On Worklist</td>

                                    </tr>
                                </thead>
                                <tbody style="background-color: white; font-size: 15px">
                                    <%
                                         omyWorlistBean = null;
                                         int i;
                                         for (i = 0; i < almyWorlistBean.size(); i++) {
                                             omyWorlistBean = almyWorlistBean.get(i);
                                    %>

                                    <tr id="<%=i%>">
                                        <td><input style="border: none" size="20" type="text" readonly name="refno<%=i%>" id="refno<%=i%>" value="<%=blankNull(omyWorlistBean.getRefnoSearch())%>" /></td>
                                        <td><input class="underline_on_hover" style="border: none" size="20" type="text" readonly name="account_no<%=i%>" id="account_no<%=i%>" value="<%=blankNull(omyWorlistBean.getAccount_no())%>" onclick="javascript:popup_Details(900,250,<%=i%>,'accDetails1');" /><input style="border: none" size="20" type="hidden" name="tranInd<%=i%>" id="tranInd<%=i%>" value="<%=blankNull(omyWorlistBean.getTran_ind())%>" /></td>
                                        <td><input class="underline_on_hover" style="border: none" size="20" type="text" readonly name="cust_name<%=i%>" id="cust_name<%=i%>" value="<%=blankNull(omyWorlistBean.getCust_name())%>" onclick="javascript:popup_Details(700,250,<%=i%>,'custDetails');" /><input style="border: none" size="20" type="hidden" name="cust_no<%=i%>" id="cust_no<%=i%>" value="<%=blankNull(omyWorlistBean.getCust_no())%>" /></td>
                                        
                                        <td><input class="underline_on_hover" style="border: none" size="35" type="text" readonly name="account_no2<%=i%>" id="account_no2<%=i%>" value="<%=blankCash(omyWorlistBean.getAccount_no2())%>" onclick="javascript:popup_Details(900,250,<%=i%>,'accDetails2');" /></td>

                                        <td><input style="border: none" size="20" type="text" readonly name="account_bal<%=i%>" id="account_bal<%=i%>" value="<%=blankNull(omyWorlistBean.getAccount_bal())%>" /></td>
                                        <td><input style="border: none" size="20" type="text" readonly name="transactiontype<%=i%>" id="transactiontype<%=i%>" value="<%=blankNull(omyWorlistBean.getTransactiontypeSearch())%>" /></td>
                                        <td><input style="border: none" size="10" type="text" readonly name="txn_date<%=i%>" id="txn_date<%=i%>" value="<%=blankNull(omyWorlistBean.getTxn_date())%>" /></td>
                                        <td><input style="border: none" size="10" type="text" readonly name="txn_amount<%=i%>" id="txn_amount<%=i%>" value="<%=blankNull(omyWorlistBean.getTxn_amount())%>" /></td>
                                        <% if ( ModuleName.equalsIgnoreCase("Loan") || ModuleName.equalsIgnoreCase("KCC")   ) {%>
                                            <td><input style="border: none" size="10" type="text" readonly name="prinrepayamt<%=i%>" id="prinrepayamt<%=i%>" value="<%=blankNull(omyWorlistBean.getPrinrepayamt())%>" /></td>
                                            <td><input style="border: none" size="10" type="text" readonly name="inttrepayamt<%=i%>" id="inttrepayamt<%=i%>" value="<%=blankNull(omyWorlistBean.getInttrepayamt())%>" /></td>
                                        <%}%>
                                        <td><input style="border: none" size="10" type="text" readonly name="chargeToDeduct<%=i%>" id="chargeToDeduct<%=i%>" value="<%=blankNull(omyWorlistBean.getChargeToDeduct())%>" /></td>
                                        <td><input style="border: none" size="10" type="text" readonly name="intitiator<%=i%>" id="intitiator<%=i%>" value="<%=blankNull(omyWorlistBean.getIntitiator())%>" /></td>
                                        <td><input style="border: none;height: 100%"  type="text" name="remarks<%=i%>" id="remarks<%=i%>" value="" /></td>
                                        <td><select style="border: none;width: 100%" id="AuthStatus<%=i%>" name="AuthStatus<%=i%>" >
                                                <option value="">--Select--</option>
                                                <option value="A">Approve</option>
                                                <option value="R">Reject</option>
                                            </select>
                                        </td>
                                        <td><input style="border: none; margin-left: 80px;margin-right:0px;"  type="button" value="Authorise" onclick="ActOnWorklist(<%=i%>);this.disabled=true;" /></td>
                                    </tr>
                                    <%}%>
                                </tbody>
                            </table>
                        </div>
                        <%} else if (omyWorlistBean.getCheckOption().equalsIgnoreCase("TTP")) {%>
                        <div style="width:930px;overflow: auto;">
                            <table border="2" width="auto" cellspacing="1" cellpadding="1" style="text-align: center ;overflow-y: scroll; font-size: 15px">
                                <thead class="CSSTableGenerator">
                                    <tr>
                                        <td>Reference No</td>
                                        <td>Account No1</td>
                                        <td>Customer Name</td>
                                        <td>Account No2</td>
                                        <td>Account Balance</td>
                                        <td>Transaction Type</td>
                                        <td>Transaction Date</td>
                                        <td>Amount</td>
                                        <% if( ModuleName.equalsIgnoreCase("KCC") ) {%>
                                        <td>Principal Repayment</td>
                                        <td>Interest Repayment</td>
                                        <%}%>
                                        <td>Charges</td>
                                        <td>Initiator ID</td>
                                        <td>Remarks</td>
                                        <td>Status</td>
                                        <td>Act On Worklist</td>

                                    </tr>
                                </thead>
                                <tbody style="background-color: white; font-size: 15px">
                                    <%
                                         omyWorlistBean = null;
                                         int i;
                                         for (i = 0; i < almyWorlistBean.size(); i++) {
                                             omyWorlistBean = almyWorlistBean.get(i);
                                    %>

                                    <tr id="<%=i%>">
                                        <td><input style="border: none" size="20" type="text" readonly name="refno<%=i%>" id="refno<%=i%>" value="<%=blankNull(omyWorlistBean.getRefnoSearch())%>" /></td>
                                        <td><input class="underline_on_hover" style="border: none" size="20" type="text" readonly name="account_no<%=i%>" id="account_no<%=i%>" value="<%=blankNull(omyWorlistBean.getAccount_no())%>" onclick="javascript:popup_Details(900,250,<%=i%>,'accDetails1');" /><input style="border: none" size="20" type="hidden" name="tranInd<%=i%>" id="tranInd<%=i%>" value="<%=blankNull(omyWorlistBean.getTran_ind())%>" /></td>
                                        <td><input class="underline_on_hover" style="border: none" size="20" type="text" readonly name="cust_name<%=i%>" id="cust_name<%=i%>" value="<%=blankNull(omyWorlistBean.getCust_name())%>" onclick="javascript:popup_Details(700,250,<%=i%>,'custDetails');" /><input style="border: none" size="20" type="hidden" name="cust_no<%=i%>" id="cust_no<%=i%>" value="<%=blankNull(omyWorlistBean.getCust_no())%>" /></td>
                                        
                                        <td><input class="underline_on_hover" style="border: none" size="35" type="text" readonly name="account_no2<%=i%>" id="account_no2<%=i%>" value="<%=blankNull(omyWorlistBean.getAccount_no2())%>" onclick="javascript:popup_Details(900,250,<%=i%>,'accDetails2');" /></td>
                                        <td><input style="border: none" size="20" type="text" readonly name="account_bal<%=i%>" id="account_bal<%=i%>" value="<%=blankNull(omyWorlistBean.getAccount_bal())%>" /></td>
                                        <td><input style="border: none" size="25" type="text" readonly name="transactiontype<%=i%>" id="transactiontype<%=i%>" value="<%=blankNull(omyWorlistBean.getTransactiontypeSearch())%>" /><input style="border: none" size="15" type="hidden" readonly name="tranInd<%=i%>" id="tranInd<%=i%>" value="<%=blankNull(omyWorlistBean.getTran_ind())%>" /></td>
                                        <td><input style="border: none" size="10" type="text" readonly name="txn_date<%=i%>" id="txn_date<%=i%>" value="<%=blankNull(omyWorlistBean.getTxn_date())%>" /></td>
                                        <td><input style="border: none" size="10" type="text" readonly name="txn_amount<%=i%>" id="txn_amount<%=i%>" value="<%=blankNull(omyWorlistBean.getTxn_amount())%>" /></td>
                                        <% if ( ModuleName.equalsIgnoreCase("KCC")   ) {%>
                                            <td><input  style="border: none" size="10" type="text" readonly name="prinrepayamt<%=i%>" id="prinrepayamt<%=i%>" value="<%=blankNull(omyWorlistBean.getPrinrepayamt())%>" /></td>
                                            <td><input style="border: none" size="10" type="text" readonly name="inttrepayamt<%=i%>" id="inttrepayamt<%=i%>" value="<%=blankNull(omyWorlistBean.getInttrepayamt())%>" /></td>
                                        <%}%>
                                        <td><input style="border: none" size="10" type="text" readonly name="chargeToDeduct<%=i%>" id="chargeToDeduct<%=i%>" value="<%=blankNull(omyWorlistBean.getChargeToDeduct())%>" /></td>
                                        <td><input style="border: none" size="10" type="text" readonly name="intitiator<%=i%>" id="intitiator<%=i%>" value="<%=blankNull(omyWorlistBean.getIntitiator())%>" /></td>
                                        <td><input style="border: none;height: 100%"  type="text" name="remarks<%=i%>" id="remarks<%=i%>" value="" /></td>
                                        <td><select style="border: none;width: 100%" id="AuthStatus<%=i%>" name="AuthStatus<%=i%>" >
                                                <option value="">--Select--</option>
                                                <option value="A">Approve</option>
                                                <option value="R">Reject</option>
                                            </select>
                                        </td>

                                        <td><input style="border: none; margin-left: 80px;margin-right:0px;"  type="button" value="Authorise" onclick="ActOnWorklist(<%=i%>);" /></td>
                                    </tr>
                                    <%}%>
                                </tbody>
                            </table>
                        </div>
                        <%} else if (omyWorlistBean.getCheckOption().equalsIgnoreCase("ACC")
                                 || omyWorlistBean.getCheckOption().equalsIgnoreCase("LACC") || omyWorlistBean.getCheckOption().equalsIgnoreCase("KCC")) {%>

                        <table border="2" width="auto" cellspacing="1" cellpadding="1" style="text-align: center ;overflow-y: scroll; font-size: 15px">
                            <thead class="CSSTableGenerator">
                                <tr>
                                    <td>Reference No.</td>
                                    <td>Transaction Type</td>
                                    <td>Transaction Date</td>
                                    <td>Initiator ID</td>
                                    <td>Act On Worklist</td>

                                </tr>
                            </thead>
                            <tbody style="background-color: white; font-size: 15px">
                                <%
                                     omyWorlistBean = null;
                                     int i;
                                     for (i = 0; i < almyWorlistBean.size(); i++) {
                                         omyWorlistBean = almyWorlistBean.get(i);
                                %>
                                <tr>
                                    <td><input style="border: none" size="20" type="text" readonly name="refno<%=i%>" id="refno<%=i%>" value="<%=blankNull(omyWorlistBean.getRefnoSearch())%>" /></td>
                                    <td><input style="border: none" size="30" type="text" readonly name="transactiontype<%=i%>" id="transactiontype<%=i%>" value="<%=blankNull(omyWorlistBean.getTransactiontypeSearch())%>" /></td>
                                    <td><input style="text-align:center;" style="border: none" size="20" type="text" readonly name="txn_date<%=i%>" id="txn_date<%=i%>" value="<%=blankNull(omyWorlistBean.getTxn_date())%>" /></td>
                                    <td><input style="border: none" size="10" type="text" readonly name="intitiator<%=i%>" id="intitiator<%=i%>" value="<%=blankNull(omyWorlistBean.getIntitiator())%>" /></td>
                                    <td><input style="border: none; margin-left: 80px;margin-right:0px;"  type="button" value="View Details" onclick="ViewDetails(<%=i%>);" /></td>
                                </tr>
                                <%}%>
                            </tbody>
                        </table>

                        <%}%>
                        <br><br>

                    </div>
                </center>
                <%}%>
            </form>
        </fieldset>

    </body>
</html>
