<%@ Page Language="C#" MasterPageFile="~/MasterPages/Main.master" AutoEventWireup="true" CodeFile="Dispense_ATM_Rep.aspx.cs" Inherits="Dispense_ATM_Rep" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
	<!-- DataTables -->
	<link rel="stylesheet" href="../plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
	<link rel="stylesheet" href="../plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
	<link rel="stylesheet" href="../plugins/datatables-buttons/css/buttons.bootstrap4.min.css">

    <style type="text/css">
        .header-center {
            text-align: center;
        }
    </style>

    <script language="javascript" type="text/javascript">

        function SaveConfirmation() {
            var userSelection;

            userSelection = confirm("Are you sure to create new Gl Entry");

            if (userSelection) {
                return true;
            } else {
                return false;
            }
        }
        function DelConfirmation() {
            var userSelection;

            userSelection = confirm("Are you sure to Delete Gl Entry");

            if (userSelection) {
                return true;
            } else {
                return false;
            }
        }
        function EnableControls() {

            document.getElementById('<%=TextBox6.ClientID%>').disabled = false;
            document.getElementById('<%=TextBox7.ClientID%>').disabled = false;
            document.getElementById('<%=TextBox8.ClientID%>').disabled = false;
            document.getElementById('<%=ddlModifyReason.ClientID%>').disabled = false;
            document.getElementById('<%=ddlStatus.ClientID%>').disabled = false;
            document.getElementById('<%=btnEdit.ClientID %>').style.visibility = "hidden";

        }
        function validate() {
            var message = "";

            if (document.getElementById("<%=txtTerminal.ClientID%>").value == "") {
                message += "You have to enter the ATM number...\n";
            }

            if (message.length > 0) {
                message = "please notice the following requirments:\n\n" + message;
                alert(message);
                return false;
            }
            return true;
        }
        function showgrid() {
            document.getElementById('td1').className = 'off';
            document.getElementById('td2').className = 'offEnd';
            document.getElementById('td3').className = 'on';
            document.getElementById('td4').className = 'onLastEnd';
            //    document.getElementById('td5').className = 'off';
            //    document.getElementById('td6').className = 'onEnd';
            //    document.getElementById('td7').className = 'off';
            //    document.getElementById('td8').className = 'onEndLast';  

            document.getElementById('gridtable').style.display = 'block';
            document.getElementById('controltable').style.display = 'none';
            //    document.getElementById('replTable').style.display = 'none';
            //    document.getElementById('tblDropDetails').style.display = 'none';


        }
        function showcontrol() {
            document.getElementById('td1').className = 'on';
            document.getElementById('td2').className = 'onEnd';
            document.getElementById('td3').className = 'off';
            document.getElementById('td4').className = 'offLastEnd';

            //    document.getElementById('td5').className = 'off';
            //    document.getElementById('td6').className = 'offEnd';
            //    document.getElementById('td7').className = 'off';
            //    document.getElementById('td8').className = 'offLastEnd';  
            document.getElementById('gridtable').style.display = 'none';
            document.getElementById('controltable').style.display = 'block';
            //    document.getElementById('replTable').style.display = 'none';
            //    document.getElementById('tblDropDetails').style.display = 'none';
        }

        //function showgrid2() {
        //    document.getElementById('td1').className = 'off';
        //    document.getElementById('td2').className = 'offEnd';
        //    document.getElementById('td3').className = 'off';
        //    document.getElementById('td4').className = 'offend';
        //    document.getElementById('td5').className = 'on';
        //    document.getElementById('td6').className = 'onEnd';
        //    document.getElementById('td7').className = 'off';
        //    document.getElementById('td8').className = 'offLastEnd';  
        //    document.getElementById('gridtable').style.display = 'none';
        //    document.getElementById('controltable').style.display = 'none';
        //    document.getElementById('replTable').style.display = 'block';
        //    document.getElementById('tblDropDetails').style.display = 'none';
        //}

        //function showgrid3() {
        //    document.getElementById('td1').className = 'off';
        //    document.getElementById('td2').className = 'offEnd';
        //    document.getElementById('td3').className = 'off';
        //    document.getElementById('td4').className = 'offend';
        //    document.getElementById('td5').className = 'off';
        //    document.getElementById('td6').className = 'offend';
        //    document.getElementById('td7').className = 'on';
        //    document.getElementById('td8').className = 'onLastEnd';  
        //    document.getElementById('gridtable').style.display = 'none';
        //    document.getElementById('controltable').style.display = 'none';
        //    document.getElementById('replTable').style.display = 'none';
        //    document.getElementById('tblDropDetails').style.display = 'block';

        //}

    </script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
	<asp:ScriptManager ID="ScriptManager1" runat="server">
	</asp:ScriptManager>
	<!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1>Dispense ATM Replenishment</h1>
                    </div>
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item"><a href="#">Home</a></li>
                            <li class="breadcrumb-item active">ATM Replenishment</li>
                            <li class="breadcrumb-item active">Dispense ATM Replenishment</li>
                        </ol>
                    </div>
                </div>
            </div>
            <!-- /.container-fluid -->
        </section>
        <!-- /.content-header -->
        <!-- Main content -->
        <section class="content">
            <div class="container-fluid">
                <div class="card card-warning">
                    <%--<div class="card-header">
                <h3 class="card-title">Search Filters</h3>
              </div>--%>
                    <!-- /.card-header -->
                    <div class="card-body">
                        <div class="row">
                            <div class="col-sm-6">
                                <!-- text input -->
                                <div class="form-group">
                                    <label>ATM No</label>
                                    <asp:TextBox ID="txtTerminal" runat="server" class="form-control" MaxLength="4"></asp:TextBox>
                                </div>
                            </div>

                            <div id="prev_repl" runat="server">
                                <div class="col-sm-3">
                                    <div class="form-group">
                                        <label>Prev Replenishment Date</label>
                                        <div class="input-group date" id="prev_replenishmentdate" data-target-input="nearest">

                                            <asp:TextBox ID="txtprevrepldate" data-target="#prev_replenishmentdate" runat="server" class="form-control datetimepicker-input"></asp:TextBox>
                                            <div class="input-group-append" data-target="#prev_replenishmentdate" data-toggle="datetimepicker">
                                                <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="col-sm-3">
                                    <div class="form-group">
                                        <label>Prev Replenishment Time</label>
                                        <asp:TextBox ID="txtprevtime" runat="server" class="form-control"></asp:TextBox>
                                    </div>
                                </div>
                            </div>

                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label>Replenishment Date</label>
                                    <div class="input-group date" id="replenishmentdate" data-target-input="nearest">

                                        <asp:TextBox ID="txtrepldate" data-target="#replenishmentdate" runat="server" class="form-control datetimepicker-input"></asp:TextBox>
                                        <div class="input-group-append" data-target="#replenishmentdate" data-toggle="datetimepicker">
                                            <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                                        </div>
                                        <asp:TextBox ID="pickrepldate" runat="server" Visible="false" class="form-control"></asp:TextBox>
                                    </div>
                                </div>
                            </div>

                            <div class="col-sm-3">
                                <div class="form-group" id="repltime" runat="server">
                                    <label>Replenishment Time</label>
                                    <asp:TextBox ID="pickrepltime" runat="server" class="form-control" type="time" name="time"></asp:TextBox>
                                    <asp:TextBox ID="txtrepltime" runat="server" Visible="false" class="form-control"></asp:TextBox>
                                </div>
                            </div>

                        </div>
                        <div class="row">
                            <div class="col-12" style="text-align: center">
                                <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" CssClass="btn btn-primary btn-l" />
                            </div>
                        </div>
                    </div>
                    <!-- /.card-body -->
                </div>
                <!-- Default box -->
                <div id="RepSResults" class="card card-info color-palette-box" runat="server" visible="false">
                    <div class="card-header">
                        <h3 class="card-title">
                            <i class="fas fa-tag"></i>
                            Replenishment Search Results
                        </h3>

                        <div class="card-tools">
                            <button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse">
                                <i class="fas fa-minus"></i>
                            </button>
                        </div>
                    </div>
                    <div class="card-body" style="min-height: 100px; width: 100%; display: inline-block; vertical-align: top; overflow-x: auto;">
                        <asp:GridView ID="GridView1" class="table table-striped table-bordered" runat="server" AutoGenerateColumns="False" DataKeyNames="rid" OnRowCommand="GridView1_RowCommand" OnRowCreated="GridView1_RowCreated" EmptyDataText="There are no results">
                            <Columns>
                                <asp:BoundField DataField="rid" HeaderText="Replenishment&nbsp;ID" HeaderStyle-CssClass="header-center" />
                                <asp:BoundField DataField="terminal" HeaderText="Terminal&nbsp;ID" HeaderStyle-CssClass="header-center" />
                                <asp:BoundField DataField="repl_curr" HeaderText="Repl&nbsp;Currancy" HeaderStyle-CssClass="header-center" />
                                <asp:BoundField DataField="repl_date" HeaderText="Repl&nbsp;Date" HeaderStyle-CssClass="header-center" />
                                <asp:BoundField DataField="repl_time" HeaderText="Repl&nbsp;Time" HeaderStyle-CssClass="header-center" />
                                <asp:BoundField DataField="status" HeaderText="Status" HeaderStyle-CssClass="header-center" />
                                <asp:BoundField DataField="acct_number" HeaderText="A/C&nbsp;Number" HeaderStyle-CssClass="header-center" />
                                <asp:TemplateField HeaderText="Actions" Visible="true" HeaderStyle-CssClass="header-center">
                                    <ItemTemplate>
                                        <button type="button" class="btn btn-default btn-block btn-xs dropdown-toggle" data-toggle="dropdown">
                                            Action
                                        </button>
                                        <div class="dropdown-menu">
                                            <a class="dropdown-item" href="#">
                                                <asp:Button ID="Button5" CssClass="btn btn-outline-info btn-block btn-sm" runat="server" Text="Edit" CommandName="e" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" /></a>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                        <div class="row" style="margin-left: 1%; margin-top: 1%; margin-bottom: 1%">
                            Go To Page&nbsp;: &nbsp;<asp:DropDownList ID="ddlPages" runat="server" class="form-control select2" AutoPostBack="True" Width="100px" Height="30px" OnSelectedIndexChanged="ddlPages_SelectedIndexChanged"></asp:DropDownList>
                        </div>
                        <asp:Button ID="btnAdd" runat="server" Text="Add" class="btn btn-primary" OnClick="btnAdd_Click" />
                    </div>


                    <!-- /.card-body -->
                </div>


                <!-- /.card -->
                <div class="row">
                    <div class="modal fade" id="modal-xl">

                        <div class="modal-dialog modal-xl" style="max-width: max-content;">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <h4 class="modal-title">Replenishment Details</h4>
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                        <span aria-hidden="true">&times;</span>
                                    </button>
                                </div>
                                <div class="modal-body">

                                    <div class="card-body">
                                        <table border="0" cellpadding="0" cellspacing="0" class="add_ItemTB1">
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">Branch
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:DropDownList ID="DropDownList1" runat="server" DataTextField="branch_name" DataValueField="branch_code" class="form-control select"></asp:DropDownList>
                                                    </div>
                                                </td>
                                                <td class="tdNormal" style="width: 10%">&nbsp;
                                                </td>
                                                <td class="tdNormal" style="width: 15%">ATM No
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="txtATMNumberAdd" runat="server" class="form-control" MaxLength="4"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">Prev Repl Date
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <div class="input-group date" id="aprevrepldate" data-target-input="nearest">
                                                            <asp:TextBox ID="txtaprevrepldate" data-target="#aprevrepldate" runat="server" class="form-control datetimepicker-input"></asp:TextBox>
                                                            <div class="input-group-append" data-target="#aprevrepldate" data-toggle="datetimepicker">
                                                                <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </td>
                                                <td class="tdNormal" style="width: 10%">&nbsp;
                                                </td>
                                                <td class="tdNormal" style="width: 15%">Prev Repl Time
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="pickpretime" runat="server" class="form-control" type="time" name="time"></asp:TextBox>
                                                        <asp:TextBox ID="txtPreTime" runat="server" Visible="false" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">Repl Date
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <div class="input-group date" id="arepldate" data-target-input="nearest">
                                                            <asp:TextBox ID="txtarepldate" data-target="#arepldate" runat="server" class="form-control datetimepicker-input"></asp:TextBox>
                                                            <div class="input-group-append" data-target="#arepldate" data-toggle="datetimepicker">
                                                                <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </td>
                                                <td class="tdNormal" style="width: 10%">&nbsp;
                                                </td>
                                                <td class="tdNormal" style="width: 15%">Repl Time
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="pickreptime" runat="server" class="form-control" type="time" name="time"></asp:TextBox>
                                                        <asp:TextBox ID="txtRepTime" runat="server" Visible="false" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr style="display: none">
                                                <td class="tdNormal" style="width: 15%">Prev Postilion Date
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <div class="input-group date" id="adateB24PrevDate" data-target-input="nearest">
                                                            <asp:TextBox ID="txtdateB24PrevDate" data-target="#adateB24PrevDate" runat="server" class="form-control datetimepicker-input"></asp:TextBox>
                                                            <div class="input-group-append" data-target="#adateB24PrevDate" data-toggle="datetimepicker">
                                                                <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </td>
                                                <td class="tdNormal" style="width: 10%">&nbsp;
                                                </td>
                                                <td class="tdNormal" style="width: 15%">Prev Repl Time
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="txtPrevB24Time" runat="server" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr style="display: none">
                                                <td class="tdNormal" style="width: 15%">Postilion Date
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <div class="input-group date" id="adateB24Date" data-target-input="nearest">
                                                            <asp:TextBox ID="txtdateB24Date" data-target="#adateB24Date" runat="server" class="form-control datetimepicker-input"></asp:TextBox>
                                                            <div class="input-group-append" data-target="#adateB24Date" data-toggle="datetimepicker">
                                                                <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </td>
                                                <td class="tdNormal" style="width: 10%">&nbsp;
                                                </td>
                                                <td class="tdNormal" style="width: 15%">Postilion Time
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="txtB24Time" runat="server" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">Repl Currency
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:DropDownList ID="ddlCurrency" runat="server" DataTextField="currency" DataValueField="iso_code" class="form-control select"></asp:DropDownList>
                                                        <asp:TextBox ID="TextBox5" Enabled="false" runat="server" class="fieldNormal"></asp:TextBox>
                                                    </div>
                                                </td>
                                                <td class="tdNormal" style="width: 10%">&nbsp;
                                                </td>
                                                <td class="tdNormal" style="width: 15%">Record Status
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:DropDownList ID="ddlStatus" runat="server" DataTextField="status" DataValueField="SID" class="form-control select"></asp:DropDownList>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">From Postilion
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <div class="custom-control custom-checkbox">
                                                            <asp:CheckBox ID="chkFromBase24" Enabled="false" runat="server" class="custom-control-input" />
                                                            <label class="custom-control-label" for="customCheck1">Postilion</label>
                                                        </div>
                                                    </div>
                                                </td>
                                                <td class="tdNormal" style="width: 10%">&nbsp;
                                                </td>
                                                <td class="tdNormal" style="width: 15%">From CL / Add
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="txtClAdd" Enabled="false" ReadOnly="true" runat="server" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">HOST Results
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="txtBANCS" Enabled="false" ReadOnly="true" runat="server" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>

                                            <tr>
                                                <td class="tdNormal" style="width: 15%">Record Date
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <div class="input-group date" id="arecorddate" data-target-input="nearest">
                                                            <asp:TextBox ID="txtrecdate" data-target="#arecorddate" Enabled="false" ReadOnly="true" runat="server" class="form-control datetimepicker-input"></asp:TextBox>
                                                            <div class="input-group-append" data-target="#arecorddate" data-toggle="datetimepicker">
                                                                <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </td>
                                                <td class="tdNormal" style="width: 10%">&nbsp;
                                                </td>
                                                <td class="tdNormal" style="width: 15%">Modify reason
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:DropDownList ID="ddlModifyReason" runat="server" DataTextField="reason" DataValueField="reason_id" class="form-control select"></asp:DropDownList>
                                                    </div>
                                                </td>
                                            </tr>


                                            <tr>
                                                <td class="tdNormal" style="width: 15%">Creation Date
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <div class="input-group date" id="auserdate" data-target-input="nearest">
                                                            <asp:TextBox ID="txtUserDate" data-target="#auserdate" Enabled="false" ReadOnly="true" runat="server" class="form-control datetimepicker-input"></asp:TextBox>
                                                            <div class="input-group-append" data-target="#auserdate" data-toggle="datetimepicker">
                                                                <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </td>
                                                <td class="tdNormal" style="width: 10%">&nbsp;
                                                </td>
                                                <td class="tdNormal" style="width: 15%">Created By
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="txtUser" Enabled="false" ReadOnly="true" runat="server" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>

                                            <!-- EJ Totals -->


                                            <tr>
                                                <td class="tdNormal" colspan="4">
                                                    <br />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdNormal" colspan="4">
                                                    <h5>EJ Totals</h5>
                                                </td>
                                            </tr>


                                            <tr>
                                                <td class="tdNormal" style="width: 15%">Opening Balance
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="TextBox7" Enabled="false" runat="server" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">Dispensed
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="TextBox6" Enabled="false" runat="server" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">
                                                    <asp:Label ID="lbl_Disp_A" runat="server"></asp:Label>
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="txt_Disp_A" Enabled="false" runat="server" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">
                                                    <asp:Label ID="lbl_Disp_B" runat="server"></asp:Label>
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="txt_Disp_B" Enabled="false" runat="server" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">
                                                    <asp:Label ID="lbl_Disp_C" runat="server"></asp:Label>
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="txt_Disp_C" Enabled="false" runat="server" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">
                                                    <asp:Label ID="lbl_Disp_D" runat="server"></asp:Label>
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="txt_Disp_D" Enabled="false" runat="server" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">
                                                    <asp:Label ID="lbl_Disp_E" runat="server"></asp:Label>
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="txt_Disp_E" Enabled="false" runat="server" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                                <td class="tdNormal" style="width: 10%">&nbsp;
                                                </td>
                                                <td class="tdNormal" colspan="2">
                                                    <h5>Postilion Totals</h5>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">Diverted SAR
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="txtDivertedSAR" Enabled="false" runat="server" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                                <td class="tdNormal" style="width: 10%">&nbsp;
                                                </td>
                                                <td class="tdNormal" style="width: 15%">Opening Balance
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="TextBox21" Enabled="false" runat="server" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">Diverted USD
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="txtDivertedUSD" Enabled="false" runat="server" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                                <td class="tdNormal" style="width: 10%">&nbsp;
                                                </td>
                                                <td class="tdNormal" style="width: 15%">Dispensed
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="TextBox20" Enabled="false" runat="server" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">Closing Balance
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="TextBox8" Enabled="false" runat="server" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                                <td class="tdNormal" style="width: 10%">&nbsp;
                                                </td>
                                                <td class="tdNormal" style="width: 15%">Closing Balance
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="TextBox22" Enabled="false" runat="server" class="form-control"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>

                                        </table>
                                        <%--<table border="0" cellpadding="0" cellspacing="0" class="action_TB_BgaddItem">
                                            <tr>
                                                <td>
                                                    <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_Click" class="btn btn-primary" CausesValidation="False" />
                                                    <asp:Button ID="btnSave"  runat="server" Text="Save" OnClick="btnSave_Click" class="btn btn-primary" />
                                                </td>
                                            </tr>
                                        </table>--%>

                                        <asp:Panel ID="pnlReadOnly" runat="server" Width="100%" Visible="false">
                                            <table class="tabTb" border="0" cellpadding="0" cellspacing="0" visible="false">
                                                <tr>
                                                    <td align="left">
                                                        <table border="0" cellpadding="0" cellspacing="0" dir="ltr">
                                                            <tr>
                                                                <br />
                                                            </tr>
                                                            <tr class="nav nav-tabs mb-3">
                                                                <%--<td id="td1" class="on">
                                                        <a href="#" onclick="showcontrol(); return false;">Replenishment Reconcilliation Details</a>
                                                    </td>
                                                    <td id="td2" class="onEnd"></td>
                                                    <td id="td3" class="off">
                                                        <a href="#" onclick="showgrid();return false;">Claims for this period</a>
                                                    </td>
                                                    <td id="td4" class="offEndLast"></td>--%>

                                                                <%--<ul class="nav nav-tabs mb-3" id="myTab" role="tablist">--%>
                                                                <td id="td1" class="on nav-item nav nav-tabs mb-3" role="tablist">
                                                                    <a href="#" class="nav-link active" id="Replenishment-tab" data-toggle="tab" onclick="showcontrol(); return false;" role="tab" aria-controls="home" aria-selected="true">Replenishment Reconcilliation Details</a>
                                                                </td>
                                                                <td id="td2" class="onEnd"></td>
                                                                <td id="td3" class="off nav-item">

                                                                    <a href="#" class="nav-link" id="Claims-tab" data-toggle="tab" onclick="showgrid();return false;" role="tab" aria-controls="profile" aria-selected="false">Claims for this period</a>

                                                                </td>
                                                                <td id="td4" class="offEndLast"></td>
                                                                <%--</ul>--%>
                                                            </tr>
                                                            <tr>
                                                                <br />
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>

                                            <%--<ul class="nav nav-tabs mb-3" id="myTab" role="tablist">
                                        <li class="nav-item">
                                            <a class="nav-link active" id="Replenishment-tab" data-toggle="tab" onclick="showcontrol(); return false;" role="tab" aria-controls="home" aria-selected="true">Replenishment Reconcilliation Details</a>
                                        </li>
                                        <li class="nav-item">
                                            <a class="nav-link" id="Claims-tab" data-toggle="tab" onclick="showgrid();return false;" role="tab" aria-controls="profile" aria-selected="false">Claims for this period</a>
                                        </li>
                                    </ul>--%>

                                            <table id="controltable" border="0" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                                <tr>
                                                    <td class="tdNormal" style="width: 15%">
                                                        <div class="form-group">
                                                            Opening Balance
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" style="width: 30%">
                                                        <div class="form-group">
                                                            <asp:TextBox ID="TextBox11" Enabled="true" ReadOnly="false" runat="server" class="form-control"
                                                                OnTextChanged="TextBox11_TextChanged" AutoPostBack="True"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" style="width: 10%"></td>
                                                    <td class="tdNormal" style="display: none; width: 15%">
                                                        <div class="form-group">
                                                            EJ GL ATM Difference
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" style="display: none; width: 30%">
                                                        <div class="form-group">
                                                            <asp:TextBox ID="txtGlDifference" Enabled="false" ReadOnly="true" runat="server"
                                                                class="form-control"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="tdNormal" style="width: 15%">
                                                        <div class="form-group">
                                                            Switch Amount dispensed
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" style="width: 30%">
                                                        <div class="form-group">
                                                            <asp:TextBox ID="TextBox3" Enabled="false" ReadOnly="true" runat="server" class="form-control"></asp:TextBox><font
                                                                color="red">* No GL Dispensed Amt.</font>
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" style="width: 10%"></td>
                                                    <td class="tdNormal" style="width: 15%">
                                                        <div class="form-group">
                                                            EJ Switch Difference
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" style="width: 30%">
                                                        <div class="form-group">
                                                            <asp:TextBox ID="TextBox14" Enabled="false" ReadOnly="true" runat="server" class="form-control"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="tdNormal" style="width: 15%">
                                                        <div class="form-group">
                                                            Closing Balance
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" style="width: 30%">
                                                        <div class="form-group">
                                                            <asp:TextBox ID="TextBox12" Enabled="true" ReadOnly="false" runat="server" class="form-control"
                                                                OnTextChanged="TextBox12_TextChanged" AutoPostBack="True"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" style="width: 10%"></td>
                                                    <td class="tdNormal" style="width: 15%; display: none">
                                                        <div class="form-group">
                                                            EJ REPL GL ATM Difference
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" style="width: 30%; display: none">
                                                        <div class="form-group">
                                                            <asp:TextBox ID="txtEJREPLGLATMDifference" ReadOnly="true" runat="server" class="form-control"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="tdNormal" style="width: 15%">
                                                        <div class="form-group">
                                                            Overall ATM Difference
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" style="width: 30%">
                                                        <div class="form-group">
                                                            <asp:TextBox ID="txtOverAllDiffer" Enabled="false" ReadOnly="true" runat="server"
                                                                class="form-control"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" style="width: 10%"></td>
                                                    <td class="tdNormal" style="width: 15%">
                                                        <div class="form-group">
                                                            Retract
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" style="width: 30%">
                                                        <div class="form-group">
                                                            <asp:TextBox ID="txtGlRetract" runat="server" class="form-control" Enabled="false"
                                                                ReadOnly="true" MaxLength="14"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="tdNormal" style="width: 15%"></td>
                                                    <td class="tdNormal" style="width: 30%"></td>
                                                    <td class="tdNormal" style="width: 10%"></td>
                                                    <td class="tdNormal" style="width: 15%; display: none">
                                                        <div class="form-group">
                                                            Record Type
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" style="width: 30%; display: none">
                                                        <div class="form-group">
                                                            <asp:TextBox ID="TextBox16" Enabled="false" ReadOnly="true" runat="server" class="form-control"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr style="display: none">
                                                    <td class="tdNormal" style="width: 15%">
                                                        <div class="form-group">
                                                            Verified date
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" style="width: 30%">
                                                        <div class="form-group">
                                                            <asp:TextBox ID="TextBox17" Enabled="false" ReadOnly="true" runat="server" class="form-control"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" style="width: 10%"></td>
                                                    <td class="tdNormal" style="width: 15%">
                                                        <div class="form-group">
                                                            verified time
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" style="width: 30%">
                                                        <div class="form-group">
                                                            <asp:TextBox ID="TextBox18" Enabled="false" ReadOnly="true" runat="server" class="form-control"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr style="display: none">
                                                    <td class="tdNormal" style="width: 15%">
                                                        <div class="form-group">
                                                            SW Amount dispensed
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" style="width: 30%">
                                                        <div class="form-group">
                                                            <asp:TextBox ID="TextBox19" Enabled="false" ReadOnly="true" runat="server" class="form-control"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" style="width: 10%"></td>
                                                </tr>
                                                <tr>
                                                    <td class="tdNormal" style="width: 15%">
                                                        <div class="form-group">
                                                            Description
                                                        </div>
                                                    </td>
                                                    <td class="tdNormal" colspan="4">
                                                        <div class="form-group">
                                                            <asp:TextBox ID="TextBox1" Enabled="true" TextMode="MultiLine" Rows="6" ReadOnly="false"
                                                                runat="server" class="form-control fieldMultiLine"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                            <table id="gridtable" style="display: none" border="0" width="100%" cellpadding="0"
                                                cellspacing="0" class="add_ItemTB">
                                                <tr>
                                                    <td class="tdNormal" colspan="5" style="min-height: 100px; width: 100%; display: inline-block; vertical-align: top; overflow-x: auto;">
                                                        <asp:GridView ID="GridView2" runat="server" AllowPaging="True" AllowSorting="True"
                                                            AutoGenerateColumns="False" CellPadding="4" CssClass="table table-striped table-bordered" Width="100%"
                                                            DataKeyNames="claim_id" EmptyDataText="There are no Results" ForeColor="#333333"
                                                            GridLines="None">
                                                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Right" />
                                                            <Columns>
                                                                <asp:BoundField DataField="claim_id" HeaderText="Claim&nbsp;ID" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="card_number" HeaderText="Card&nbsp;No" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="term_id" HeaderText="Terminal&nbsp;ID" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="tran_date" HeaderText="Tran&nbsp;Date" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="tran_amount" HeaderText="Tran&nbsp;Amount" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="rrn" HeaderText="Reference&nbsp;No" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="claim_issuer" HeaderText="Claim&nbsp;Issuer" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="claim_status_desc" HeaderText="Status" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="sama_claim_status" HeaderText="Sama&nbsp;Status" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="duration_days" HeaderText="Duration" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="Claim_Reset_Flg" HeaderText="Reset?" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="last_commentator" HeaderText="last&nbsp;Inv&nbsp;By" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="Parent_claim_id" HeaderText="Parent&nbsp;Claim" HeaderStyle-CssClass="header-center" />
                                                            </Columns>
                                                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="Black" />
                                                            <EditRowStyle BackColor="#999999" />
                                                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" HorizontalAlign="Right" />
                                                        </asp:GridView>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="tdNormal" style="margin-left: 1%; margin-top: 1%; margin-bottom: 1%">Go To Page:
                                                <asp:DropDownList ID="DropDownList3" runat="server" class="fieldNormal" AutoPostBack="True"
                                                    Width="50px" OnSelectedIndexChanged="DropDownList3_SelectedIndexChanged">
                                                </asp:DropDownList>
                                                    </td>
                                                    <td class="tdNormal"></td>
                                                    <td class="tdNormal"></td>
                                                    <td class="tdNormal"></td>
                                                    <td class="tdNormal"></td>
                                                </tr>
                                            </table>
                                            <table id="replTable" style="display: none" border="0" width="100%" cellpadding="0"
                                                cellspacing="0" class="add_ItemTB">
                                                <tr>
                                                    <td class="tdNormal" style="width: 20%">Replenishment Type:
                                                <asp:DropDownList ID="ddlRepType" runat="server" class="fieldNormal" AutoPostBack="false">
                                                    <asp:ListItem Value="24" Text="Manual Replenishment"></asp:ListItem>
                                                    <asp:ListItem Value="25" Text="Automatic Replenishment"></asp:ListItem>
                                                </asp:DropDownList>
                                                        <asp:Button ID="btnGetData" runat="server" Text="Search" CssClass="Btn_L_Normal"
                                                            OnClick="btnGetData_Click" />
                                                    </td>
                                                    <td class="tdNormal"></td>
                                                    <td class="tdNormal"></td>
                                                </tr>
                                                <tr>
                                                    <td class="tdNormal" colspan="5" style="min-height: 100px; width: 100%; display: inline-block; vertical-align: top; overflow-x: auto;">
                                                        <asp:GridView ID="grFinacleReplDet" runat="server" AllowPaging="True" AllowSorting="True"
                                                            AutoGenerateColumns="False" CellPadding="4" CssClass="table table-striped table-bordered" Width="100%"
                                                            DataKeyNames="GL_ACCT_NO" EmptyDataText="There are no Results" ForeColor="#333333"
                                                            GridLines="None">
                                                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Right" />
                                                            <Columns>
                                                                <asp:BoundField DataField="TRAN_DATE" HeaderText="Tran&nbsp;Date" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="tran_time" HeaderText="Tran&nbsp;Time" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="Settl_DATE" HeaderText="Settelment&nbsp;Date" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="TRAN_AMOUNT" HeaderText="Tran&nbsp;Amount" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="ACCT_NUMBER" HeaderText="Account&nbsp;Number" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="GL_ACCT_NO" HeaderText="GL Account&nbsp;No" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="SUBSCRIBER_ID" HeaderText="Subscriber&nbsp;Term&nbsp;ID" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="TXT_MESSAGE" HeaderText="Message" HeaderStyle-CssClass="header-center" />
                                                            </Columns>
                                                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="Black" />
                                                            <EditRowStyle BackColor="#999999" />
                                                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" HorizontalAlign="Right" />
                                                        </asp:GridView>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="tdNormal" style="margin-left: 1%; margin-top: 1%; margin-bottom: 1%">Go To Page:
                                                <asp:DropDownList ID="ddlChangeReplIndex" runat="server" class="fieldNormal" AutoPostBack="True"
                                                    Width="50px" OnSelectedIndexChanged="ddlChangeReplIndex_SelectedIndexChanged">
                                                </asp:DropDownList>
                                                    </td>
                                                    <td class="tdNormal"></td>
                                                    <td class="tdNormal"></td>
                                                    <td class="tdNormal"></td>
                                                    <td class="tdNormal"></td>
                                                </tr>
                                            </table>
                                            <table id="tblDropDetails" style="display: none" border="0" width="100%" cellpadding="0"
                                                cellspacing="0" class="add_ItemTB">
                                                <tr>
                                                    <td class="tdNormal" style="width: 20%">Transactions Type:
                                                <asp:DropDownList ID="ddlDropSelection" runat="server" class="form-control select" AutoPostBack="false">
                                                    <asp:ListItem Value="1" Text="Drop Transactions"></asp:ListItem>
                                                </asp:DropDownList>
                                                        <asp:Button ID="btnDropGet" runat="server" Text="Search" CssClass="Btn_L_Normal"
                                                            OnClick="btnDropGet_Click" />
                                                    </td>
                                                    <td class="tdNormal"></td>
                                                    <td class="tdNormal"></td>
                                                </tr>
                                                <tr>
                                                    <td class="tdNormal" colspan="5" style="min-height: 100px; width: 100%; display: inline-block; vertical-align: top; overflow-x: auto;">
                                                        <asp:GridView ID="grDropDetails" runat="server" AllowPaging="True" AllowSorting="True"
                                                            AutoGenerateColumns="False" CellPadding="4" CssClass="table table-striped table-bordered" Width="100%"
                                                            DataKeyNames="TRAN_DATE" EmptyDataText="There are no Results" ForeColor="#333333"
                                                            GridLines="None">
                                                            <Columns>
                                                                <asp:BoundField DataField="TRAN_DATE" HeaderText="Tran&nbsp;Date" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="tran_time" HeaderText="Tran&nbsp;Time" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="Settl_DATE" HeaderText="Settelment&nbsp;Date" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="TRAN_AMOUNT" HeaderText="Tran&nbsp;Amount" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="FINANCIAL_FLAG" HeaderText="Financial&nbsp;Flagr" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="CARD_NUMBER" HeaderText="Card&nbsp;Number" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="RRN" HeaderText="RRN" HeaderStyle-CssClass="header-center" />
                                                                <asp:BoundField DataField="PRODUCT" HeaderText="Product" HeaderStyle-CssClass="header-center" />
                                                            </Columns>
                                                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="Black" />
                                                            <EditRowStyle BackColor="#999999" />
                                                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" HorizontalAlign="Right" />
                                                        </asp:GridView>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="tdNormal" style="margin-left: 1%; margin-top: 1%; margin-bottom: 1%">Go To Page:
                                                <asp:DropDownList ID="ddlDropDetails" runat="server" class="fieldNormal" AutoPostBack="True"
                                                    Width="50px" OnSelectedIndexChanged="ddlDropDetails_SelectedIndexChanged">
                                                </asp:DropDownList>
                                                    </td>
                                                    <td class="tdNormal"></td>
                                                    <td class="tdNormal"></td>
                                                    <td class="tdNormal"></td>
                                                    <td class="tdNormal"></td>
                                                </tr>
                                            </table>
                                        </asp:Panel>

                                        <table border="0" cellpadding="0" cellspacing="0" class="action_TB_BgaddItem">
                                            <tr>
                                                <td>
                                                    <asp:Button ID="btnEdit" runat="server" class="btn btn-primary" Text="Edit" OnClick="btnEdit_Click" />
                                                    <% if (txtBANCS.Text == "Overage" || txtBANCS.Text == "Shortage")
                                                        { %>
                                                    <asp:Button ID="Button3" runat="server" Text="Diff. GL Entry" class="btn btn-primary"
                                                        OnClick="btn_DifferenceGlEntry_Click" />
                                                    <% }%>
                                                    <asp:Button ID="btnManualGLEntry" runat="server" Text="Manual GL Entry" OnClick="btnManualGLEntry_Click" class="btn btn-primary" />
                                                </td>
                                            </tr>
                                        </table>

                                    </div>
                                    <!-- /.card-body -->

                                </div>
                                <div class="modal-footer justify-content-between">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                                    <asp:Button ID="btnSave" runat="server" Text="Save changes" OnClick="btnSave_Click" class="btn btn-primary" />


                                </div>
                            </div>
                            <!-- /.modal-content -->

                            <!------------------------------------body End2 ----------------------------------------------->
                            <br />
                            <asp:Label ID="lblError_PanelGlEntrySave" runat="server" Text="" class="fieldError"></asp:Label>
                            <asp:Panel ID="PanelGlEntrySave" runat="server" Width="100%" Visible="false">
                                <table border="0" cellpadding="0" cellspacing="0" id="printtable" class="add_ItemTB">
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            <%=txtBANCS.Text%>
                                            Details
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <%  if (txtBANCS.Text == "Shortage")
                                                {%>
                                            <asp:DropDownList ID="ddlShortageType" runat="server" class="form-control select" AutoPostBack="True"
                                                OnSelectedIndexChanged="ddlShortageType_SelectedIndexChanged">
                                                <asp:ListItem Value="0">Select Shortage Reason</asp:ListItem>
                                                <asp:ListItem Value="1">Short due to false reversal</asp:ListItem>
                                                <asp:ListItem Value="2">Short and over(For custodian it’s over but in reconciliation its short)</asp:ListItem>
                                                <asp:ListItem Value="3">Amount found in span difference account</asp:ListItem>
                                            </asp:DropDownList>
                                            <%} %>
                                        </td>
                                        <td class="tdNormal" style="width: 10%"></td>
                                        <td class="tdNormal"></td>
                                        <td class="tdNormal"></td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">Record date
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="lbl_CreatedDate" runat="server" Text="" ForeColor="#3399FF"></asp:Label>
                                        </td>
                                        <td class="tdNormal" style="width: 10%"></td>
                                        <td class="tdNormal" style="width: 15%">Posting for date
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="lbl_Posting_for_ReplDate" runat="server" Text="" ForeColor="#3399FF"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">Account number
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="lbl_Acct_number" runat="server" Text="" ForeColor="#3399FF"></asp:Label>
                                        </td>
                                        <td class="tdNormal" style="width: 10%"></td>
                                        <td class="tdNormal" style="width: 15%">Settlement Account
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="lbl_settle_account" runat="server" Text="" ForeColor="#3399FF"></asp:Label>
                                        </td>
                                    </tr>



                                    <tr>
                                        <td class="tdNormal" style="width: 15%">Approved
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="lbl_approved_by" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                        </td>
                                        <td class="tdNormal" style="width: 10%"></td>
                                        <td class="tdNormal" style="width: 15%">Approved date
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="lbl_approve_date" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">Transaction type
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="lbl_txn_type" runat="server" Text="" ForeColor="#3399FF"></asp:Label>
                                        </td>
                                        <td class="tdNormal" style="width: 10%"></td>
                                        <td class="tdNormal" style="width: 15%">Amount
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="lbl_gl_tran_amt" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td class="tdNormal" style="width: 15%">GL Desc
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:TextBox ID="txt_GL_Desc" runat="server" class="form-control" MaxLength="35"
                                                Width="224px"></asp:TextBox>
                                        </td>
                                        <td class="tdNormal" style="width: 10%"></td>
                                        <td class="tdNormal" style="width: 15%">Posted      
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="lbl_POSTED" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                            <asp:Label ID="lbl_GPE_CODE" runat="server" Visible="false" Text="" ForeColor="#3399FF"> </asp:Label>
                                            <asp:Label ID="lbl_ATM_NO" runat="server" Visible="false" Text="" ForeColor="#3399FF"> </asp:Label>

                                        </td>
                                    </tr>


                                </table>
                                <table border="0" cellpadding="0" cellspacing="0" class="action_TB_BgaddItem">
                                    <tr>
                                        <td>
                                            <asp:Button ID="btn_GlEntryCancel" runat="server" Text="Cancel" class="btn btn-primary"
                                                CausesValidation="False" OnClick="btn_GlEntryCancel_Click" />
                                            <asp:Button ID="btn_GlEntrySave" runat="server" class="btn btn-primary" Text="Save GL"
                                                OnClick="btn_GlEntrySave_Click" OnClientClick="return SaveConfirmation()" />
                                            <% if (lbl_POSTED.Text == "No" && lbl_approved_by.Text == "Yes")
                                                {%>
                                            <asp:Button ID="btn_GlEntryDelete" runat="server" class="btn btn-primary" Text="Delete GL"
                                                OnClick="btn_GlEntryDelete_Click" OnClientClick="return DelConfirmation()" />
                                            <%} %>
                                        </td>
                                    </tr>
                                </table>
                            </asp:Panel>

                        </div>
                        <!-- /.modal-dialog -->

                    </div>

                    <!-- /.modal -->
                </div>

                <!-- confirmation_glentry-modal -->
                <div id="confirmation-glentry-modal-xl" class="modal fade modal-full" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
                    <button aria-label="" type="button" class="close px-2" data-dismiss="modal" aria-hidden="true">
                        <span aria-hidden="true">×</span>
                    </button>
                    <div class="modal-dialog modal-dialog-centered" role="document">
                        <div class="modal-content">
                            <div class="modal-body text-center">
                                <table border="0" width="100%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                    <tr>
                                        <td colspan="2" class="tdNormal" align="center">
                                            <asp:Label ID="Label2" runat="server" Text="Are you sure you want to do Manual GL Entry?"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" class="tdNormal">&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" class="tdNormal" align="center">
                                            <asp:Button ID="btn_confirm_ok_glentry" runat="server" Text="OK" CssClass="btn btn-primary" OnClick="btn_confirm_ok_glentry_Click" />
                                            <asp:Button ID="btn_confirm_cancel_glentry" runat="server" Text="Cancel" CssClass="btn btn-primary" OnClick="btn_confirm_cancel_glentry_Click" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- small modal -->

                <!-- confirmation_recon-modal -->
                <div id="confirmation_recon-modal-xl" class="modal fade modal-full" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
                    <button aria-label="" type="button" class="close px-2" data-dismiss="modal" aria-hidden="true">
                        <span aria-hidden="true">×</span>
                    </button>
                    <div class="modal-dialog modal-dialog-centered" role="document">
                        <div class="modal-content">
                            <div class="modal-body text-center">
                                <table border="0" width="100%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                    <tr>
                                        <td colspan="2" class="tdNormal" align="center">
                                            <asp:Label ID="Label1" runat="server" Text="Are you sure you want to Reconcile?"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" class="tdNormal">&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" class="tdNormal" align="center">
                                            <asp:Button ID="btn_conf_ok" runat="server" Text="OK" CssClass="btn btn-primary" OnClick="btn_conf_ok_Click" />
                                            <asp:Button ID="btn_conf_cancel" runat="server" Text="Cancel" CssClass="btn btn-primary" OnClick="btn_conf_cancel_Click" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- small modal -->



                <!-- ManualGlEntry -->
                <div class="row">
                    <div class="modal fade" id="ManualGlEntry-modal-xl">

                        <div class="modal-dialog modal-xl" style="max-width: max-content;">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <h4 class="modal-title">Manual GL Entry</h4>
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                        <span aria-hidden="true">&times;</span>
                                    </button>
                                </div>
                                <div class="modal-body">

                                    <div class="card-body">

                                        <table border="0" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">ATM No
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="txtTerminalID" runat="server" class="form-control" MaxLength="8"></asp:TextBox>
                                                    </div>
                                                </td>
                                                <td class="tdNormal" style="width: 10%"></td>
                                                <td class="tdNormal" style="width: 15%">Retract
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="txtRetract" runat="server" class="form-control" MaxLength="14"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">Replenishment Date
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <div class="input-group date" id="dtReplDate" data-target-input="nearest">
                                                            <asp:TextBox ID="TextBox2" data-target="#dtReplDate" runat="server" class="form-control datetimepicker-input"></asp:TextBox>
                                                            <div class="input-group-append" data-target="#dtReplDate" data-toggle="datetimepicker">
                                                                <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </td>
                                                <td class="tdNormal" style="width: 10%"></td>
                                                <td class="tdNormal" style="width: 15%">Replenishment Time
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <%--<div class="form-group">
                                    <asp:TextBox ID="TextBox4" runat="server" class="form-control" MaxLength="8"></asp:TextBox>
                                </div>--%>
                                                    <div class="form-group">
                                                        <asp:TextBox ID="pickmrepltime" runat="server" class="form-control" type="time" name="time"></asp:TextBox>
                                                        <asp:TextBox ID="TextBox4" runat="server" Visible="false" class="form-control" MaxLength="8"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">ATM Type
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:DropDownList ID="ddlReplType" runat="server" class="form-control select">
                                                            <asp:ListItem Value="009">Dispense</asp:ListItem>
                                                            <asp:ListItem Value="030">Deposit</asp:ListItem>
                                                            <asp:ListItem Value="039">Recycle</asp:ListItem>
                                                        </asp:DropDownList>
                                                    </div>
                                                </td>
                                                <td class="tdNormal" style="width: 10%"></td>
                                                <td class="tdNormal" style="width: 15%">Replenishment Currency
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:DropDownList ID="DropDownList2" runat="server" class="form-control select" DataTextField="currency" DataValueField="iso_code"></asp:DropDownList>
                                                        <asp:TextBox ID="txtReplCurrency" runat="server" class="form-control" MaxLength="16" Visible="False"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tdNormal" style="width: 15%">GL Account No
                                                </td>
                                                <td class="tdNormal" style="width: 30%">
                                                    <div class="form-group">
                                                        <asp:TextBox ID="txtGLAccountNo" runat="server" class="form-control" MaxLength="16"></asp:TextBox>
                                                    </div>
                                                </td>
                                                <td class="tdNormal" style="width: 10%"></td>
                                                <td class="tdNormal" style="width: 15%">&nbsp;
                                                </td>
                                                <td class="tdNormal" style="width: 30%">&nbsp;
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="5">
                                                    <fieldset id="Fieldset2">
                                                        <legend id="Legend2">GL</legend>
                                                    </fieldset>
                                                    <table border="0" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                                        <tr>
                                                            <td class="tdNormal" style="width: 15%">Opening Balance
                                                            </td>
                                                            <td class="tdNormal" style="width: 30%">
                                                                <div class="form-group">
                                                                    <asp:TextBox ID="txtOpeningBalance" runat="server" class="form-control" MaxLength="20"></asp:TextBox>
                                                                </div>
                                                            </td>
                                                            <td class="tdNormal" style="width: 10%"></td>
                                                            <td class="tdNormal" style="width: 15%">Closing Balance
                                                            </td>
                                                            <td class="tdNormal" style="width: 30%">
                                                                <div class="form-group">
                                                                    <asp:TextBox ID="txtClosingBalance" runat="server" class="form-control" MaxLength="20"></asp:TextBox>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>

                                    </div>
                                    <!-- /.card-body -->


                                </div>
                                <div class="modal-footer justify-content-between">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                                    <asp:Button ID="Button4" runat="server" Text="Save changes" class="btn btn-primary" OnClick="btnSaveManualGlEntry_Click" />
                                </div>
                            </div>
                            <!-- /.modal-content -->
                        </div>
                        <!-- /.modal-dialog -->

                    </div>

                    <!-- /.modal -->
                </div>















            </div>
            <!-- /.container-fluid -->
        </section>
        <!-- /.content -->
    </div>
	<!-- Toastr -->
	<!-- jQuery -->
	<script src="../plugins/jquery/jquery.min.js"></script>
	<!-- Bootstrap 4 -->
	<script src="../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
	<!-- SweetAlert2 -->
	<script src="../plugins/sweetalert2/sweetalert2.min.js"></script>
	<!-- Toastr -->
	<script src="../plugins/toastr/toastr.min.js"></script>
	<!-- AdminLTE App -->
	<script src=".../dist/js/adminlte.min.js"></script>
	<!-- AdminLTE for demo purposes -->
	<script src="../plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
	<script src="../plugins/datatables/jquery.dataTables.min.js"></script>
	<script src="../plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
	<script src="../plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
	<script src="../plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
	<script src="../plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
	<script src="../plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
	<script src="../plugins/jszip/jszip.min.js"></script>
	<script src="../plugins/pdfmake/pdfmake.min.js"></script>
	<script src="../plugins/pdfmake/vfs_fonts.js"></script>
	<script src="../plugins/datatables-buttons/js/buttons.html5.min.js"></script>
	<script src="../plugins/datatables-buttons/js/buttons.print.min.js"></script>
	<script src="../plugins/datatables-buttons/js/buttons.colVis.min.js"></script>
    <script src="../plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
	<!-- AdminLTE App -->
	<script src="../dist/js/adminlte.min.js"></script>
	<!-- AdminLTE for demo purposes -->
	<script src="../dist/js/demo.js"></script>
    <script src="../plugins/select2/js/select2.full.min.js"></script>
    <!-- Bootstrap4 Duallistbox -->
    <script src="../plugins/bootstrap4-duallistbox/jquery.bootstrap-duallistbox.min.js"></script>
    <!-- InputMask -->
    <script src="../plugins/moment/moment.min.js"></script>
    <script src="../plugins/inputmask/jquery.inputmask.min.js"></script>
    <!-- date-range-picker -->
    <script src="../plugins/daterangepicker/daterangepicker.js"></script>
    <!-- bootstrap color picker -->
    <script src="../plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js"></script>
    <!-- Tempusdominus Bootstrap 4 -->
    <script src="../plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
    <!-- Bootstrap Switch -->
    <script src="../plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
    <!-- BS-Stepper -->
    <script src="../plugins/bs-stepper/js/bs-stepper.min.js"></script>
    <!-- dropzonejs -->
    <script src="../plugins/dropzone/min/dropzone.min.js"></script>
    <!-- AdminLTE App -->
	<script>

	    $(function () {

	        $('#ContentPlaceHolder1_GridView1').DataTable({
	            "responsive": true, "lengthChange": false, "autoWidth": false,
	            "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
	        }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');

	        //Date picker
	        $('#reservationdate').daterangepicker();
//	        $('#ctl00_ContentPlaceHolder1_reservation').daterangepicker()({
//	            format: 'DD/MM/YYYY - DD/MM/YYYY'
//	        });
	        $('#ctl00_ContentPlaceHolder1_txtDate').daterangepicker({
	            locale: {
                    format: 'DD-MM-YYYY'
	            }
            })

            $('#prev_replenishmentdate').datetimepicker({
                //format: 'L'
                format: 'DD-MM-YYYY'
            });

            $('#replenishmentdate').datetimepicker({
                //format: 'L'
                format: 'DD-MM-YYYY'
                //format: 'YYMMDD'
            });

            $('#aprevrepldate').datetimepicker({
                //format: 'L'
                format: 'DD-MM-YYYY'
            });

            $('#arepldate').datetimepicker({
                //format: 'L'
                format: 'DD-MM-YYYY'
            });

            $('#adateB24PrevDate').datetimepicker({
                //format: 'L'
                format: 'DD-MM-YYYY'
            });

            $('#adateB24Date').datetimepicker({
                //format: 'L'
                format: 'DD-MM-YYYY'
            });

            $('#dtReplDate').datetimepicker({
                //format: 'L'
                format: 'DD-MM-YYYY'
            });

            $('#arecorddate').datetimepicker({
                //format: 'L'
                format: 'DD-MM-YYYY'
            });

            $('#auserdate').datetimepicker({
                //format: 'L'
                format: 'DD-MM-YYYY'
            });
	        
	        //		    $('#reservationdate').datetimepicker({
	        //		        format: 'DD/MM/YYYY'
	        //		    });

	        //        $('#ContentPlaceHolder1_GridView1').DataTable({
	        //            "responsive": true, "lengthChange": false, "autoWidth": false,
	        //            "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
	        //        }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');

	        //        $('#ContentPlaceHolder1_gvChannel').DataTable({
	        //            "responsive": true, "lengthChange": false, "autoWidth": false,
	        //            "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
	        //        }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');

	        //        $('#ContentPlaceHolder1_gvEJ').DataTable({
	        //            "responsive": true, "lengthChange": false, "autoWidth": false,
	        //            "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
	        //        }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
	    });
    </script>
</asp:Content>