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

<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">
    <!-- Radio Button style -->
    <link rel="stylesheet" href="../css/custom_radio1.css">
    <script type="text/javascript">

        function PrintContent(ctrl) {
            var DocumentContainer = document.getElementById(ctrl);
            var WindowObject = window.open('', "TrackHistoryData",
                              "width=800,height=300,top=250,left=345,toolbars=no,scrollbars=no,status=no,resizable=no");
            WindowObject.document.write(DocumentContainer.innerHTML);
            WindowObject.document.close();
            WindowObject.focus();
            WindowObject.print();
            WindowObject.close();
        }

        function CheckAll(Checkbox) {

            var GridView1 = document.getElementById("<%=GridView1.ClientID %>");
            for (i = 1; i < GridView1.rows.length; i++) {
                GridView1.rows[i].cells[0].getElementsByTagName("INPUT")[0].checked = Checkbox.checked;
            }
        } 
    </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>GL Posting</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">Settlement and Posting</li>
			  <li class="breadcrumb-item active">GL Posting</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-md-12 mb-12">
                          <%--<asp:Label ID="lbltab" runat="server" Visible="false"></asp:Label>
                          <asp:Label ID="lbldate" runat="server" Visible="false"></asp:Label>--%>
                          <div id="Tabs" role="tabpanel">
                          <ul class="nav nav-tabs mb-3" id="myTab" role="tablist">
                              <li class="nav-item">
                                  <a class="nav-link btn-info active" id="CH_tab" data-toggle="tab" runat="server" href="#channels" role="tab" aria-controls="channels" aria-selected="true">Channels</a>
                                  <%--<asp:LinkButton ID="CH_tab" runat="server" CssClass="nav-link" role="tab" data-toggle="tab" href="#channels" OnClick="CH_tab_Click">Channels</asp:LinkButton>--%>
                              </li>
                              <li>&nbsp;</li>
                              <li class="nav-item">
                                  <a class="nav-link btn-info" id="ATM_tab" data-toggle="tab" href="#atm" role="tab" aria-controls="atm" aria-selected="false">ATM</a>
                                  <%--<asp:LinkButton ID="ATM_tab" runat="server" CssClass="nav-link" role="tab" data-toggle="tab" href="#atm" OnClick="ATM_tab_Click">ATM</asp:LinkButton>--%>
                              </li>
                              <li>&nbsp;</li>
                              <li class="nav-item">
                                  <a class="nav-link btn-info" id="CL_tab" data-toggle="tab" href="#claims" role="tab" aria-controls="claims" aria-selected="false">Claims</a>
                                  <%--<asp:LinkButton ID="CL_tab" runat="server" CssClass="nav-link" role="tab" data-toggle="tab" href="#claims" OnClick="CL_tab_Click">Claims</asp:LinkButton>--%>
                              </li>
                              <li>&nbsp;</li>
                              <li class="nav-item">
                                  <a class="nav-link btn-info" id="CS_tab" data-toggle="tab" href="#cardscheme" role="tab" aria-controls="cardscheme" aria-selected="false">Card Scheme Settlement</a>
                                  <%--<asp:LinkButton ID="CS_tab" runat="server" CssClass="nav-link" role="tab" data-toggle="tab" href="#cardscheme" OnClick="CS_tab_Click">Card Scheme Settlement</asp:LinkButton>--%>
                              </li>
                          </ul>
                          <div class="tab-content" id="myTabContent">
                              <asp:TextBox ID="txtsadate" runat="server" Visible="false"></asp:TextBox>
                              <div class="tab-pane fade show active" id="channels" role="tabpanel" aria-labelledby="CH_tab">
                                  <div class="row">
                                      <div class="col-sm-4">
                                          <div class="form-group">
                                              <label>Channel <span style="color: Red">*</span></label>
                                              <asp:DropDownList ID="ddlChannels" runat="server" DataTextField="channel_name" DataValueField="rc_code" class="form-control select" AutoPostBack="True" OnSelectedIndexChanged="ddlChannels_SelectedIndexChanged">
                                              </asp:DropDownList>
                                          </div>
                                      </div>
                                      <div class="col-sm-4">
                                          <div class="form-group">
                                              <label>Account Type</label>
                                              <asp:DropDownList ID="ddlAccType" runat="server" DataTextField="matching" DataValueField="match_code" class="form-control select">
                                              </asp:DropDownList>
                                          </div>
                                      </div>
                                      <div class="col-sm-4">
                                          <div class="form-group">
                                              <label>Date <span style="color: Red">*</span></label>
                                              <div class="input-group date" id="scdate" data-target-input="nearest">
                                                  <asp:TextBox ID="txtscdate" data-target="#scdate" runat="server" class="form-control datetimepicker-input"></asp:TextBox>
                                                  <div class="input-group-append" data-target="#scdate" data-toggle="datetimepicker">
                                                      <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                                                  </div>
                                              </div>
                                          </div>
                                      </div>
                                      <div class="col-sm-12">
                                          <div class="form-group">
                                              <asp:CheckBox ID="CH_chkApproved" runat="server" Checked="true" />
                                              <label>Approved</label>&nbsp;&nbsp;&nbsp;

                                          <asp:CheckBox ID="CH_chkPosted" runat="server" />
                                              <label>Posted</label>&nbsp;&nbsp;&nbsp;

                                          <asp:CheckBox ID="CH_chkDeclined" runat="server" />
                                              <label>Declined</label>
                                          </div>
                                      </div>
                                  </div>
                              </div>
                              <div class="tab-pane fade" id="atm" role="tabpanel" aria-labelledby="ATM_tab">
                                  <div class="row">
                                      <div class="col-sm-3">
                                          <div class="form-group">
                                              <label>Branch</label>
                                              <asp:DropDownList ID="ddlBranch" runat="server" DataTextField="branch_name" DataValueField="branch_code" class="form-control select">
                                              </asp:DropDownList>
                                          </div>
                                      </div>
                                      <div class="col-sm-3">
                                          <div class="form-group">
                                              <label>ATM Type</label>
                                              <asp:DropDownList ID="ddlATMType" runat="server" DataTextField="type_name" DataValueField="type_code" class="form-control select">
                                              </asp:DropDownList>
                                          </div>
                                      </div>
                                      <div class="col-sm-3">
                                          <div class="form-group">
                                              <label>ATM No</label>
                                              <asp:TextBox ID="txtATMnumber" runat="server" class="form-control" MaxLength="4"></asp:TextBox>
                                          </div>
                                      </div>
                                      <div class="col-sm-3">
                                          <div class="form-group">
                                              <label>Replenishment Date <span style="color: Red">*</span></label>
                                              <div class="input-group date" id="srdate" data-target-input="nearest">
                                                  <asp:TextBox ID="txtsrdate" data-target="#srdate" runat="server" class="form-control datetimepicker-input"></asp:TextBox>
                                                  <div class="input-group-append" data-target="#srdate" data-toggle="datetimepicker">
                                                      <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                                                  </div>
                                              </div>
                                          </div>
                                      </div>
                                      <div class="col-sm-12">
                                          <div class="form-group">
                                              <asp:CheckBox ID="ATM_chkApproved" runat="server" Checked="true" />
                                              <label>Approved</label>&nbsp;&nbsp;&nbsp;

                                          <asp:CheckBox ID="ATM_chkPosted" runat="server" />
                                              <label>Posted</label>&nbsp;&nbsp;&nbsp;

                                          <asp:CheckBox ID="ATM_chkDeclined" runat="server" />
                                              <label>Declined</label>
                                          </div>
                                      </div>
                                  </div>
                              </div>
                              <div class="tab-pane fade" id="claims" role="tabpanel" aria-labelledby="CL_tab">
                                  <div class="row">
                                      <div class="col-sm-3">
                                          <div class="form-group">
                                              <label>Card No</label>
                                              <asp:TextBox ID="txtCardNo" runat="server" class="form-control"></asp:TextBox>
                                          </div>
                                      </div>
                                      <div class="col-sm-3">
                                          <div class="form-group">
                                              <label>Trace ID</label>
                                              <asp:TextBox ID="txtTraceID" runat="server" class="form-control"></asp:TextBox>
                                          </div>
                                      </div>
                                      <div class="col-sm-3">
                                          <div class="form-group">
                                              <label>Claim ID <span style="color: Red">*</span></label>
                                              <asp:TextBox ID="txtClaimID" runat="server" class="form-control"></asp:TextBox>
                                          </div>
                                      </div>
                                      <div class="col-sm-3">
                                          <div class="form-group">
                                              <label>Approved Date <span style="color: Red">*</span></label>
                                              <div class="input-group date" id="scadate" data-target-input="nearest">
                                                  <asp:TextBox ID="txtscadate" data-target="#scadate" runat="server" class="form-control datetimepicker-input"></asp:TextBox>
                                                  <div class="input-group-append" data-target="#scadate" data-toggle="datetimepicker">
                                                      <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                                                  </div>
                                              </div>
                                          </div>
                                      </div>
                                      <div class="col-sm-6 radio-primary">
                                          <div class="form-group">
                                              <label></label>
                                              <asp:RadioButton ID="rdATMClaim" Text="ATM" GroupName="rd" runat="server" AutoPostBack="False" Checked="True" />
                                              <asp:RadioButton ID="rdPOSClaim" Text="POS" GroupName="rd" runat="server" AutoPostBack="False" />
                                              <asp:RadioButton ID="rdECOMClaim" Text="ECOM" GroupName="rd" runat="server" AutoPostBack="False" />
                                          </div>
                                      </div>
                                      <div class="col-sm-6">
                                          <div class="form-group float-right">
                                              <asp:CheckBox ID="CL_chkApproved" runat="server" Checked="true" />
                                              <label>Approved</label>&nbsp;&nbsp;&nbsp;

                                          <asp:CheckBox ID="CL_chkSamaApproved" runat="server" />
                                              <label>SAMA Approved</label>&nbsp;&nbsp;&nbsp;

                                          <asp:CheckBox ID="CL_chkPosted" runat="server" />
                                              <label>Posted</label>&nbsp;&nbsp;&nbsp;

                                          <asp:CheckBox ID="CL_chkDeclined" runat="server" />
                                              <label>Declined</label>
                                          </div>
                                      </div>
                                  </div>
                              </div>
                              <div class="tab-pane fade" id="cardscheme" role="tabpanel" aria-labelledby="CS_tab">
                                  <div class="row">
                                      <div class="col-sm-3">
                                          <div class="form-group">
                                              <label>Select Card Scheme</label><br />
                                              <asp:DropDownList ID="ddlSCardScheme" runat="server" AutoPostBack="True" class="form-control select" OnSelectedIndexChanged="ddlSCardScheme_SelectedIndexChanged">
                                                <asp:ListItem Value="0">------ Select Card Scheme ------</asp:ListItem>
                                                <asp:ListItem Value="15">Visa</asp:ListItem>
                                                <asp:ListItem Value="12">Amex</asp:ListItem>
                                                <asp:ListItem Value="11">MC Acquirer</asp:ListItem>
                                                <asp:ListItem Value="7">Maestro</asp:ListItem>
                                            </asp:DropDownList>
                                          </div>
                                      </div>
                                      <div id="PR_Product" class="col-sm-3" runat="server" visible="false">
                                          <div class="form-group">
                                              <label>Product</label>
                                              <asp:DropDownList ID="ddlProducts" runat="server" DataTextField="PRODUCT_NAME" DataValueField="ID" AutoPostBack="true" class="form-control select" OnSelectedIndexChanged="ddlProducts_SelectedIndexChanged">
                                              </asp:DropDownList>
                                          </div>
                                      </div>
                                      <% if (Helper.IsMultiCurrencyProduct_CS(ddlProducts.SelectedValue))
                                          {  %>
                                      <div class="col-sm-3">
                                          <div class="form-group">
                                              <label>Select Currency</label>
                                              <asp:DropDownList ID="ddlCurrency" runat="server" DataTextField="Curr_Name" DataValueField="CardScheme_Curr_ID" class="form-control select">
                                              </asp:DropDownList>
                                          </div>
                                      </div>
                                      <%}
                                      %>
                                      <div class="col-sm-3">
                                          <div class="form-group">
                                              <label>Settlement Date <span style="color: Red">*</span></label>
                                              <div class="input-group date" id="scsdate" data-target-input="nearest">
                                                  <asp:TextBox ID="txtscsdate" data-target="#scsdate" runat="server" class="form-control datetimepicker-input"></asp:TextBox>
                                                  <div class="input-group-append" data-target="#scsdate" data-toggle="datetimepicker">
                                                      <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                                                  </div>
                                              </div>
                                          </div>
                                      </div>
                                      <div class="col-sm-12">
                                          <div class="form-group">
                                              <asp:CheckBox ID="CS_chkApproved" runat="server" Checked="true" />
                                              <label>Approved</label>&nbsp;&nbsp;&nbsp;

                                          <asp:CheckBox ID="CS_chkPosted" runat="server" />
                                              <label>Posted</label>&nbsp;&nbsp;&nbsp;

                                          <asp:CheckBox ID="CS_chkDeclined" runat="server" />
                                              <label>Declined</label>
                                          </div>
                                      </div>
                                      
                                  </div>
                              </div>
                          </div></div>
                          <asp:HiddenField ID="TabName" runat="server" />
                      </div>
                  </div>
                  <div class="row">
                      <div class="col-12" style="text-align: center; margin-top: 1%"; margin-bottom: 1%">
                          <asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="btn btn-primary btn-l" OnClick="btnSearch_Click" OnClientClick="$('#cover-spin').show();" />
                          <asp:Button ID="btnPostSelClaim" runat="server" Text="Post All" CssClass="btn btn-primary btn-l" OnClick="btnSelectedApproved_Click" />
                      </div>
                  </div>
              </div>
              <!-- /.card-body -->
            </div>
		<!-- Default box -->

            <div id="GL_Entities" 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>
                        <b>GL Entities</b>
                    </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">
                    <div style="width: 100%; display: inline-block; vertical-align: top; overflow-x: auto;">
                        <asp:GridView ID="GridView1" class="table table-striped table-bordered table-sm" runat="server" AutoGenerateColumns="False" OnRowCommand="GridView1_RowCommand" OnPreRender="GridView1_PreRender" DataKeyNames="gpe_code"
                            EmptyDataText="There are no results" OnRowCreated="GridView1_RowCreated" OnRowDataBound="GridView1_RowDataBound">
                            <Columns>
                                <asp:TemplateField HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                    <HeaderStyle />
                                    <HeaderTemplate>
                                        <asp:CheckBox ID="chkAll" runat="server" onclick="CheckAll(this)" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkRow" runat="server" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="channel" HeaderText="Channel" />
                                <asp:BoundField DataField="event" HeaderText="Event" />
                                <asp:BoundField DataField="acct_number" HeaderText="Account&nbsp;Number" />
                                <asp:BoundField DataField="grid_desc" HeaderText="Gl&nbsp;Desc" />
                                <asp:BoundField DataField="grid_desc" HeaderText="Gl&nbsp;Desc" />
                                <asp:BoundField DataField="txn_type" HeaderText="Txn&nbsp;Type" />
                                <asp:BoundField DataField="posted" HeaderText="Posted" />
                                <asp:BoundField DataField="approved" HeaderText="Approved" />
                                <asp:BoundField DataField="declined" HeaderText="Declined" />
                                <asp:BoundField DataField="gl_tran_amt" HeaderText="Amount" />
                                <asp:BoundField DataField="recon_run_date" HeaderText="Recon&nbsp;Run&nbsp;Date" />
                                <asp:BoundField DataField="recon_run_time" HeaderText="Recon&nbsp;Run&nbsp;Time" />
                                <asp:BoundField DataField="posting_for_date" HeaderText="Date" />
                                <asp:TemplateField HeaderText="Actions">
                                    <ItemTemplate>
                                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                            Action
                                        </button>
                                        <div class="dropdown-menu">
                                            <a class="dropdown-item" href="#">
                                                <asp:Button ID="Approve" CssClass="btn btn-outline-success btn-block btn-sm" runat="server" Text="Approve" CommandName="a" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" /></a>
                                            <a class="dropdown-item" href="#">
                                                <asp:Button ID="View" CssClass="btn btn-outline-info btn-block btn-sm" runat="server" Text="View" CommandName="v" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" /></a>
                                            <%--<a class="dropdown-item" href="#">
                                                <asp:Button ID="Reset" CssClass="btn btn-outline-secondary btn-block btn-sm" runat="server" Text="Reset" CommandName="r" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" /></a>--%>
                                            <a class="dropdown-item" href="#">
                                                <asp:Button ID="Decline" CssClass="btn btn-outline-warning btn-block btn-sm" runat="server" Text="Decline" CommandName="d" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" /></a>
                                            <a class="dropdown-item" href="#">
                                                <asp:Button ID="Post" CssClass="btn btn-outline-dark btn-block btn-sm" runat="server" Text="Post" CommandName="p" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" /></a>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="record_date" HeaderText="" />
                                <asp:BoundField DataField="posting_for_date" HeaderText="" />
                                <asp:BoundField DataField="post_date" HeaderText="" />
                                <asp:BoundField DataField="approve_date" HeaderText="" />
                                <asp:BoundField DataField="file_number" HeaderText="" />
                                <asp:BoundField DataField="re_code" HeaderText="" />
                                <asp:BoundField DataField="rc_code" HeaderText="" />
                                <asp:BoundField DataField="decline_date" HeaderText="" />
                                <asp:BoundField DataField="journal_ref" HeaderText="" />
                                <asp:BoundField DataField="posted_by_user" HeaderText="" />
                                <asp:BoundField DataField="approved_by_user" HeaderText="" />
                                <asp:BoundField DataField="declined_by_user" HeaderText="" />
                                <asp:BoundField DataField="settle_account" HeaderText="" />
                                <asp:BoundField DataField="short_name" HeaderText="" />

                                <asp:BoundField DataField="gl_desc" HeaderText="" />
                                <asp:BoundField DataField="grid_desc" HeaderText="" />
                                <asp:BoundField DataField="approved_by" HeaderText="" />
                                <asp:BoundField DataField="Card_Number" HeaderText="Card&nbsp;Number" />
                                <asp:BoundField DataField="uniq_ID" HeaderText="" />
                                <asp:BoundField DataField="mw_resp" HeaderText="&nbsp;Resp" />
                                <asp:BoundField DataField="SAR_Amt" HeaderText="SAR&nbsp;Amount" />

                                <asp:BoundField DataField="ACCT_NUM_CRNCY" HeaderText="Acct&nbsp;Num&nbsp;Curr" />
                                <asp:BoundField DataField="CASH_ACCT_CRNCY" HeaderText="Cash&nbsp;Acct&nbsp;Curr" />
                            </Columns>
                        </asp:GridView>
                    </div>
                    <div class="row" style="margin-left: 1%; margin-top: 1%; margin-bottom: 1%">
                        <div style="margin-top: 3px;">
                            <asp:Label ID="LGTP" runat="server" Text="Go To Page"></asp:Label>&nbsp;: &nbsp;
                        </div>
                        <asp:DropDownList ID="ddlPages" runat="server" class="form-control select2" AutoPostBack="True" Width="7%" Height="6%" OnSelectedIndexChanged="ddlPages_SelectedIndexChanged"></asp:DropDownList>
                    </div>
                    <div class="row" style="text-align: center; margin-bottom: 2%">
                        <asp:Button ID="btnApproveAll" runat="server" Text="Approve All" Visible="false" CssClass="btn btn-primary btn-l" OnClick="btnApproveAll_Click" />
                        <asp:Button ID="btnPostAll" runat="server" Text="Post All" CssClass="btn btn-primary btn-l" OnClick="btnPostAll_Click" Visible="false" />
                        <asp:Button ID="btnGenReport" runat="server" Text="Gateway Report" CssClass="btn btn-primary btn-l" OnClick="btnGenReport_Click" Visible="false" />
                    </div>
                </div>

                <!-- /.card-body -->
            </div>
        <div class="row">
			<div class="modal fade" id="modal-xl">
		   
				<div class="modal-dialog modal-xl">
					<div class="modal-content">
					<div class="modal-header">
						<h4 class="modal-title">Transaction 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" id="printtable" class="add_ItemTB">
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            Record date
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="Label1" 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="Label2" 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="Label3" 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="Label4" runat="server" Text="" ForeColor="#3399FF"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr runat="server" id="cashaccrow">
                                        <td class="tdNormal" style="width: 15%">
                                            Cash Account
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="lblCashAcc" runat="server" Text="" ForeColor="#3399FF"></asp:Label>
                                        </td>
                                        <td class="tdNormal" style="width: 10%">
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            Transaction type
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="Label15" runat="server" Text="" ForeColor="#3399FF"></asp:Label>
                                        </td>
                                        <td class="tdNormal" style="width: 10%">
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                            Grid Desc
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="Label21" runat="server" Text="" ForeColor="#3399FF"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            Posted
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="Label5" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                        </td>
                                        <td class="tdNormal" style="width: 10%">
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                            Post date
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="Label6" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            Posted By
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="Label13" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                        </td>
                                        <td class="tdNormal" style="width: 10%">
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            Approved
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="Label7" 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="Label8" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            Approved By
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="Label18" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                        </td>
                                        <td class="tdNormal" style="width: 10%">
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            Declined
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="Label16" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                        </td>
                                        <td class="tdNormal" style="width: 10%">
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                            Declined date
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="Label17" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            Declined By
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="Label19" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                        </td>
                                        <td class="tdNormal" style="width: 10%">
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                            File number
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="Label10" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            Amount
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="Label9" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                        </td>
                                        <td class="tdNormal" style="width: 10%">
                                        </td>
                                          <td class="tdNormal" style="width: 15%">
                                              Settlement Amount</td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="lblSarAmount" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                        </td>
                                       
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            Event
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="Label11" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                        </td>
                                        <td class="tdNormal" style="width: 10%">
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                            Channel
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="Label12" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            Journal
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="Label14" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                        </td>
                                        <td class="tdNormal" style="width: 10%">
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                            GL Desc
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="Label20" runat="server" Text="" ForeColor="#3399FF"> </asp:Label>
                                        </td>
                                    </tr>
                                </table>
                                <table border="0" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                    <tr>
                                        <td class="tdNormal" style="width: 10%">
                                            Posting Response:
                                            <td class="tdNormal" style="width: 90%">
                                                <asp:Label ID="lbl_MW_Resp" AutoSize="false" runat="server" Text="" class="fieldError"> </asp:Label>
                                            </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>
					</div>
					</div>
					<!-- /.modal-content -->
				</div>
				<!-- /.modal-dialog -->
			  
				</div>
                
                
				<!-- /.modal -->
		</div>

        <div class="row">
			<div class="modal fade" id="modal-xl1">
		   
				<div class="modal-dialog modal-xl">
					<div class="modal-content">
					<div class="modal-header">
						<h4 class="modal-title">Posting 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_ItemTB">
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            Transaction type
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:Label ID="lblGLType" runat="server" Text=""></asp:Label>
                                        </td>
                                        <td class="tdNormal" style="width: 10%">
                                            &nbsp;
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                            Amount
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:TextBox ID="txtAmount" ReadOnly="true" runat="server" Width="100%" class="fieldNormal"></asp:TextBox>
                                        </td>
                                    </tr>
                                     <tr>
                                        <td class="tdNormal" style="width: 15%">
                                         
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                          
                                        </td>
                                        <td class="tdNormal" style="width: 10%">
                                            &nbsp;
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                            Settlement Amount
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:TextBox ID="txtAmountSAR" ReadOnly="true" runat="server" Width="100%" class="fieldNormal"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            Account Number
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:TextBox ID="txtAccount" ReadOnly="true" runat="server" Width="100%" class="fieldNormal"></asp:TextBox>
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            Settlement Account
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtSettlementAcc" ReadOnly="true" runat="server" Width="100%" class="fieldNormal"></asp:TextBox>
                                        </td>
                                    </tr>
                                         </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                           Account Currency (Dr)
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:TextBox ID="txtDrCurrency" ReadOnly="true" runat="server" Width="100%" class="fieldNormal"></asp:TextBox>
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                          Settlment Currency(Cr)
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtCrCuurency" ReadOnly="true" runat="server" Width="100%" class="fieldNormal"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            <asp:Label ID="lbl_Card" runat="server" Text=" Card Number"></asp:Label>
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:TextBox ID="txtPostingCardNumber" ReadOnly="true" runat="server" Width="100%"
                                                class="fieldNormal"></asp:TextBox>
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            GL Description
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtGLDesc" ReadOnly="true" runat="server" Width="100%" class="fieldNormal"></asp:TextBox>
                                        </td>
                                    </tr>
                                </table>
								  
						</div>
						<!-- /.card-body -->

							  
					</div>
					<div class="modal-footer justify-content-between">
                    <asp:Button ID="btnSavePost" runat="server" class="btn btn-primary btn-l" OnClick="btnSavePost_Click" Text="Save" />
						<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
					</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
		    //$('#ContentPlaceHolder1_TextBox1').daterangepicker()

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

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

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

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

            var tabName = $("[id*=TabName]").val() != "" ? $("[id*=TabName]").val() : "channels";
            $('#Tabs a[href="#' + tabName + '"]').tab('show');
            $("#Tabs a").click(function () {
                $("[id*=TabName]").val($(this).attr("href").replace("#", ""));
                $("table[id$='GridView1']").html("");
                $("div[id$='GL_Entities']").hide();
            });

            <%--$(function () {
                $('#<%= ddlSCardScheme.ClientID %>').change(function () {
                    $("#cover-spin").show();
                });--%>

            $('#<%= ddlSCardScheme.ClientID %>' + ',#<%= ddlProducts.ClientID %>' + ',#<%= ddlChannels.ClientID %>').change(function () {
                $("#cover-spin").show();
            });

            $('a').on("click", function () {
                    var modal = $('<div />');
                    modal.addClass("modal");
                    $('body').append(modal);
                    var loading = $("#cover-spin");
                    loading.show();
                    var top = Math.max($(window).height() / 2 - loading[0].offsetHeight / 2, 0);
                    var left = Math.max($(window).width() / 2 - loading[0].offsetWidth / 2, 0);
                    loading.css({ top: top, left: left });
                    setTimeout(function () {
                        loading.hide();
                    }, 800);
            });

		});
    </script>
</asp:Content>

