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

<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">
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {

            $('#<%=txt_approve_suggestedAmount.ClientID%>').focusout(function () {


                var SuggestAmount = $(this).val();

                $('#<%=lblGlAmt1.ClientID%>').text(SuggestAmount);


            });
            $('#<%=txtCommissionFee.ClientID%>').focusout(function () {


                var CommissionFee = parseFloat($(this).val()).toFixed(2);
                $(this).val(CommissionFee);

                var SuggestAmount = parseFloat($('#<%=txt_approve_suggestedAmount.ClientID%>').val());
                // one of the variable should be of type decimal
                //if (CommissionFee > SuggestAmount || CommissionFee > 40 || CommissionFee < 0.001 || isNaN(CommissionFee)) {
                // alert('Commission Amount should be less than suggested amount-It cannot be blank or zero- Maximam CommissionAmount is 40');
                if (CommissionFee > SuggestAmount || CommissionFee > 160 || CommissionFee < 0.001 || isNaN(CommissionFee)) {
                    alert('Commission Amount should be less than suggested amount-It cannot be blank or zero- Maximam CommissionAmount is 160');

                    $(this).val(0);
                    return;
                }


                var VAT_Rate = $("#<%=lblVatRate.ClientID %>").text();
                var VAT = (CommissionFee * (VAT_Rate / 100)).toFixed(2);

                $('#<%=lblGlAmt2.ClientID%>').text(SuggestAmount - CommissionFee - VAT);
                $('#<%=lblGlAmt3.ClientID%>').text(CommissionFee);
                $('#<%=lblVAT.ClientID%>').text(VAT);
            });

            $('#<%=btnSavePPPMS.ClientID%>').click(function () {
                // alert("The paragraph was clicked.");
                var extRefNo = $("#<%=txtExtRefNo.ClientID %>").val();
                var claimID = $("#<%=lblClaimID.ClientID %>").text();

                var dataValue = "{ claim_id:'" + claimID + "'  , Ext_Ref_No: '" + extRefNo + "' }";

                $.ajax({
                    type: "POST",
                    url: "InvestigateClaim.aspx/Update_Ext_Ref_No",
                    data: dataValue,
                    contentType: 'application/json; charset=utf-8',
                    dataType: 'json',
                    error: function (XMLHttpRequest, textStatus, errorThrown) {
                        alert("Request: " + XMLHttpRequest.toString() + "\n\nStatus: " + textStatus + "\n\nError: " + errorThrown);
                    },
                    success: function (result) {
                        alert(result.d);
                    }
                });
                return false;
            });
        });


        function popUp(strOpen) {
            strOpen = "slip.aspx?clID=" + strOpen;
            window.open(strOpen, 'popWindow', 'toolbar=0,scrollbar=0,location=0,statusbar=1,menubar=0,resizable=0,width=600,height=250,left=300,top=200');

        }

        function AcceptClosingConfirmation() {
            var userSelection;

            userSelection = confirm("Are you sure you want to Accept the claim?");

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

            userSelection = confirm("Are you sure you want to Reject the claim?");

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

            userSelection = confirm("Are you sure you want to continue with changes?");

            if (userSelection) {
                return true;
            } else {
                return false;
            }
        }
        function show1() {
            document.getElementById('td1').className = 'on';
            document.getElementById('td2').className = 'onEnd';
            document.getElementById('td3').className = 'off';
            document.getElementById('td4').className = 'offEndLast';
            document.getElementById('tbl1').style.display = 'block';
            document.getElementById('tbl2').style.display = 'none';
        }
        function show2() {
            document.getElementById('td1').className = 'off';
            document.getElementById('td2').className = 'offEnd';
            document.getElementById('td3').className = 'on';
            document.getElementById('td4').className = 'onEndLast';
            document.getElementById('tbl1').style.display = 'none';
            document.getElementById('tbl2').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>Investigate Claim</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">Claims</li>
			  <li class="breadcrumb-item active">Investigate Claim</li>
			</ol>
		  </div>
		</div>
	  </div><!-- /.container-fluid -->
	</section>
		<!-- /.content-header -->
		<!-- Main content -->
	<section class="content">
	    <div class="container-fluid">
        <div class="card card-info color-palette-box">
              <div class="card-header">
                <h3 class="card-title">Claim Details</h3>
              </div>
              <!-- /.card-header -->
              <div class="card-body">
                  <div class="row">

                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Card Number</label>
                              <asp:Label ID="lblCardNo" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Transaction Date</label>
                              <asp:Label ID="lblTxnDate" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Terminal ID</label>
                              <asp:Label ID="lblTermID" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-3">
                          <div class="form-group">
                              <label>Amount</label>
                              <asp:Label ID="lblAmount" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-3">
                          <div class="form-group">
                              <label>Settlement Amount</label>
                              <asp:Label ID="lblSettlementAmt" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Reference No</label>
                              <asp:Label ID="lblReference" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Status</label>
                              <asp:Label ID="lblStatus" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Type</label>
                              <asp:Label ID="lblProduct" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Duration</label>
                              <asp:Label ID="lblDuration" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Sama Status</label>
                              <asp:Label ID="lblSamaStatus" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Claim ID</label><br />
                              <asp:HyperLink ID="lblClaimID" NavigateUrl="#" class="form-control" runat="server" />
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>CPS Type</label>
                              <asp:Label ID="lblCPSType" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Suggested Amount</label>
                              <asp:Label ID="lblSugAmt" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>CPS File Name</label>
                              <asp:Label ID="lblCPSFile" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Message</label>
                              <asp:Label ID="lblClMessage" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Issuer Bank</label>
                              <asp:Label ID="lbl_issuerBank" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Acquirer Bank</label>
                              <asp:Label ID="lbl_acquirerBank" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Last Modified By</label>
                              <asp:Label ID="lblModifiedBy" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>SAMA Claim ID</label>
                              <asp:Label ID="lbl_sama_claim_id" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>New RRN</label>
                              <asp:Label ID="lblNEW_RRN" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Credit Issuer</label>
                              <asp:Label ID="lblCREDIT_ISSUER" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Credit Aquirer</label>
                              <asp:Label ID="lblCREDIT_ACQUIRER" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Debit Issuer</label>
                              <asp:Label ID="lblDEBIT_ISSUER" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Debit Acquirer</label>
                              <asp:Label ID="lblDEBIT_ACQUIRER" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>Originator Id</label>
                              <asp:Label ID="LblOriginator" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label><asp:Label ID="lblNarrrFromAcct" runat="server"></asp:Label></label>
                              <asp:Label ID="lblFromAcctDesc" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label><asp:Label ID="lblNarrrToAcct" runat="server"></asp:Label></label>
                              <asp:Label ID="lblToAcctDesc" runat="server" class="form-control"></asp:Label>
                              <asp:Label ID="lbl_Re_Code" runat="server" Visible="false" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <% if (lblValFromAcct_2.Text.Length > 1)
                          { %>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>
                                  <asp:Label ID="lblNarrrFromAcct_2" runat="server"></asp:Label></label>
                              <asp:Label ID="lblValFromAcct_2" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>
                                  <asp:Label ID="lblNarrrToAcct_2" runat="server"></asp:Label></label>
                              <asp:Label ID="lblValToAcct_2" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <%} %>
                      <% if (lblValFromAcct_3.Text.Length > 1)
                          { %>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>
                                  <asp:Label ID="lblNarrrFromAcct_3" runat="server"></asp:Label></label>
                              <asp:Label ID="lblValFromAcct_3" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>
                                  <asp:Label ID="lblNarrrToAcct_3" runat="server"></asp:Label></label>
                              <asp:Label ID="lblValToAcct_3" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <%} %>
                      <div class="col-sm-12">
                          <div class="form-group">
                              <label>Claim Note</label>
                              <asp:TextBox ID="txtNote" runat="server" Rows="4" class="form-control" TextMode="MultiLine"></asp:TextBox>
                          </div>
                      </div>

                      <% if (lblCardNo.Text.Trim().Substring(0, 6) == Helper.getParamByID("302"))
                          {
                      %>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>PPMS Refercene No</label>
                              <asp:Label ID="txtExtRefNo" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-6">
                          <div class="form-group">
                              <label>PPMS Outward File ID</label>
                              <asp:Label ID="lblExtOutwardFileID" runat="server" class="form-control"></asp:Label>
                          </div>
                      </div>
                      <div class="col-sm-12" style="margin-top:1%; margin-bottom:1%;text-align:center;">
                          <asp:Button ID="btnSavePPPMS" runat="server" Text="Save PPMS" CssClass="btn btn-primary btn-l" />
                      </div>
                      <%} %>
                  </div>
                  <div class="row">
                      <div class="col-12" style="text-align: center">
                          <asp:Button ID="btnPaySlip" runat="server" Text="Request Pay-Slip" OnClick="btnPaySlip_Click" OnClientClick="javascript:return popUp(clID);" CssClass="btn btn-primary btn-l" />
                      </div>
                  </div>

                  <%--<div class="row">
			        <div class="col-12">
                    <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 class="card card-info color-palette-box">

                <div class="col-md-12 mb-12">
                    <div class="card-body">
                        <ul class="nav nav-tabs mb-3" id="myTab" role="tablist">
                            <li class="nav-item">
                                <a class="nav-link active" id="CT-tab" data-toggle="tab" href="#CTransactions" role="tab" aria-controls="CT" aria-selected="true">Claim Transactions</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" id="CN-tab" data-toggle="tab" href="#CNotes" role="tab" aria-controls="CN" aria-selected="false">Claim Notes</a>
                            </li>
                        </ul>

                        <div class="tab-content" id="myTabContent">
                            <div class="tab-pane fade show active" id="CTransactions" role="tabpanel" aria-labelledby="CT-tab">
                                <div class="card-header">
                                    <h3 class="card-title">
                                        <i class="fas fa-tag"></i>
                                        <b>Accounts Information</b>
                                    </h3>
                                </div>
                                <div class="row">
                                    <div style="min-height: 100px; width: 100%; display: inline-block; vertical-align: top; overflow-x: auto;">
                                        <asp:GridView ID="gvAcc" class="table table-striped table-bordered table-sm" runat="server" AutoGenerateColumns="False"
                                            EmptyDataText="There are no results">
                                            <Columns>
                                                <asp:BoundField DataField="term_id" HeaderText="Term&nbsp;ID" />
                                                <asp:BoundField DataField="retailer_id" HeaderText="Retailer&nbsp;ID" />
                                                <asp:BoundField DataField="txn_date" HeaderText="Date" />
                                                <asp:BoundField DataField="txn_time" HeaderText="Time" />
                                                <asp:BoundField DataField="service_name" HeaderText="Service" />
                                                <asp:BoundField DataField="srv_amt" HeaderText="Amount" />
                                                <asp:BoundField DataField="fee_amt" HeaderText="Fee" />
                                                <asp:BoundField DataField="net_amt" HeaderText="Net&nbsp;Amount" />
                                                <asp:BoundField DataField="acct_number" HeaderText="Account&nbsp;No" />
                                                <asp:BoundField DataField="REC_TYPE" HeaderText="REC&nbsp;Type" />
                                                <asp:BoundField DataField="Status" HeaderText="Status" />
                                            </Columns>
                                        </asp:GridView>

                                        <asp:GridView ID="gvAccATM" class="table table-striped table-bordered table-sm" runat="server" AutoGenerateColumns="False"
                                            EmptyDataText="There are no results">
                                            <Columns>
                                                <asp:BoundField DataField="ATM_OVERAGE_ACCT" HeaderText="ATM&nbsp;Overage&nbsp;Account" />
                                                <asp:BoundField DataField="ATM_SHORTAGE_ACCT" HeaderText="ATM&nbsp;Shortage&nbsp;Account" />
                                                <asp:BoundField DataField="ATM_CASH_ACCT" HeaderText="ATM&nbsp;Cash&nbsp;Account" />
                                                <asp:BoundField DataField="TRAN_AMOUNT" HeaderText="Tran&nbsp;Amount" />
                                                <asp:BoundField DataField="REPL_DATE" HeaderText="Repl&nbsp;Date" />
                                            </Columns>
                                        </asp:GridView>
                                    </div>

                                </div>
                                <div class="card-header">
                                    <h3 class="card-title">
                                        <i class="fas fa-tag"></i>
                                        <b>Postilion Transactions</b>
                                    </h3>
                                </div>
                                <div class="row">
                                    <div style="min-height: 100px; width: 100%; display: inline-block; vertical-align: top; overflow-x: auto;">
                                        <asp:GridView ID="gvB24" class="table table-striped table-bordered table-sm" runat="server" AutoGenerateColumns="False" EmptyDataText="There are no results" OnPreRender="gvB24_PreRender">
                                            <Columns>
                                                <asp:BoundField DataField="TRAN_DATE" HeaderText="Tran&nbsp;Date" />
                                                <asp:BoundField DataField="TRAN_TIME" HeaderText="Tran&nbsp;Time" />
                                                <asp:BoundField DataField="FINANCIAL_FLAG" HeaderText="Financial&nbsp;Flag" />
                                                <asp:BoundField DataField="TRAN_SOURCE" HeaderText="Acquirer" />
                                                <asp:BoundField DataField="TRAN_DEST" HeaderText="Issuer" />
                                                <asp:BoundField DataField="product" HeaderText="Product" />
                                                <asp:BoundField DataField="TRAN_AMOUNT" HeaderText="Amount" />
                                                <asp:BoundField DataField="TRAN_CURR" HeaderText="Tran&nbsp;Curr" />
                                                <asp:BoundField DataField="recon_status" HeaderText="Recon&nbsp;Status" />
                                                <asp:BoundField DataField="merchant_settl_status" HeaderText="Merchant&nbsp;Paid" />
                                                <asp:BoundField DataField="rrn" HeaderText="Reference&nbsp;No" />
                                            </Columns>
                                        </asp:GridView>
                                    </div>
                                </div>
                                <div class="card-header">
                                    <h3 class="card-title">
                                        <i class="fas fa-tag"></i>
                                        <b>Channel Transactions</b>
                                    </h3>
                                </div>
                                <div class="row">
                                    <div style="min-height: 100px; width: 100%; display: inline-block; vertical-align: top; overflow-x: auto;">
                                        <asp:GridView ID="gvChannel" class="table table-striped table-bordered table-sm" runat="server" AutoGenerateColumns="False"
                                            EmptyDataText="There are no results">
                                            <Columns>
                                                <asp:BoundField DataField="channel" HeaderText="Channel" />
                                                <asp:BoundField DataField="TRAN_DATE" HeaderText="Tran&nbsp;Date" />
                                                <asp:BoundField DataField="TRAN_TIME" HeaderText="Tran&nbsp;Time" />
                                                <asp:BoundField DataField="msg_type" HeaderText="Txn&nbsp;Type" />
                                                <asp:BoundField DataField="CARD_NUMBER" HeaderText="Card&nbsp;Number" />
                                                <asp:BoundField DataField="FINANCIAL_FLAG" HeaderText="Financial&nbsp;Flag" />
                                                <asp:BoundField DataField="TERM_ID" HeaderText="Term&nbsp;Id" />
                                                <asp:BoundField DataField="TRAN_SOURCE" HeaderText="Acquirer" />
                                                <asp:BoundField DataField="TRAN_DEST" HeaderText="Issuer" />
                                                <asp:BoundField DataField="PRODUCT" HeaderText="Product" />
                                                <asp:BoundField DataField="TRAN_AMOUNT" HeaderText="Amount" />
                                                <asp:BoundField DataField="TRAN_CURR" HeaderText="Tran&nbsp;Curr" />
                                            </Columns>
                                        </asp:GridView>
                                    </div>
                                </div>
                                <div class="card-header">
                                    <h3 class="card-title">
                                        <i class="fas fa-tag"></i>
                                        <b>EJ Transactions</b>
                                    </h3>
                                </div>
                                <div class="row" runat="server" id="pnlEJ">
                                    <div style="min-height: 100px; width: 100%; display: inline-block; vertical-align: top; overflow-x: auto;">
                                        <asp:GridView ID="gvEJ" class="table table-striped table-bordered table-sm" runat="server" AutoGenerateColumns="False"
                                            EmptyDataText="There are no results">
                                            <Columns>
                                                <asp:BoundField DataField="card_no" HeaderText="Card&nbsp;No" />
                                                <asp:BoundField DataField="tran_date" HeaderText="Date" />
                                                <asp:BoundField DataField="tran_time" HeaderText="Time" />
                                                <asp:BoundField DataField="settle_date" HeaderText="Settle&nbsp;Date" />
                                                <asp:BoundField DataField="txn_cur" HeaderText="Currency" />
                                                <asp:BoundField DataField="amount" HeaderText="Amount" />
                                                <asp:BoundField DataField="terminal_id" HeaderText="Terminal&nbsp;ID" />
                                                <asp:BoundField DataField="record_date" HeaderText="Record&nbsp;Date" />
                                                <asp:BoundField DataField="proc_flag" HeaderText="Proc&nbsp;Flag" />
                                                <asp:BoundField DataField="seq_no" HeaderText="Seq&nbsp;No" />
                                                <asp:BoundField DataField="tran_status" HeaderText="" />
                                                <asp:BoundField DataField="status" HeaderText="" />
                                                <asp:BoundField DataField="luno_id" HeaderText="" />
                                                <asp:BoundField DataField="ACCOUNT" HeaderText="" />
                                                <asp:BoundField DataField="disp_a" HeaderText="" />
                                                <asp:BoundField DataField="disp_b" HeaderText="" />
                                                <asp:BoundField DataField="disp_c" HeaderText="" />
                                                <asp:BoundField DataField="disp_d" HeaderText="" />
                                                <asp:BoundField DataField="txn_date" HeaderText="" />
                                                <asp:BoundField DataField="status_code" HeaderText="" />
                                                <asp:BoundField DataField="acct_src" HeaderText="Customer&nbsp;A/C&nbsp;From" />
                                                <asp:BoundField DataField="dispenser" HeaderText="" />
                                            </Columns>
                                        </asp:GridView>
                                    </div>
                                </div>
                                <div class="row" runat="server" id="pnlPOS">
                                    <div class="card-header">
                                        <h3 class="card-title">
                                            <i class="fas fa-tag"></i>
                                            <b>Related Claims</b>
                                        </h3>
                                    </div>
                                    <div class="row">
                                        <asp:GridView ID="gvClaims" class="table table-bordered table-hover" runat="server" AutoGenerateColumns="False"
                                            EmptyDataText="There are no results">
                                            <Columns>
                                                <asp:BoundField DataField="claim_id" HeaderText="Claim&nbsp;ID" />
                                                <asp:BoundField DataField="card_number" HeaderText="Card&nbsp;No" />
                                                <asp:BoundField DataField="claim_date" HeaderText="Claim&nbsp;Date" />
                                                <asp:BoundField DataField="claim_amount" HeaderText="Claim&nbsp;Amount" />
                                                <asp:TemplateField HeaderText="Actions">
                                                    <ItemTemplate>
                                                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                                            Actions
                                                        </button>
                                                        <div class="dropdown-menu">
                                                            <a class="dropdown-item" href="#">
                                                                <asp:Button ID="Delete" CssClass="btn btn-outline-info btn-block btn-sm" runat="server" Text="Investigate" CommandName="i" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" /></a>
                                                        </div>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                        </asp:GridView>
                                    </div>
                                </div>

                                <div class="row" style="margin-top: 1%; margin-bottom: 2%">
                                    <div class="col-12">
                                        <asp:Button ID="btnApprove" runat="server" Text="Submit for Approval" class="btn btn-primary btn-l" OnClick="btnApprove_Click" />
                                        <asp:Button ID="btnDecline" runat="server" Text="Reject" class="btn btn-primary btn-l" OnClick="btnDecline_Click" OnClientClick="return SaveConfirmation()" />
                                    </div>
                                </div>

                                <!-- pnlApprove -->
                                <div class="row">
                                    <div class="modal fade" id="pnlApprove-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">Approve 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">
                                                        <div class="col-sm-12">
                                                            <div class="form-group">
                                                                <label>Suggested Amount</label>
                                                                <asp:TextBox ID="txt_approve_suggestedAmount" runat="server" class="form-control"></asp:TextBox>
                                                            </div>
                                                        </div>
                                                        <% if (lbl_FromAcct2.Text.ToString().Length > 1 || txtToManualMerAccount.Text.ToString().Length > 1)
                                                            { %>
                                                        <div class="col-sm-12">
                                                            <div class="form-group">
                                                                <label>Commission Fee</label>
                                                                <asp:TextBox ID="txtCommissionFee" MaxLength="6" Visible="true" runat="server" class="form-control"></asp:TextBox>
                                                            </div>
                                                        </div>
                                                        <% }%>

                                                        <% if (lbl_FromAcct3.Text.ToString().Length > 1 && lbl_ToAcct3.Text.ToString().Length > 1)
                                                            {
                                                        %>
                                                        <div class="col-sm-12">
                                                            <div class="form-group">
                                                                <label>VAT</label>
                                                                <asp:Label ID="lblVAT" Visible="true" runat="server" Text=""></asp:Label>
                                                            </div>
                                                        </div>

                                                        <div class="col-sm-12">
                                                            <div class="form-group">
                                                                <label>VAT Rate</label>
                                                                <asp:Label ID="lblVatRate" Visible="true" runat="server" Text=""></asp:Label>
                                                            </div>
                                                        </div>
                                                        <% }%>

                                                        <% if (lbl_Re_Code.Text == "8" || lbl_Re_Code.Text == "33")
                                                            { %>
                                                        <div class="col-sm-12">
                                                            <div class="form-group">
                                                                <label>Claim Type</label>
                                                                <asp:RadioButton ID="rdCard" runat="server" Checked="true" AutoPostBack="true" GroupName="gg1" Text="CardHolder" OnCheckedChanged="rdCard_CheckedChanged"></asp:RadioButton>
                                                                <asp:RadioButton ID="reMer" runat="server" GroupName="gg1" AutoPostBack="true" Text="Merchant" OnCheckedChanged="reMer_CheckedChanged"></asp:RadioButton>
                                                            </div>
                                                        </div>

                                                        <% }%>

                                                        <div class="col-sm-12">
                                                            <div class="form-group">
                                                                <label>1st GL Amount</label><br />
                                                                <asp:Label ID="lblGlAmt1" runat="server" class="form-control"></asp:Label>
                                                            </div>
                                                        </div>

                                                        <div class="col-sm-12">
                                                            <div class="form-group">
                                                                <label>
                                                                    <asp:Label ID="lblFrom" runat="server" Text="From  (Dr)"></asp:Label></label>
                                                                <asp:DropDownList ID="ddlFromAcct" runat="server" class="form-control select2" DataTextField="acct_desc" DataValueField="acct" AutoPostBack="True" OnSelectedIndexChanged="ddlFromAcct_SelectedIndexChanged">
                                                                </asp:DropDownList>
                                                            </div>
                                                        </div>

                                                        <div id="OFMAccNo" class="col-sm-12" visible="false" runat="server">
                                                            <div class="form-group">
                                                                <label>
                                                                    <asp:Label ID="lblfromAccount" Text="Other From Account" runat="server"></asp:Label></label>
                                                                <asp:TextBox ID="OtherFromMerAccountNo" runat="server" class="form-control" MaxLength="20"></asp:TextBox>
                                                            </div>
                                                        </div>

                                                        <div class="col-sm-12">
                                                            <div class="form-group">
                                                                <label>
                                                                    <asp:Label ID="lblTo" runat="server" Text="To (Cr)"></asp:Label></label>
                                                                <asp:DropDownList ID="ddlToAcct" runat="server" DataTextField="acct_desc" DataValueField="acct" class="form-control select2" AutoPostBack="True" OnSelectedIndexChanged="ddlToAcct_SelectedIndexChanged">
                                                                </asp:DropDownList>
                                                            </div>
                                                        </div>

                                                        <div class="col-sm-12">
                                                            <div class="form-group">
                                                                <label>
                                                                    <asp:Label ID="lbltoAccount" runat="server" Visible="false"></asp:Label></label>
                                                                <asp:TextBox ID="OtherToMerAccount" runat="server" class="form-control" Visible="false" MaxLength="20"></asp:TextBox>
                                                            </div>
                                                        </div>
                                                        <% 
                                                            if (lbl_FromAcct3.Text.ToString().Length > 1 && lbl_ToAcct3.Text.ToString().Length > 1)
                                                            {
                                                        %>
                                                        <div class="col-sm-12">
                                                            <div class="form-group">
                                                                <label>2nd GL Amount:</label>
                                                                <asp:Label ID="lblGlAmt2" runat="server"></asp:Label>
                                                            </div>
                                                        </div>

                                                        <div class="col-sm-12">
                                                            <div class="form-group">
                                                                <label>
                                                                    <asp:Label ID="lblFrom_2" runat="server"></asp:Label></label>
                                                                <asp:TextBox ID="lbl_FromAcct2" Enabled="false" runat="server" class="form-control" MaxLength="20" Width="200px"></asp:TextBox>
                                                            </div>
                                                        </div>

                                                        <div class="col-sm-12">
                                                            <div class="form-group">
                                                                <label>
                                                                    <asp:Label ID="lblTo_2" runat="server"></asp:Label></label>
                                                                <asp:TextBox ID="txtToManualMerAccount" runat="server" class="form-control" MaxLength="20" Enabled="false"></asp:TextBox>
                                                            </div>
                                                        </div>

                                                        <div class="col-sm-12">
                                                            <div class="form-group">
                                                                <label>3rd GL Amount:</label>
                                                                <asp:Label ID="lblGlAmt3" runat="server"></asp:Label>
                                                            </div>
                                                        </div>

                                                        <div class="col-sm-12">
                                                            <div class="form-group">
                                                                <label>
                                                                    <asp:Label ID="lblFrom_3" runat="server"></asp:Label></label>
                                                                <asp:Label ID="lbl_FromAcct3" runat="server"></asp:Label>
                                                            </div>
                                                        </div>

                                                        <div class="col-sm-12">
                                                            <div class="form-group">
                                                                <label>
                                                                    <asp:Label ID="lblTo_3" runat="server"></asp:Label></label>
                                                                <asp:Label ID="lbl_ToAcct3" runat="server"></asp:Label>
                                                            </div>
                                                        </div>
                                                        <%} %>

                                                        <% if (lblCardNo.Text.Trim().Substring(0, 6) == Helper.getParamByID("302"))
                                                            { %>
                                                        <div class="col-sm-12">
                                                            <div class="form-group">
                                                                <label>
                                                                    <asp:Label ID="lbl_PrePaid" runat="server" Text="Prepaid Account Type"></asp:Label></label>
                                                                <asp:DropDownList ID="ddlPrepaidAcctType" runat="server" DataTextField="Ext_Acct_Type_Desc"
                                                                    DataValueField="Ext_Acct_Type_Code" Width="250px" class="form-control select2" AutoPostBack="False" />
                                                            </div>
                                                        </div>

                                                        <%} %>

                                                        <div class="col-sm-12" style="text-align: center;">
                                                            <asp:Button ID="btnSavePost" runat="server" Text="Save" class="btn btn-primary btn-l" OnClick="btnSavePost_Click" /> <!-- OnClientClick="return SaveConfirmation()" -->
                                                            <asp:Button ID="btnCancelPost" runat="server" Text="Cancel" class="btn btn-primary btn-l" CausesValidation="False" OnClick="btnCancelPost_Click" />
                                                        </div>
                                                    </div>
                                                </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 id="rowSugAmt" class="col-sm-6" runat="server">
                                        <label>Suggested Amount</label>
                                        <div class="form-group">
                                            <asp:TextBox ID="txtSugAmt" runat="server" class="form-control"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div id="cpsInfo" class="col-sm-6" runat="server">
                                        <div class="form-group">
                                            <label>CPS Claim Type</label>
                                            <asp:Label ID="lblClaimType" runat="server" class="form-control" Text="" Visible="false"></asp:Label>
                                            <asp:DropDownList ID="ddlCPSType" runat="server" DataTextField="type_name" DataValueField="type_code" class="form-control select" AutoPostBack="False" />
                                        </div>
                                    </div>
                                    <div id="samaActions" class="col-sm-12" runat="server">
                                        <div class="form-group">
                                            <asp:Button ID="btnsenttoCPS" runat="server" Text="Send To CPS" class="btn btn-primary btn-l" OnClick="btnsenttoCPS_Click" />
                                            <asp:Button ID="btnSamaAccept" runat="server" Text="Sama Accept" class="btn btn-primary btn-l" OnClientClick="return AcceptClosingConfirmation()" OnClick="btnSamaAccept_Click" />
                                            <asp:Button ID="btnSamaReject" runat="server" Text="Sama Reject" class="btn btn-primary btn-l" OnClientClick="return RejectClosingConfirmation()" OnClick="btnSamaReject_Click" />
                                            <asp:Button ID="btnRequest" runat="server" Text="Request Info" class="btn btn-primary btn-l" OnClick="btnRequest_Click" />
                                            <asp:Button ID="btnResponse" runat="server" Text="Info Response" class="btn btn-primary btn-l" OnClick="btnResponse_Click" />
                                        </div>
                                    </div>
                                </div>

                                <div class="row" runat="server" id="Panel2">
                                    Info Response<br />
                                    <div class="col-sm-6">
                                        <label>Info Response</label>
                                        <div class="form-group">
                                            <asp:DropDownList ID="ddlRespons" runat="server" Width="550px" class="form-control select" AutoPostBack="false">
                                                <asp:ListItem Value="Wrong_Information">Wrong Information</asp:ListItem>
                                                <asp:ListItem Value="Customer_Received_Cash">Customer Received Cash</asp:ListItem>
                                                <asp:ListItem Value="Claim_Dispute_Settled">Claim Dispute Settled</asp:ListItem>
                                                <asp:ListItem Value="Claim_Reversed">Claim Reversed</asp:ListItem>
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-12" style="text-align: center">
                                            <asp:Button ID="btnSaveResponse" OnClientClick="return validate()" runat="server" Text="Save" OnClick="btnSaveResponse_Click" class="btn btn-primary btn-l" />
                                            <asp:Button ID="btnCancelResponse" runat="server" Text="Cancel" OnClick="btnCancelResponse_Click" class="btn btn-primary btn-l" CausesValidation="False" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="tab-pane fade" id="CNotes" role="tabpanel" aria-labelledby="CN-tab">
                                <div class="card-header">
                                    <h3 class="card-title">
                                        <i class="fas fa-tag"></i>
                                        <b>Claim Notes</b>
                                    </h3>
                                </div>
                                <div class="row">
                                    <asp:GridView ID="gvNotes" class="table table-striped table-bordered table-sm" runat="server" AutoGenerateColumns="False"
                                        EmptyDataText="There are no results">
                                        <Columns>
                                            <asp:BoundField DataField="user_name" HeaderText="User&nbsp;Name" ItemStyle-Width="20%" />
                                            <asp:BoundField DataField="action_date" HeaderText="Date" ItemStyle-Width="20%" />
                                            <asp:BoundField DataField="note" HeaderText="Note" ItemStyle-Width="60%" />
                                        </Columns>
                                    </asp:GridView>

                                    <div class="col-sm-12" style="margin-top:2%;">
                                        <label>Note</label>
                                        <div class="form-group">
                                            <asp:TextBox ID="txtAddNote" runat="server" class="form-control" Rows="4" TextMode="MultiLine"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="col-sm-12" style="margin-top: 1%; margin-bottom: 1%">
                                        <asp:Button ID="btnAddNote" runat="server" Text="Save" class="btn btn-primary btn-l" OnClick="btnAddNote_Click" />
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>



                <%--<div class="card-header">
                    <h3 class="card-title">
                        <i class="fas fa-tag"></i>
                        <b>Claim Transactions</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>--%>

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

            <!-- UR-Confirmation-modal -->
            <div class="row">
                <div id="UR-confirmation-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="Lbl_URC_Message" runat="server"></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_URConfirm_OK" runat="server" Text="Yes" CssClass="btn btn-primary" OnClick="btn_URConfirm_OK_Click" OnClientClick="$('#cover-spin').show();" />
                                            <button type="button" class="btn btn-primary" data-dismiss="modal">No</button>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </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()

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

		    //$('#reservationdatetime').datetimepicker({ icons: { time: 'far fa-clock'} });
//        $('#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>
