<%--
    Document   : NEFT_RTGS
    Created on : May 19, 2017, 5:56:39 PM
    Author     : 981898
    updated on : Jan 31,2024
    Author     : 1121947
--%>
<%@page import="com.itextpdf.text.Document"%>
<%@page import="DataEntryBean.NeftRtgsEnquiryBean"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.util.Date"%>
<%@page import="LoginDb.DbHandler"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.text.DateFormat"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Date"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@page import="java.util.UUID" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">


<%String uuid = UUID.randomUUID().toString();%>
<% try {
%>
<html>
    <head>
        <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>
        <title>NEFT/RTGS Initiation</title>
        <link rel="shortcut icon" href="${pageContext.request.contextPath}/img/favicon.ico" type="image/x-icon" />
        <link rel="stylesheet" type="text/css" href="/PacsApplication/css/TableCSSCode.css" />
        <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>

            .dialog{
                border:5px solid #666;
                padding:10px;
                background:#FFFFFF;
                position:absolute;
                left: 175px;
                top: 220px;
                z-index:1;
                display:none;
            }
            .dialog label{
                display:inline-block;
                color:#151414;
            }
            div .dialog input[type=text]{
                border:1px solid #333;
                display:inline-block;
                margin:5px;
                width: 180px;
            }

        </style>

    </head>

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

            function ShowParent()
            {
                document.forms[0].action="${pageContext.request.contextPath}/NeftRtgsInitiation.jsp";
                document.forms[0].submit();
            }

            function checkForm2(NeftRtgsInitiationForm){

                if(document.getElementById("txnFromDate").value== "")
                {
                    alert("Transaction From Date cannot remain blank.");
                    NeftRtgsInitiationForm.txnFromDate.focus();
                    return false;
                }
                if(document.getElementById("txnDate").value== "")
                {
                    alert("Transaction To Date cannot remain blank.");
                    NeftRtgsInitiationForm.txnDate.focus();
                    return false;
                }
                return true;
            }

            function checkForm(NeftRtgsInitiation){
                //var repayAmt = parseFloat(Math.abs(RepayLoan.repayAmt.value)).toFixed(2);
                //var resTXNAmt = parseFloat(Math.abs(RpayLoan.resTXNAmt.value)).toFixed(2);

                    if(document.getElementById("accNo").value== "")
                    {
                        alert("Account Number cannot remain empty.");
                        NeftRtgsInitiationForm.accNo.focus();
                        return false;
                    }
                    else if(document.getElementById("destAccNoVal").value== "")
                    {
                         alert("Beneficiary Account Number cannot remain empty.");
                         NeftRtgsInitiationForm.destAccNoVal.focus();
                         return false;
                    }
                    else if(document.getElementById("destBankNameVal").value== "")
                    {
                         alert("Beneficiary Bank Name cannot remain empty.");
                         NeftRtgsInitiationForm.destBankNameVal.focus();
                         return false;
                    }
                    else if(document.getElementById("destBranchVal").value== "")
                    {
                         alert("Beneficiary Branch Name cannot remain empty.");
                         NeftRtgsInitiationForm.destBranchVal.focus();
                         return false;
                    }
                    else if(document.getElementById("ifscNoVal").value== "")
                    {
                         alert("IFSC Code cannot remain empty.");
                         NeftRtgsInitiationForm.ifscNoVal.focus();
                         return false;
                    }
                    else if(document.getElementById("transAmtVal").value== "")
                    {
                         alert("Transaction Amount cannot remain empty.");
                         NeftRtgsInitiationForm.transAmtVal.focus();
                         return false;
                    }
                     else if(document.getElementById("bankOption").value== "")
                    {
                         alert("Please select the bank option");
                         NeftRtgsInitiationForm.bankOption.focus();
                         return false;
                    }else if(document.getElementById("transAmtVal").value== "0")
                    {
                         alert("Transaction Amount cannot zero.");
                         NeftRtgsInitiationForm.transAmtVal.focus();
                         return false;
                    }
               //alert("IN");
                return true;

            }

            function popup_LonAcc(width, height, loanAcc, repayType) {
                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 = "RepayLoan.jsp";
                var  lovKey="LoanAcctSearch"
                popWin = open('${pageContext.request.contextPath}/CommonSearchInformationLoanLOV.jsp?repayType=' + repayType + '&loanAcc=' + loanAcc + '&screenName=' + screenName+'&lovKey='+lovKey, 'LoanAcctSearch', attr);
                popWin.focus();

            }

            function popup_TransferAcc(width, height, loanAcc) {
                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 = "RepayLoan.jsp";
                var  lovKey="transferAccSrch"
                popWin = open('${pageContext.request.contextPath}/CommonSearchInformationLoanLOV.jsp?loanAcc=' + loanAcc + '&screenName=' + screenName+'&lovKey='+lovKey, 'LoanAcctSearch', attr);
                popWin.focus();

            }

            function popup_glAcc(width, height, glAcc) {
                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 = "RepayLoan.jsp";
                var  lovKey="glAccSrch"
                popWin = open('${pageContext.request.contextPath}/CommonSearchInformationLoanLOV.jsp?glAcc=' + glAcc + '&screenName=' + screenName+'&lovKey='+lovKey, 'glAcctSearch', attr);
                popWin.focus();

            }

            function popup_accNo(width, height, accNo) {
                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 = "NeftRtgsInitiation.jsp";
                var lovKey="accNoSrch";
                popWin = open('${pageContext.request.contextPath}/CommonSearchInformationLOV.jsp?accNo=' + accNo + '&screenName=' + screenName+'&lovKey='+lovKey, 'accNoSearch', attr);
                popWin.focus();
                
            }
           
// This function implements for image and signature
            function img_sig(accNo){
                alert(accNo);
               
            // var Signature = document.NeftRtgsInitiationForm.            
            searchString1 = request.getParameter("accNo");
            headerQry = "select kd.photo_path,kd.sig_photo from dep_account d,dep_product dp, kyc_hdr kd,pacs_master pm where d.customer_no = kd.cif_no  and d.pacs_id=pm.pacs_id and dp.id=d.dep_prod_id and dp.prod_code='1101' and substr(dp.int_cat,1,1)='1' and substr(d.GL_CLASS_CODE,9,2)='14' and d.curr_status='O' and trim(d.link_accno) is not null and "
                         + "(d.key_1 like  '%" + searchString1.replace(' ', '%') + "%' or d.link_accno like  '%" + searchString1.replace(' ', '%') + "%' ) and d.pacs_id = '" + pacsId.replace(' ', '%') + "' ";
                 
            alert("headerQry" +headerQry); 
            alert("Bingo:");
       
            }
            

            function popup_newCifNo(width, height, newCifNo,oldCifNo) {
                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 = "AccountAmendment.jsp";
                var  lovKey="newCifNoSrch";

                popWin = open('${pageContext.request.contextPath}/CommonSearchInformationLOV.jsp?newCifNo=' + newCifNo + '&oldCifNo=' + oldCifNo + '&screenName=' + screenName+'&lovKey='+lovKey, 'newCifNoSearch', attr);
                popWin.focus();

            }


               function popup_ifscNo(width, height, ifscNo) {
                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 = "NeftRtgsInitiation.jsp";
                var  lovKey="ifscNoSrch";

                popWin = open('${pageContext.request.contextPath}/CommonSearchInformationLOV.jsp?ifscNo=' + ifscNo + '&screenName=' + screenName+'&lovKey='+lovKey, 'ifscNoSearch', attr);
                popWin.focus();

            }


            function popup_custName1(width, height, custName1,oldCifNo) {
                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 = "AccountAmendment.jsp";
                var  lovKey="custName1Srch";
                popWin = open('${pageContext.request.contextPath}/CommonSearchInformationLOV.jsp?custName1=' + custName1+ '&oldCifNo=' + oldCifNo + '&screenName=' + screenName+'&lovKey='+lovKey, 'custName1Search', attr);
                popWin.focus();

            }

            function popup_newTransferAccNo(width, height, newTransferAccNo,oldCifNo) {
                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 = "AccountAmendment.jsp";
                var  lovKey="newTransferAccNoSrch";
                popWin = open('${pageContext.request.contextPath}/CommonSearchInformationLOV.jsp?newTransferAccNo=' + newTransferAccNo + '&oldCifNo=' + oldCifNo + '&screenName=' + screenName+'&lovKey='+lovKey, 'newTransferAccNoSearch', attr);
                popWin.focus();

            }

            function submitform(NeftRtgsInitiationForm)
            {
                    if(checkForm(NeftRtgsInitiationForm))
                        {
                           var retval=confirm("Once posted,Transaction can't be rolled back.Do you wish to continue?");

                           if(retval==true)
                               {
                                    document.forms[0].handle_id.value = "Transfer";
                                    document.forms[0].submit();
                                }
                        }
            }

            function submitform2(NeftRtgsInitiationForm)
            {
                    if(checkForm2(NeftRtgsInitiationForm))
                        {
                            document.forms[0].handle_id.value='Details';
                            document.forms[0].submit();

                        }
            }

            function isNumberKey(event)
            {
                //alert(event.keyCode);
                var charCode = event.keyCode;
                if((charCode == 8)||(charCode==110))
                    {
                        return true;
                    }
                else if (((charCode > 57)&&(charCode<96)) || (charCode>105))
                    {
                        return false;
                    }
                //$( "#btnReset" ).click();
                /*if(document.getElementById("repayType").value == "C" && document.getElementById("intAdjAmt").value != "")
                    calcAmt();*/
                //checkVal();
                return true;
            }
            function isCharacterKey(event)
            {
                var charCode = event.keyCode;

                if ((charCode >= 65 && charCode<=90) || (charCode >= 97 && charCode<=122))
                    return true;
                //$( "#btnReset" ).click();
                /*if(document.getElementById("repayType").value == "C" && document.getElementById("intAdjAmt").value != "")
                    calcAmt();*/
                return false;
            }
            function checkAmt(){
                if(document.getElementById("repayType").value == "C" && document.getElementById("intAdjAmt").value != "")
                    calcAmt();
                else if(document.getElementById("repayType").value == "C" && document.getElementById("intAdjAmt").value == "")
                    document.getElementById("repayAmt").value = $("#closeAmt").val();
            }

            function calcAmt() {
                var closeAmt = parseFloat($("#closeAmt").val());
                //var txnamt = parseFloat($("#txnamt").val());
                //var tranType = $("#tranType").val();
                var intAdjAmt = parseFloat($("#intAdjAmt").val());
                var net = parseFloat(0);

                net = closeAmt - intAdjAmt;
                document.getElementById("repayAmt").value = net;
            }

            function show(obj)
            {
                    var selectBox = obj;
                    var selected = selectBox.options[selectBox.selectedIndex].value;
                    var tr1 = document.getElementById("tr1");
                    var tr2 = document.getElementById("tr2");
                    var tr3 = document.getElementById("tr3");
                    var sel=document.getElementById("select");

                    document.getElementById("newCifNo").value="";
                    document.getElementById("custName1").value="";
                    document.getElementById("newTransferAccNo").value="";
                    if(selected=='c')
                        {
                            tr1.style.display="table-row"
                            tr2.style.display="table-row";
                            tr3.style.display="none";
                            sel.disabled=true;
                        }

                    else if(selected=='a')
                        {
                            tr1.style.display="none";
                            tr2.style.display="none";
                            tr3.style.display="table-row";
                            sel.disabled=true;
                        }
            }

            function showTable()
            {
                var sel=document.getElementById("checkOption");

                if(sel.value=="newTxn")
                    {
                        document.getElementById("tblAccNo").style.display="table";
                        document.getElementById("txnDetailsTbl").style.display="none";
                        document.getElementById("Search").style.display="none";
                        document.getElementById("Submit").style.display="block";
                        //document.getElementById("srcAccNo").value="";
                        //document.getElementById("destAccNo2").value="";
                        //document.getElementById("ifscNoVal2").value="";
                        //document.getElementById("refNo").value="";
                        document.getElementById("downloadBtn").style.display="none";
                        document.getElementById("displayDiv").style.display="none";
                        //document.getElementById("detailsTbl").style.display="table";

                    }
                else if(sel.value=="txnDtl")
                    {
                        document.getElementById("txnDetailsTbl").style.display="table";
                        document.getElementById("tblAccNo").style.display="none";
                        document.getElementById("Submit").style.display="none";
                        document.getElementById("Search").style.display="block";
                        document.getElementById("displayDiv").style.display="block";
                        document.getElementById("downloadBtn").style.display="block";
                        //document.getElementById("accNo").value="";
                    }
            }
            function checkVal()
            {
                alert("IN3");
                var tbl=document.getElementById("detailsTbl");
                if (document.getElementById("accNo").value=="")
                    {
                        tbl.style.display="none";
                        alert("IN2");
                    }
                else
                    {
                            tbl.style.display="table";
                            alert("IN");
                    }

                    return true;
            }

            function popup_accNo2(width, height, accNo) {
                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 = "NeftRtgsInitiation.jsp";
                var  lovKey="SrcAccNoSrch2";
                popWin = open('${pageContext.request.contextPath}/CommonSearchInformationLOV.jsp?accNo2=' + accNo + '&screenName=' + screenName+'&lovKey='+lovKey, 'SrcAccNoSearch', attr);
                popWin.focus();
            }

               function popup_ifscNo2(width, height, ifscNo2) {
                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 = "NeftRtgsInitiation.jsp";
                var  lovKey="ifscNoSrch2";

                popWin = open('${pageContext.request.contextPath}/CommonSearchInformationLOV.jsp?ifscNo2=' + ifscNo2 + '&screenName=' + screenName+'&lovKey='+lovKey, 'ifscNoSrch2', attr);
                popWin.focus();

            }
            
            function popup_refNo(width, height, refNo) {
                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 = "NeftRtgsInitiation.jsp";
                var  lovKey="refNoSrch";

                popWin = open('${pageContext.request.contextPath}/CommonSearchInformationLOV.jsp?refNo=' + refNo + '&screenName=' + screenName+'&lovKey='+lovKey, 'refNoSearch', attr);
                popWin.focus();

            }

            function download() {

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

                $('select#repayType').change(function () {
                    var shouldEnable = $(this).val();
                    $('#lonDetails').hide();
                    //$('#narration').val('');
                    switch(shouldEnable)
                    {
                        case 'C':
                            document.getElementById("repayAmt").readOnly = true;
                            break;
                        case 'R':
                            document.getElementById("repayAmt").readOnly = false;
                            break;
                        default:
                            document.getElementById("repayAmt").readOnly = false;
                    }
                });

            $(function() {
                $("#repayAmt").click(function() {
                    if($('#loanAcc').val() == ""){
                        alert("Please select a proper loan a/c number.");
                    } else if($('#intAdjAmt').val() == ""){
                        alert("Please enter interest adjustment amount");
                    } else if($('#status').val() == "C" && $('#payMode').val() == "C"){
                        alert("Cash Drawer isn't opened yet!");
                    }else{
                        if ($('#payMode').val() == "C"){

                            $("#myform").show(500);
                        }
                        else if ($('#payMode').val() == null){

                            alert("Please select payment mode first");
                        }
                    }
                })
            });
            
            // to restrict back button
            history.pushState(null, null, location.href);
            window.addEventListener('popstate', function(event) {
                history.pushState(null, null, location.href);
            });

        </script>

       <jsp:include page="/Deposit/MenuHead_Deposit.jsp" flush="true" />
       <br>
        <%          String error_msg = "";
             Object error = request.getAttribute("message");
             if (error != null) {
                 error_msg = error.toString();
             }
        %>

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

            String blankNA(String s) {
                return (s == null) ? "NA" : s;
            }
        %>

         <%
            Object oEnquiryBeanObj = request.getAttribute("oNeftRtgsEnquiryBean");
            NeftRtgsEnquiryBean oEnquiryBean = new NeftRtgsEnquiryBean();
            Object EnqBean=request.getAttribute("EnqBean");
            ArrayList<NeftRtgsEnquiryBean> alEnquiryBean = new ArrayList<NeftRtgsEnquiryBean>();
            if (oEnquiryBeanObj != null) {
                alEnquiryBean = (ArrayList<NeftRtgsEnquiryBean>) request.getAttribute("alNeftRtgsEnquiryBean");
                session.setAttribute("alEnquiryBeanobj", EnqBean);

            }
        %>


        <%
                    int flag2 = 1;
                    int curPage = 0;
                    try {
                        curPage = Integer.parseInt(request.getAttribute("currentPage").toString());
                    } catch (Exception e) {
                        curPage = 1;
                    }
                    if (alEnquiryBean.size() > 0) {
                        flag2 = 2;
                    }
                    int totalRecordCount = 0;
                    int recordCount = 0;

                    try {
                        //totalRecordCount = Integer.parseInt(request.getAttribute("totalRecordCount").toString());
                        recordCount = Integer.parseInt(request.getAttribute("recordCount").toString());
                    } catch (Exception e) {
                        totalRecordCount = 0;
                        recordCount = 0;
                    }
                    /*totalRecordCount = totalRecordCount + alTransactionEnquiryBean.size();*/

        %>
      
        <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">NEFT/RTGS Initiation</legend>
            <form name="NeftRtgsInitiationForm" method="post" action="NeftRtgsInitiationServlet">

                <%if (!error_msg.equalsIgnoreCase("")) {%>
                <center><div class="info" id="errorMessage"><center><%= error_msg%></center></div></center>
                <% }%>
                <br>
                <center>
                    <table>
                        <tr><td>NEFT/RTGS Transactions :</td><td><select id="checkOption"  name="checkOption" onchange="showTable()" >
                        <option value="" disabled selected style="display:none;" >--Select--</option>
                        <option value="newTxn">Make New Transaction</option>
                        <option value="txnDtl">Transaction Details</option>
                    </select></td></tr>
                    </table>                   
                    <br><br>
                   
                    <table id="tblAccNo" Style="display: none">
                
                        <tr id="trAccNo"><td>Remitter Account Number<font color="red" >*</font>:</td><td><input type="text" value="" name="accNo" id="accNo" style="text-align:right;" onkeypress='return event.charCode >= 48 && event.charCode <= 57' /></td>
                            <td>
                                <input type="button" value="Search" onclick="javascript:popup_accNo(800, 180, document.NeftRtgsInitiationForm.accNo.value)"/>
                            </td>  
                          
                            <td align = "right" >
                                <img id="imge" src="" height="100" width="140" border="1px" /> 
                            </td>
                      
                          <%--  <td align= "right" ><input type ="image" id="blahsig" name="blahsig" src="${pageContext.request.contextPath}/UploadedFiles/faceDefault - Copy.jpg" height="80" width="180" border="1px">--%>
                       
                        </tr>
                        <tr><td id ="destAccN" >CBS Account Number:</td><td id="destAccN" value=""><input type="text" readonly maxlength="25" id="cbsAccNo" name="cbsAccNo" style="text-align:right;" ></td>
                            <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                        <td align ="right">
                                <img id="sign" src="" height="50" width="140" border="1px"  /> 
                            </td>
                        
                        </tr>
                        
                        <tr><td id ="destAccNo" >Beneficiary Account Number<font color="red" >*</font>:</td><td id="destAccNo1" value=""><input type="text" maxlength="25" id="destAccNoVal" name="destAccNoVal" style="text-align:right;" ></td></tr>                        
                        <tr><td id ="benName" >Beneficiary Name:</td><td id="benName1" value=""><input type="text" maxlength="25" id="benNameVal" name="benNameVal"></td></tr>
                        <tr><td id ="benAddress" >Beneficiary Address:</td><td id="benAddress1" value=""><input type="text" maxlength="25" id="benAddressVal" name="benAddressVal"></td></tr>
                        <tr><td id ="ifscCd">IFSC Code:</td><td id="ifscCd1" value=""><input type="text" maxlength="25" id="ifscNoVal" name="ifscNoVal" style="text-align:right;" /></td><td id ="searchIfsc"><input type="button" value="Search" onclick="javascript:popup_ifscNo(800, 180, document.NeftRtgsInitiationForm.ifscNoVal.value)" /></td></tr>
                        <tr><td id ="destBank" >Beneficiary Bank<font color="red" >*</font>:</td><td id="destBank1" value=""><input type="text" maxlength="25" name="destBankNameVal" id="destBankNameVal" readonly/></td></tr>
                        <tr><td id ="destBranch">Beneficiary Branch<font color="red" >*</font>:</td><td id="destBranch1" value=""><input type="text" maxlength="25" id="destBranchVal" name="destBranchVal" readonly/></td></tr>
                        <tr><td id ="transAmt">Transaction Amount<font color="red" >*</font>:</td><td id="transAmt1" value=""><input type="text" maxlength="25" id="transAmtVal" name="transAmtVal" style="text-align:right;" onkeypress='return event.charCode >= 46 && event.charCode <= 57' /></td></tr>
                        <tr><td id ="commission">Commission:</td><td id="comAmt1" value=""><input type="text" maxlength="25" id="comAmtVal" name="comAmtVal" onkeydown="return isNumberKey(event)"/></td></tr>
                        <tr><td id="Bank">Select Bank Type<font color="red" >*</font>:</td><td id="comAmt1" value="">
                        <select id="bankOption"  name="bankOption">
                        <option value="SCB">SCB</option>
                        <option value="OTHER">Other Banks</option>
                    </select></td>
                         
                    </table>

                    <table id="txnDetailsTbl" <%if (displayFlag.equalsIgnoreCase("Y")) {}else if(displayFlag.equalsIgnoreCase("N")){%>style="display: none"<%}  else{%>style="display: none"<%}%>>
                        <tr><td>Remitter Account Number:</td><td><input type="text" name="srcAccNo" id="srcAccNo" style="text-align:right;" onkeypress='return event.charCode >= 48 && event.charCode <= 57'/></td><td><input type="button" value="Search" onclick="javascript:popup_accNo2(800, 180, document.NeftRtgsInitiationForm.srcAccNo.value)"/></td></tr>
                        <tr><td>Beneficiary Account Number:</td><td><input type="text" name="destAccNo2" id="destAccNo2" style="text-align:right;" onkeypress='return event.charCode >= 48 && event.charCode <= 57' /></td></tr>
                        <tr><td>IFSC Code:</td><td><input type="text" name="ifscNoVal2" id="ifscNoVal2"/></td><td><input type="button" value="Search" onclick="javascript:popup_ifscNo2(800, 180, document.NeftRtgsInitiationForm.ifscNoVal2.value)"/></td></tr>
                        <tr><td>Reference Number:</td><td><input type="text" name="refNo" id="refNo" style="text-align:right;" onkeypress='return event.charCode >= 48 && event.charCode <= 57' /></td></tr>
                        <tr><td>Transaction From Date<font color="red" >*</font>:</td><td align="left"><input type="text" style="text-align:center;" name="txnFromDate" id="txnFromDate"  resize="yes" readonly="true"/>&nbsp;<a href="#" onclick="return getCalendar(document.forms[0].txnFromDate);"/><img src="img/calendar.jpg" name="imgr" border="0" width="25" height="20" /></td></tr>
                        <tr><td>Transaction To Date<font color="red" >*</font>:</td><td align="left"><input type="text" style="text-align:center;" name="txnDate" id="txnDate"  resize="yes" readonly="true"/>&nbsp;<a href="#" onclick="return getCalendar(document.forms[0].txnDate);"/><img src="img/calendar.jpg" name="imgr" border="0" width="25" height="20" /></td></tr>
                    </table>
                    <br>
                  

                </center>
              
             <%if (displayFlag.equalsIgnoreCase("Y")) {%>
            <center>
                <div id="displayDiv" style="overflow:scroll; width: 1000px;">

                    <table border="2" width="auto" cellspacing="1" cellpadding="1" style="text-align: center ;overflow-y: scroll; font-size: 15px; width: 100%;">
                        <thead class="CSSTableGenerator">
                            <tr>
                                <td>Transaction No.</td>
                                <td>IPKS Account No.</td>
                                <td>Remitter Account No.</td>
                                <td>Beneficiary Account No.</td>
                                <td>Beneficiary Name</td>
                                <td>Beneficiary Address</td>
                                <td>Bank Name</td>
                                <td>Branch Name</td>
                                <td>IFSC Code</td>
                                <td>Transaction Amount</td>
                                <td>Commission Transaction Number</td>
                                <td>Commission Amount</td>
                                <td>Status</td>
                                <td>Transaction Date</td>
                                <td>CBS Queue No</td>
                                <td>CBS Queue No2</td>

                            </tr>
                        </thead>
                        <tbody style="background-color: white; font-size: 15px">
                            <%

                                    oEnquiryBean=null;
                                    //DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
                                for (int i = 0; i < alEnquiryBean.size(); i++) {
                                    oEnquiryBean = alEnquiryBean.get(i);
                                    //Date dt = (Date)df.parse((oEnquiryBean.getTxnDate().substring(0, 10)));


                            %>

                            <tr>
                                <td><%=blankNull(oEnquiryBean.getTxnNo())%></td>
                                <td><%=blankNull(oEnquiryBean.getSrcAccNo())%></td>
                                <td><%=blankNull(oEnquiryBean.getRem_ac_no())%></td>
                                <td><%=blankNull(oEnquiryBean.getDestAccNo2())%></td>
                                <td><%=blankNull(oEnquiryBean.getBen_name())%></td>
                                <td><%=blankNull(oEnquiryBean.getBen_add())%></td>
                                <td><%=blankNull(oEnquiryBean.getBankName())%></td>
                                <td><%=blankNull(oEnquiryBean.getBranchName())%></td>
                                <td><%=blankNull(oEnquiryBean.getIfscNoVal2())%></td>
                                <td><%=blankNull(oEnquiryBean.getTransAmt())%></td>
                                <td><%=blankNull(oEnquiryBean.getCom_txn_no())%></td>
                                <td><%=blankNull(oEnquiryBean.getCom_amt())%></td>
                                <td><%=blankNull(oEnquiryBean.getStatus())%></td>
                                <td><%=blankNull(oEnquiryBean.getTxnDate().substring(0, 10))%></td>
                                <td><%=blankNull(oEnquiryBean.getQueueNo())%></td>
                                <td><%=blankNA(oEnquiryBean.getQueueNo2())%></td>
                            </tr>
                            <%}%>
                        </tbody>
                    </table><br><br>
                    </div>

                </center>
                 <%}%>
                 <center>
                     <table>
                         <tr>
                    <td><input type="button" value="Submit" id="Submit" style="display: none" onclick="javascript:submitform(NeftRtgsInitiationForm)"/></td>
                    <td><input type="button" value="Search" id="Search" name="Search" <%if (displayFlag.equalsIgnoreCase("Y")) {}else{%>style="display: none"<%}%> onclick="javascript:submitform2(NeftRtgsInitiationForm)"/></td>
                    <td><input type="button" value="Reset" id="Reset" onclick="ShowParent();" /></td>
                    <td><input type="button" value="Download" id="downloadBtn" <%if (displayFlag.equalsIgnoreCase("Y")) {}else{%>style="display: none"<%}%> onclick="javascript:download()"/></td>
                    <td><input type="hidden" id="handle_id" name="handle_id"/></td>
                    <td><input name="reportname" id="reportname" type="hidden" value="NEFT_RTGS_REPORT" /></td>
                    <td><input type="hidden" value="NeftRtgsInitiation" name="screenName" /></td>
                    </tr>
                    </table>
                 </center>
              </form>
        </fieldset>

    </body>
</html>
<% } catch (Exception e) {
                
            }
%>

