<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" async="true" autoeventwireup="true" inherits="Pages_FeeManagement_PayStudentFee, App_Web_vpn0t50z" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager"
    TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl"
    TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl"
    TagPrefix="DPC" %>
<%@ Register Src="~/UserControls/Common/StudentSearch/StudentSearch.ascx" TagName="StudentSearch"
    TagPrefix="Std" %>
<%@ Register Src="~/UserControls/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl"
    TagPrefix="hims" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="IncidentLogUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>

            <hims:EmployeeSearchControl ID="EmployeeSearch" Visible="false" runat="server" />
            <Std:StudentSearch ID="StudentSearch" Visible="false" runat="server" />
            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont" valign="top" runat="server" id="ScreenGroup">
                    <div>
                        <table>
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="172"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader1WireBox card card-box">
                        <cc1:TabContainer Width="100%" ID="StudentFeeTabContainer" runat="server" CssClass="ajax__myTab nav nav-tabs tabs-style-iconbox"
                            AutoPostBack="true" meta:resourcekey="StudentFeeTabContainerResource1"
                            ActiveTabIndex="0" OnActiveTabChanged="StudentFeeTabContainer_ActiveTabChanged">
                            <cc1:TabPanel Width="100%" ID="StudentwiseFeeTabPanel" runat="server" HeaderText="Online Fee Pay">
                                <HeaderTemplate>
                                    <ul class="nav nav-tabs tabs-style-iconboxinner ajaxnavtabs">
                                        <li class="fancyTab">
                                            <a href="#"><i class="fas fa-tasks"></i>&nbsp;Online Fee Pay
                                            </a>
                                        </li>
                                    </ul>

                                </HeaderTemplate>
                                <ContentTemplate>
                                    <div class="himsBoxHeader card-head">
                                        <div class="leftdiv">
                                        </div>
                                        <div class="himsBoxTitle">
                                            <div class="headerText">
                                                <header>
                                                    <i class="fas fa-user-check"></i>
                                                    <asp:Label ID="AssignToLabel" runat="server" Text="Assign To"></asp:Label>
                                                </header>
                                            </div>
                                        </div>
                                        <div class="fRight mt-27 pagination display-flex">
                                            <asp:Button ID="BackButton" runat="Server" SkinID="0" CssClass="btn btn-back fas" Text="&#xf30a;  back" OnClick="BackButton_Click" Visible="false" />
                                        </div>
                                    </div>
                                    <div class="himsBoxContent card-body">
                                        <div class="contentHolder">
                                            <div id="SUIdDiv" class="outerBox pTop5 col-md-3" runat="server" visible="false">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="SUIdLabel" runat="server" Text="SU Id"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="SUIdTextBox" runat="server" SkinID="CustomWidthTextBox"
                                                        AutoPostBack="true" MaxLength="50" OnTextChanged="SUIdTextBox_TextChanged"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div runat="server" id="OrganizationDropDownDiv" class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="OrganizationLabel" Text="Organization" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList ID="OrganizationDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                        onmouseenter="showHideTooltip()" AutoPostBack="true" SkinID="CustomWidthDropDownList"
                                                        CssClass="form-control" OnSelectedIndexChanged="OrganizationDropDownList_OnSelectedIndexChanged">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div runat="server" id="BatchDropDownDiv" class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="BatchLable" Text="Batch" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList ID="BatchDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                        onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control"
                                                        AutoPostBack="true" OnSelectedIndexChanged="BatchDropDownList_OnSelectedIndexChanged">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>

                                            <asp:Panel ID="StudentSearchPanel" runat="server">
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="StudentIdNoLabel" runat="server" Text="Id No" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5 display-flex">
                                                        <asp:TextBox ID="StudentIdNoTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="200" AutoPostBack="true"
                                                            OnTextChanged="StudentIdNoTextBox_TextChanged">
                                                        </asp:TextBox>
                                                        <asp:ImageButton SkinID="FindImage" ToolTip="Student Search" ID="StudentIdNoImageButton"
                                                            ImageUrl="~/Images/icons/icon_find.gif" runat="server" />
                                                        <asp:HiddenField ID="SourceIdHiddenField" runat="server" />
                                                        <asp:HiddenField ID="ClassIdHiddenField" runat="server" />
                                                        <asp:HiddenField ID="AdmissionCategoryIdHiddenField" runat="server" />
                                                        <asp:HiddenField ID="ChargeHiddenField" runat="server" />
                                                        <asp:HiddenField ID="ReceiptBookIdHiddenField" runat="server" />
                                                        <asp:HiddenField ID="DelayForPaymentHiddenField" runat="server" />
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="StudentNameLabel" runat="server" Text="Name"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="StudentNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="ClassLabel" runat="server" Text="Class"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="ClassTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                                    </div>
                                                </div>
                                            </asp:Panel>

                                            <div class="himssuHeader6WireBox col-md-12">
                                                <div id="CollectionGroupDetailDiv" runat="server" visible="false">
                                                    <div class="col-md-12">
                                                        <div class="alert alert-info">
                                                            <b>Note : </b>Select Same Receipt Book
                                                        </div>
                                                    </div>
                                                    <div class="fLeft pRight5 himsBoxHeader card-head inner" style="padding-left: 10px">
                                                        <div class="himsBoxTitle">
                                                            <div class="gridHeaderText">
                                                                <header>
                                                                    <asp:Label ID="CollectionGroupLabel" Text="Collection Group" runat="server" />
                                                                </header>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="himsBoxContent col-md-12" style="padding-bottom: 0px !important">
                                                        <div id="Div1" runat="server" visible="false" class="table-responsive">
                                                            <%--<asp:GridView ID="CollectionGroupGridView" runat="server" AutoGenerateColumns="False"
                                                                EmptyDataText="No Records Found !!" AllowPaging="false" ShowHeader="true" DataKeyNames="CollectionGroupId,ReceiptBookId"
                                                                CssClass="table table-striped table-bordered table-hover" ShowFooter="true" OnRowDataBound="CollectionGroupGridView_RowDataBound">
                                                                <Columns>
                                                                    <asp:TemplateField HeaderText="Select" HeaderStyle-HorizontalAlign="Center" ItemStyle-Wrap="true"
                                                                        ItemStyle-Width="5%">
                                                                        <HeaderTemplate>
                                                                            <label class="rt-chkbox rt-chkbox-outline">
                                                                                <asp:CheckBox ID="GHeaderSelectCheckBox" runat="server" Enabled="true" AutoPostBack="true"
                                                                                    Visible="true" OnCheckedChanged="GHeaderSelectCheckBox_checked" />
                                                                                <span></span>
                                                                            </label>
                                                                        </HeaderTemplate>
                                                                        <ItemStyle HorizontalAlign="Center" />
                                                                        <ItemTemplate>
                                                                            <label class="rt-chkbox rt-chkbox-outline">
                                                                                <asp:CheckBox ID="GSelectCheckBox" runat="server" />
                                                                                <span></span>
                                                                            </label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Collection Group" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Width="35%">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="CollectionGroupLabel" ClientIDMode="Static" runat="server" Text='<%#Eval("CollectionGroupName")%>'></asp:Label>
                                                                        </ItemTemplate>
                                                                        <FooterTemplate>
                                                                            <asp:Label ID="TotalLabel" ClientIDMode="Static" runat="server" Text="Total" Font-Bold="true"></asp:Label>
                                                                        </FooterTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Receipt Book" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Width="30%">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="ReceiptBookLabel" ClientIDMode="Static" runat="server" Text='<%#Eval("ReceiptBook")%>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Pending Amount" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Width="10%">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="PendingAmountLabel" Text='<%#Eval("PendingAmount")%>' ClientIDMode="Static"
                                                                                runat="server"></asp:Label>
                                                                        </ItemTemplate>
                                                                        <FooterTemplate>
                                                                            <asp:Label ID="FPendingAmountLabel" ClientIDMode="Static" runat="server" Font-Bold="true"></asp:Label>
                                                                        </FooterTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Start Date" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Width="10%">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="StartDateLabel" Text='<%# Bind("StartDate","{0:dd/MM/yyyy}") %>' runat="server"></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="End Date" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Width="10%">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="EndDateLabel" Text='<%# Bind("EndDate","{0:dd/MM/yyyy}") %>' runat="server"></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                                <PagerSettings Visible="False" />
                                                            </asp:GridView>--%>

                                                            <asp:GridView ID="ReceiptBookGridView" runat="server" AutoGenerateColumns="False"
                                                                EmptyDataText="No Records Found !!" AllowPaging="false" ShowHeader="false" DataKeyNames="ReceiptBookId"
                                                                CssClass="table table-striped table-bordered table-hover" ShowFooter="false" OnRowDataBound="ReceiptBookGridView_RowDataBound">
                                                                <Columns>

                                                                    <asp:TemplateField HeaderText="Receipt Book" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Width="100%">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="ReceiptBookLabel" ClientIDMode="Static" runat="server" Font-Bold="true" Text='<%#"Receipt Book: " + Eval("ReceiptBook")%>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField ItemStyle-CssClass="hidden" ItemStyle-Width="100%">
                                                                        <ItemTemplate>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:GridView ID="CollectionGroupFeeGridView" runat="server" AutoGenerateColumns="False" Style="display: none;"
                                                                                        EmptyDataText="No Records Found !!" AllowPaging="false" ShowHeader="true" DataKeyNames="ReceiptBookId,CollectionGroupId,CollectionGroupCode"
                                                                                        CssClass="table table-striped table-bordered table-hover" ShowFooter="true" OnRowDataBound="CollectionGroupFeeGridView_RowDataBound">
                                                                                        <Columns>
                                                                                            <asp:TemplateField HeaderText="Select" HeaderStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" ItemStyle-Width="2%">
                                                                                                <HeaderTemplate>
                                                                                                    <label class="rt-chkbox rt-chkbox-outline">
                                                                                                        <asp:CheckBox ID="GHeaderSelectCheckBox" runat="server" Enabled="true" AutoPostBack="true"
                                                                                                            Visible="true" OnCheckedChanged="GHeaderSelectCheckBox_checked" />
                                                                                                        <span></span>
                                                                                                    </label>
                                                                                                </HeaderTemplate>
                                                                                                <ItemStyle HorizontalAlign="Center" />
                                                                                                <ItemTemplate>
                                                                                                    <label class="rt-chkbox rt-chkbox-outline">
                                                                                                        <asp:CheckBox ID="GSelectCheckBox" runat="server" />
                                                                                                        <span></span>
                                                                                                    </label>
                                                                                                </ItemTemplate>
                                                                                            </asp:TemplateField>
                                                                                            <asp:TemplateField HeaderText="Collection Group" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="35%">
                                                                                                <ItemTemplate>
                                                                                                    <asp:Label ID="CollectionGroupLabel" ClientIDMode="Static" runat="server" Text='<%#Eval("CollectionGroupName")%>'></asp:Label>
                                                                                                    <asp:HiddenField ID="CollectionGroupId" Value='<%#Eval("CollectionGroupId")%>' runat="server" />
                                                                                                    <asp:HiddenField ID="ReceiptBookId" Value='<%#Eval("ReceiptBookId")%>' runat="server" />
                                                                                                </ItemTemplate>
                                                                                                <FooterTemplate>
                                                                                                    <asp:Label ID="TotalLabel" ClientIDMode="Static" runat="server" Text="Total" Font-Bold="true"></asp:Label>
                                                                                                </FooterTemplate>
                                                                                            </asp:TemplateField>
                                                                                            <asp:TemplateField HeaderText="Pending Amount" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="20%">
                                                                                                <ItemTemplate>
                                                                                                    <asp:Label ID="PendingAmountLabel" Text='<%#Eval("PendingAmount")%>' ClientIDMode="Static" runat="server"></asp:Label>
                                                                                                </ItemTemplate>
                                                                                                <FooterTemplate>
                                                                                                    <asp:Label ID="FPendingAmountLabel" ClientIDMode="Static" runat="server" Font-Bold="true"></asp:Label>
                                                                                                </FooterTemplate>
                                                                                            </asp:TemplateField>
                                                                                            <asp:TemplateField HeaderText="Start Date" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="20%">
                                                                                                <ItemTemplate>
                                                                                                    <asp:Label ID="StartDateLabel" Text='<%# Bind("StartDate","{0:dd/MM/yyyy}") %>' runat="server"></asp:Label>
                                                                                                </ItemTemplate>
                                                                                            </asp:TemplateField>
                                                                                            <asp:TemplateField HeaderText="End Date" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="20%">
                                                                                                <ItemTemplate>
                                                                                                    <asp:Label ID="EndDateLabel" Text='<%# Bind("EndDate","{0:dd/MM/yyyy}") %>' runat="server"></asp:Label>
                                                                                                </ItemTemplate>
                                                                                            </asp:TemplateField>
                                                                                        </Columns>
                                                                                    </asp:GridView>
                                                                                </td>
                                                                            </tr>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                                <PagerSettings Visible="False" />
                                                            </asp:GridView>
                                                        </div>
                                                    </div>
                                                    <div class="alignCenter pTop5 col-md-12 center">
                                                        <asp:Button ID="ViewCollectionButton" runat="Server" OnClick="ViewCollectionButton_Click"
                                                            Text="&#xf06e; View Fee Detail" SkinID="CustomWidthButton,0" CssClass="btn btn-assign fas" />

                                                    </div>
                                                    <asp:HiddenField ID="RazorpayKeyId" runat="server" />
                                                    <asp:HiddenField ID="Razorpayamount" runat="server" Visible="true" />
                                                    <asp:HiddenField ID="Razorpayname" runat="server" />
                                                    <asp:HiddenField ID="Razorpayemail" runat="server" />
                                                    <asp:HiddenField ID="Razorpaycontact" runat="server" />
                                                    <asp:HiddenField ID="Razorpayorderid" runat="server" />
                                                    <asp:HiddenField ID="RazorpaySubMerchantIdHiddenField" runat="server" />
                                                    <%--//For Mantis - 0032378--%>
                                                    <asp:HiddenField ID="RazorpayCollectionGroup" runat="server" />
                                                    <asp:HiddenField ID="Razorpaycallbackurl" runat="server" />

                                                    <asp:HiddenField ID="TransactionIdHiddenField" runat="server" />
                                                    <asp:HiddenField ID="ReceiptBookHiddenField" runat="server" />
                                                    <asp:HiddenField ID="OrganizationHiddenField" runat="server" />
                                                    <asp:HiddenField ID="BatchHiddenField" runat="server" />
                                                    <asp:HiddenField ID="StudentCodeHiddenField" runat="server" />
                                                    <asp:HiddenField ID="ClassHiddenField" runat="server" />
                                                    <asp:HiddenField ID="DivisionHiddenField" runat="server" />
                                                    <asp:HiddenField ID="CCAvenueWorkingKeyHiddenField" runat="server" />

                                                    <%--GrayQuest Hidden Fields--%>
                                                    <asp:HiddenField ID="GrayQuestClientIdHiddenField" runat="server" />
                                                    <asp:HiddenField ID="GrayQuestSecretKeyHiddenField" runat="server" />
                                                    <asp:HiddenField ID="GrayQuestAPIKeyHiddenField" runat="server" />
                                                    <asp:HiddenField ID="GrayQuestStudentIdHiddenField" runat="server" />
                                                    <asp:HiddenField ID="GrayQuestContactNoHiddenField" runat="server" />
                                                    <asp:HiddenField ID="GrayQuestFeeAmountHiddenField" runat="server" />
                                                    <asp:HiddenField ID="GrayQuestPayableAmountHiddenField" runat="server" />
                                                    <asp:HiddenField ID="GrayQuestPaymentTransactionIdHiddenField" runat="server" />
                                                    <asp:HiddenField ID="IsGrayQuestPaymentKitUat" runat="server" />

                                                </div>
                                            </div>

                                            <div class="himssuHeader6WireBox col-md-12">
                                                <div id="FeeAllocationDetailDiv" runat="server" visible="false">
                                                    <div class="himsBoxHeader card-head inner pTop5" id="GridViewPagerDiv" runat="server" visible="false">
                                                        <div class="leftdiv">
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <div class="himsBoxTitle">
                                                                <div class="gridHeaderText">
                                                                    <header>
                                                                        <asp:Label ID="GridViewLabel" Text="Available Fee List" runat="server" />
                                                                    </header>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="himsBoxContent col-md-12" style="padding-bottom: 0px !important">
                                                        <div id="Div5" runat="server" visible="false" class="table-responsive">
                                                            <div id="GridViewMessageDiv" class="himsBoxContentMsg" runat="server" visible="False">
                                                            </div>
                                                            <asp:GridView ID="FeeAllocationGridView" runat="server" AutoGenerateColumns="False"
                                                                EmptyDataText="No Records Found !!" AllowPaging="false" ShowHeader="true" DataKeyNames="FeeSetupId"
                                                                CssClass="table table-striped table-bordered table-hover" OnRowDataBound="FeeAllocationGridView_RowDataBound"
                                                                ShowFooter="true">
                                                                <Columns>
                                                                    <asp:TemplateField HeaderText="Select" HeaderStyle-HorizontalAlign="Center" ItemStyle-Wrap="true"
                                                                        Visible="false">
                                                                        <HeaderTemplate>
                                                                            <label class="rt-chkbox rt-chkbox-outline">
                                                                                <asp:CheckBox ID="HeaderSelectCheckBox" runat="server" Enabled="true" AutoPostBack="true"
                                                                                    Visible="true" OnCheckedChanged="HeaderSelectCheckBox_checked" />
                                                                                <span></span>
                                                                            </label>
                                                                        </HeaderTemplate>
                                                                        <ItemStyle HorizontalAlign="Center" />
                                                                        <ItemTemplate>
                                                                            <label class="rt-chkbox rt-chkbox-outline">
                                                                                <asp:CheckBox ID="SelectCheckBox" runat="server" />
                                                                                <span></span>
                                                                            </label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Fee" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Width="40%">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="FeeNameLabel" ClientIDMode="Static" runat="server" Text='<%#Eval("FeeName")%>'></asp:Label>
                                                                        </ItemTemplate>
                                                                        <FooterTemplate>
                                                                            <asp:Label ID="FFeeNameLabel" ClientIDMode="Static" runat="server" Text="Total" Font-Bold="true"></asp:Label>
                                                                            <br />
                                                                            <asp:Label ID="TChargeLabel" ClientIDMode="Static" runat="server" Text="Charge" Font-Bold="true"></asp:Label>
                                                                            <br />
                                                                            <asp:Label ID="TNetAmountLabel" ClientIDMode="Static" runat="server" Text="Net Amount"
                                                                                Font-Bold="true"></asp:Label>
                                                                        </FooterTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Pending Amount" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Width="30%">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="PendingAmountLabel" ClientIDMode="Static" runat="server"></asp:Label>
                                                                        </ItemTemplate>
                                                                        <FooterTemplate>
                                                                            <asp:Label ID="FPendingAmountLabel" ClientIDMode="Static" runat="server" Font-Bold="true"></asp:Label>
                                                                            <br />
                                                                            <asp:Label ID="ChargeLabel" ClientIDMode="Static" runat="server" Font-Bold="true"></asp:Label>
                                                                            <br />
                                                                            <asp:Label ID="NetAmountLabel" ClientIDMode="Static" runat="server" Font-Bold="true"></asp:Label>
                                                                        </FooterTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Variable Amount" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Width="20%">
                                                                        <ItemTemplate>
                                                                            <%--<asp:Label ID="PendingAmountLabel" ClientIDMode="Static" runat="server"></asp:Label>--%>
                                                                            <asp:TextBox ID="PendingAmountTextBox" runat="server" AutoPostBack="true" onkeypress="javascript:return isNumberKey(this)" OnTextChanged="PendingAmountTextBox_TextChanged"></asp:TextBox>
                                                                        </ItemTemplate>
                                                                        <FooterTemplate>
                                                                            <%-- <asp:Label ID="PayableAmountLabel" Text="PayableAmount" runat="server"  Font-Bold="true"></asp:Label>--%>
                                                                            <asp:Label ID="VariablePendingAmountLabel" ClientIDMode="Static" runat="server" Font-Bold="true"></asp:Label>
                                                                            <asp:HiddenField ID="TotalVariablePendingAmountLabel" runat="server" />
                                                                        </FooterTemplate>
                                                                    </asp:TemplateField>

                                                                    <asp:TemplateField HeaderText="Start Date" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left"
                                                                        Visible="false">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="StartDateLabel" Text='<%# Bind("StartDate","{0:dd/MM/yyyy}") %>' runat="server"></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="End Date" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left"
                                                                        Visible="false">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="EndDateLabel" Text='<%# Bind("EndDate","{0:dd/MM/yyyy}") %>' runat="server"></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Status" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Width="10%">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="StatusLabel" runat="server"></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                                <PagerSettings Visible="False" />
                                                            </asp:GridView>

                                                        </div>
                                                    </div>
                                                    <div id="GatwayDiv" runat="server">
                                                        <div class="outerBox11 pTop5 col-md-3">
                                                            <div class="controlLabelWidth">
                                                                <asp:Label ID="GatewayLabel" Text="Gateway" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                            </div>
                                                            <div class="fLeft pRight5">
                                                                <asp:DropDownList ID="GatewayDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                                    onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control">
                                                                </asp:DropDownList>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <%-- <div id="PayTypeDiv" runat="server" visible="false" class="outerBox11 pTop5">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="PayTypeLabel" Text="Pay Type" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:DropDownList ID="PayTypeDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                                onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" Width="154px">
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>--%>

                                                    <div class="outerBox11 pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="NameLabel" runat="server" Text="Name" SkinID="MandatoryLabel"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:TextBox ID="NameTextBox" runat="server" onmouseleave="showHideTooltip()" SkinID="CustomWidthTextBox"
                                                                onmouseenter="showHideTooltip()" MaxLength="200"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                    <div class="outerBox11 pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="EmailIDLabel1" runat="server" Text="EmailID" SkinID="MandatoryLabel"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:TextBox ID="EmailIDTextBox" runat="server" onmouseleave="showHideTooltip()"
                                                                SkinID="CustomWidthTextBox" onmouseenter="showHideTooltip()" Style="text-transform: lowercase;"
                                                                MaxLength="200"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                    <div class="outerBox11 pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="MobileNoLabel" runat="server" Text="Mobile No" SkinID="MandatoryLabel"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:TextBox ID="MobileNoTextBox" runat="server" onmouseleave="showHideTooltip()"
                                                                SkinID="CustomWidthTextBox" onmouseenter="showHideTooltip()" MaxLength="10"
                                                                onkeypress="javascript:return isNumberKey(this)"></asp:TextBox>
                                                        </div>
                                                    </div>

                                                    <div class="cBoth"></div>

                                                    <div class="outerBox11 pTop5 col-md-3">
                                                        <asp:LinkButton ID="TermsConditionLinkButton" runat="server" OnClick="TermsConditionLinkButton_Click"
                                                            Font-Size="Large" Text="Terms & Conditions" />
                                                    </div>
                                                    <div class="outerBox11 pTop5 col-md-3">
                                                        <asp:LinkButton ID="PrivacyPolicyLinkButton" runat="server" OnClick="PrivacyPolicyLinkButton_Click"
                                                            Font-Size="Large" Text="Privacy Policy" />
                                                    </div>
                                                    <div class="outerBox11 pTop5 col-md-3">
                                                        <asp:LinkButton ID="PaymentPolicyLinkButton" runat="server" OnClick="PaymentPolicyLinkButton_Click"
                                                            Font-Size="Large" Text="Payment Policy" />
                                                    </div>
                                                    <div class="outerBox11 pTop5 col-md-3">
                                                        <asp:LinkButton ID="DisclaimerLinkButton" runat="server" OnClick="DisclaimerLinkButton_Click"
                                                            Font-Size="Large" Text="Disclaimer" />
                                                    </div>

                                                    <div class="cBoth"></div>

                                                    <div class="outerBox pTop5 col-md-6">
                                                        <div class="fLeft pRight5" style="width: 100%">
                                                            <asp:CheckBox Checked="false" ID="TermsConditionsCheckBox" runat="server" Text="I have read and agree to the Terms & Conditions."
                                                                Font-Size="Large" onclick="enablebutton()" />
                                                        </div>
                                                    </div>

                                                    <div class="alignCenter pTop5 col-md-12">
                                                        <asp:Button ID="PayButton" runat="Server" OnClick="PayButton_Click" Text="Pay Fee" SkinID="CustomWidthButton,0" CssClass="btn btn-assign" Enabled="false" />
                                                    </div>

                                                    <div class="alignCenter alert alert-info col-md-12">
                                                        <b>Terms And Conditions</b>
                                                        <br />
                                                        <b>Please Note : </b>You will be taken to secure external payment gateway to complete
                                                        the transaction.
                                                        <br />
                                                        Please do not hit the back button or refresh the page while the transaction is in
                                                        process.
                                                        <br />
                                                        For security purposes we record your IP Address which is
                                                        <asp:Label ID="IPAddressLabel" runat="server"></asp:Label>
                                                        <br />
                                                        If for any reason, the payment receipt details are not displayed on your screen
                                                        after you have made payments,
                                                        <br />
                                                        Please Contact school office with transaction id.
                                                    </div>

                                                </div>
                                            </div>
                                            <div class="himssuHeader6WireBox">
                                                <div id="StudentFeeReceiptDiv" runat="server" visible="false" class="col-md-12"
                                                    style="padding-top: 0px !important">

                                                    <div class="himsBoxHeader card-head inner" id="Div3" runat="server">
                                                        <div class="leftdiv">
                                                        </div>
                                                        <div class="himsBoxTitle">
                                                            <div class="gridHeaderText">
                                                                <header>
                                                                    <asp:Label ID="Label2" Text="Receipt List" runat="server" />
                                                                </header>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="himsBoxContent card-body pTop5">
                                                        <div id="Div4" runat="server" visible="true" class="table-responsive">
                                                            <asp:GridView ID="StudentFeeReceiptGridView" runat="server" AutoGenerateColumns="False"
                                                                EmptyDataText="No Records Found !!" AllowPaging="False" CssClass="table table-striped table-bordered table-hover"
                                                                DataKeyNames="ReceiptId,ReceiptBookId,OrgId" ShowHeader="True">
                                                                <Columns>
                                                                    <asp:BoundField DataField="ReceiptBook" HeaderText="Receipt Book" ItemStyle-Width="10%"></asp:BoundField>
                                                                    <asp:BoundField DataField="ReceiptNumber" HeaderText="Receipt Number" ItemStyle-Width="10%"></asp:BoundField>
                                                                    <asp:TemplateField HeaderText="Receipt Date" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="StartDateLabel" Text='<%# Bind("ReceiptDate","{0:dd/MM/yyyy}") %>'
                                                                                runat="server"></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:BoundField DataField="PayType" HeaderText="Pay Type" ItemStyle-Width="10%"></asp:BoundField>
                                                                    <asp:BoundField DataField="ChequeNo" HeaderText="Cheque No" ItemStyle-Width="10%"></asp:BoundField>
                                                                    <asp:BoundField DataField="BankName" HeaderText="Bank Name" ItemStyle-Width="10%"></asp:BoundField>
                                                                    <%-- <asp:BoundField DataField="FeeDetail" HeaderText="Fee Detail" ItemStyle-Width="20%">
                                                                    </asp:BoundField>--%>
                                                                    <asp:BoundField DataField="ReceiptAmount" HeaderText="Receipt Amount" ItemStyle-Width="10%"></asp:BoundField>
                                                                    <asp:TemplateField ItemStyle-Width="10%" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:LinkButton ID="PrintReceiptLinkButton" CommandName="PrintReceiptDetail" CommandArgument="ReceiptId"
                                                                                SkinID="CustomWidthLabel" runat="server" Width="75px" Text="View Receipt" OnClick="PrintReceiptLinkButton_Click"></asp:LinkButton>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                                <PagerSettings Visible="False" />
                                                            </asp:GridView>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </ContentTemplate>
                            </cc1:TabPanel>
                            <cc1:TabPanel Width="100%" ID="TabPanel1" runat="server" HeaderText="My Transaction">
                                <HeaderTemplate>
                                    <ul class="nav nav-tabs tabs-style-iconboxinner ajaxnavtabs">
                                        <li class="fancyTab">
                                            <a href="#"><i class="fas fa-tasks"></i>&nbsp;My Transaction
                                            </a>
                                        </li>
                                    </ul>

                                </HeaderTemplate>
                                <ContentTemplate>
                                    <div class="himsBoxContent card-body">
                                        <asp:Panel ID="SearchCriteriaPanel" runat="Server">
                                            <div class="contentHolder">
                                                <asp:Panel ID="SearchPanel" runat="Server">
                                                    <div class="contentHolder">
                                                        <div class="outerBox11 pTop5 col-md-3">
                                                            <div class="controlLabelWidth">
                                                                <asp:Label ID="TransactionGatewayLabel" Text="Gateway (Use : Update Button)" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                            </div>
                                                            <div class="fLeft pRight5">
                                                                <asp:DropDownList ID="TransactionGatewayDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                                    onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control">
                                                                </asp:DropDownList>
                                                            </div>
                                                        </div>
                                                        <div class="outerBox pTop5 col-md-3">
                                                            <div class="controlLabelWidth">
                                                                <asp:Label ID="ReferenceNoLabel" runat="server" Text="Reference No"></asp:Label>
                                                            </div>
                                                            <div class="fLeft pRight5 display-flex">
                                                                <asp:TextBox ID="ReferenceNoTextBox" SkinID="CustomWidthTextBox" runat="server" MaxLength="16" TextMode="Number"></asp:TextBox>
                                                            </div>
                                                        </div>
                                                        <asp:HiddenField ID="HiddenField1" runat="server" />
                                                        <div class="outerBox pTop5 col-md-3">
                                                            <div class="controlLabelWidth">
                                                                <asp:Label ID="TransactionStatusLabel" runat="server" Text="Transaction Status"></asp:Label>
                                                            </div>
                                                            <div class="fLeft pRight5">
                                                                <asp:DropDownList runat="server" ID="TransactionStatusDropDownList" SkinID="CustomWidthDropDownList"
                                                                    class="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                                </asp:DropDownList>
                                                            </div>
                                                        </div>
                                                        <div class="outerBox pTop5 col-md-3">
                                                            <div class="controlLabelWidth">
                                                                <asp:Label ID="ReceiptBookLabel" runat="server" Text="Receipt Book"></asp:Label>
                                                            </div>
                                                            <div class="fLeft pRight5">
                                                                <asp:DropDownList runat="server" ID="ReceiptBookDropDownList" SkinID="CustomWidthDropDownList"
                                                                    class="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                                </asp:DropDownList>
                                                            </div>
                                                        </div>
                                                        <%--<div class="outerBox pTop5 col-md-3">
                                                            <div class="controlLabelWidth">
                                                                <asp:Label ID="FuncationalityLabel" Text="Functionality" runat="server"></asp:Label>
                                                            </div>
                                                            <div class="fLeft pRight5">
                                                                <asp:DropDownList ID="FuncationalityDownList" runat="server" onmouseleave="showHideTooltip()"
                                                                    onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" class="form-control">
                                                                </asp:DropDownList>
                                                            </div>
                                                        </div>--%>
                                                        <div class="outerBox pTop5 col-md-3">
                                                            <div class="controlLabelWidth">
                                                                <asp:Label ID="OSTypeLabel" Text="OSType" runat="server"></asp:Label>
                                                            </div>
                                                            <div class="fLeft pRight5">
                                                                <asp:DropDownList ID="OSTypeDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                                    onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" class="form-control">
                                                                </asp:DropDownList>
                                                            </div>
                                                        </div>
                                                        <div class="outerBox pTop5 col-md-3">
                                                            <div class="controlLabelWidth">
                                                                <asp:Label ID="FromDateLabel" runat="server" Text="From Date" Visible="True"></asp:Label>
                                                            </div>
                                                            <div class="fLeft pRight5">
                                                                <DPC:DatePickerControl ID="FromDatePickerControl" Visible="true" runat="server" DisplayDatePicker="true" />
                                                            </div>
                                                        </div>
                                                        <div class="outerBox pTop5 col-md-3">
                                                            <div class="controlLabelWidth">
                                                                <asp:Label ID="ToDateLabel" runat="server" Text="To Date" Visible="True"></asp:Label>
                                                            </div>
                                                            <div class="fLeft pRight5">
                                                                <DPC:DatePickerControl ID="ToDatePickerControl" Visible="true" runat="server" DisplayDatePicker="true" />
                                                            </div>
                                                        </div>
                                                        <div class="alignCenter col-md-12 pTop15 pb5">
                                                            <asp:Button ID="SearchButton" runat="Server" OnClick="SearchButton_Click" Text="&#xf002; Search" SkinID="0" CssClass="btn-search btn fas" />
                                                            <asp:Button ID="ClearButton" runat="server" Text="&#xf0e2; Reset" OnClick="ClearButton_Click1" SkinID="0" CssClass="btn-reset btn fas" />
                                                            <asp:Button ID="UpdateTransactionButton" runat="server" Text="&#xf044; Update Transaction" OnClick="UpdateTransactionButton_Click"
                                                                SkinID="0" CssClass="btn btn-update fas" />
                                                        </div>
                                                    </div>
                                                </asp:Panel>
                                                <div id="Div2" class="himssuHeader7WireBox box-body box-solid gridviewfont" runat="server">
                                                    <div id="ReceiptDetailDiv" visible="false" runat="server">
                                                        <div class="himsBoxHeader" id="Div6" runat="server" visible="false">
                                                            <div class="leftdiv">
                                                            </div>
                                                            <div class="himsBoxTitle">
                                                                <div class="headerText">
                                                                    <div>
                                                                        <asp:Label ID="Label3" Text="" runat="server" Font-Bold="true" />
                                                                    </div>
                                                                </div>

                                                                <%--<div class="col-md-12 padd-0">
                                                                    <div class="col-md-5">
                                                                        <asp:Label ID="Label4" Text="Records per Page : " runat="server" />
                                                                        <asp:DropDownList ID="AddRowsToGridDropDownList" SkinID="CustomWidthDropDownList" Width="60px" runat="server"
                                                                            AutoPostBack="true" OnSelectedIndexChanged="AddRowsToGridDropDownList_SelectedIndexChanged">
                                                                            <asp:ListItem Text="10" Value="10" Selected="True"></asp:ListItem>
                                                                            <asp:ListItem Text="20" Value="20"></asp:ListItem>
                                                                            <asp:ListItem Text="50" Value="50"></asp:ListItem>
                                                                            <asp:ListItem Text="100" Value="100"></asp:ListItem>
                                                                        </asp:DropDownList>
                                                                    </div>
                                                                    <div class="col-md-7">
                                                                        <uc1:GridViewPager ID="FeeReceiptListGridView_GridViewPager" runat="server" OnFirstRecordClick="FeeReceiptListGridView_GridViewPager_FirstRecordClick"
                                                                            OnLastRecordClick="FeeReceiptListGridView_GridViewPager_LastRecordClick" OnNextRecordClick="FeeReceiptListGridView_GridViewPager_NextRecordClick"
                                                                            OnPrevRecordClick="FeeReceiptListGridView_GridViewPager_PrevRecordClick" OnTextBoxValueChange="FeeReceiptListGridView_GridViewPager_TextBoxValueChange"
                                                                            ParentGridView="FeeReceiptListGridView" />
                                                                    </div>
                                                                </div>--%>
                                                            </div>
                                                        </div>
                                                        <div class="himsBoxContent">
                                                            <div id="Div7" runat="server" visible="true" class="table-responsive">
                                                                <div id="Div8" class="himsBoxContentMsg" runat="server" visible="False">
                                                                </div>
                                                                <asp:GridView ID="FeeReceiptListGridView" runat="server" AutoGenerateColumns="false"
                                                                    ShowHeader="true" OnRowDataBound="FeeReceiptListGridView_RowDataBound"
                                                                    CssClass="table table-striped table-bordered table-hover" DataKeyNames="TransactionSourceTypeId,TransactionSourceId,BankName,PaymentTransactionId,ColorCode,TransactionStatusId,FunctionalityId,PayAmount,ReceiptBook,BankTransactionId">
                                                                    <Columns>

                                                                        <asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true"
                                                                            HeaderText="">
                                                                            <HeaderTemplate>
                                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                                    <asp:CheckBox ID="HeaderCheckBox" runat="server" onClick="checkAllRows(this);" />
                                                                                    <span></span>
                                                                                </label>
                                                                            </HeaderTemplate>
                                                                            <ItemTemplate>
                                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                                    <asp:CheckBox ID="SelectCheckBox" runat="server" onClick="checkUncheckHeaderCheckBox(this);" />
                                                                                    <span></span>
                                                                                </label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:BoundField DataField="OSType" HeaderText="OS Type" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                        <asp:BoundField DataField="PaymentTransactionId" HeaderText="TransactionId / Reference No" HeaderStyle-HorizontalAlign="Left" />
                                                                        <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" HeaderText="Transaction Date Time">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="DateLabel" runat="server" Text='<%#Eval("PayDateTime","{0:dd/MM/yyyy HH:mm:ss}")%>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:BoundField DataField="Functionality" HeaderText="Functionality" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                        <asp:BoundField DataField="ClassName" HeaderText="Class" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                        <asp:BoundField DataField="Code" HeaderText="Id No / Form No" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                        <asp:BoundField DataField="Name" HeaderText="StudentName" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                        <asp:BoundField DataField="ReceiptBook" HeaderText="Receipt Book" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                        <asp:BoundField DataField="PayAmount" HeaderText="PayAmount" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                        <asp:TemplateField ItemStyle-Wrap="true" HeaderText="Status">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="TransStatusLabel" runat="server" Text='<%#Eval("TransactionStatus")%>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <%--<asp:TemplateField ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" HeaderText="Refresh">
                                                                            <ItemTemplate>
                                                                                <asp:Button ID="RefreshButton" CssClass="btn-search btn fas" runat="Server" Text="Refresh" CommandName="Refresh" OnClick="RefreshButton_Click" Height="20PX" />
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>--%>
                                                                    </Columns>
                                                                    <PagerSettings Visible="False" />
                                                                </asp:GridView>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                </ContentTemplate>
                            </cc1:TabPanel>
                        </cc1:TabContainer>
                        <%--NEXT--%>
                    </div>
                </div>
            </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>


    <script type="text/javascript">
        function enablebutton() {
            var PayButton = "<%= PayButton.ClientID %>";
            if (document.getElementById("<%= TermsConditionsCheckBox.ClientID %>").checked == true)
                document.getElementById(PayButton).disabled = false;
            else
                document.getElementById(PayButton).disabled = true;
        }

        function checkAllRows(obj) {
            var objGridview = obj.closest('table');
            var list = objGridview.getElementsByTagName("input");
            for (var i = 0; i < list.length; i++) {
                var objRow = list[i].parentNode.parentNode;
                if (list[i].type == "checkbox" && obj != list[i]) {
                    if (obj.checked) {
                        if (!list[i].disabled)
                            list[i].checked = true;
                    }
                    else {
                        if (!list[i].disabled)
                            list[i].checked = false;
                    }
                }
            }
        }
        function checkUncheckHeaderCheckBox(obj) {
            var objGridView = obj.closest('table');
            var list = objGridView.getElementsByTagName("input");
            for (var i = 0; i < list.length; i++) {
                var objHeaderChkBox = list[0];
                var checked = true;
                if (list[i].type == "checkbox" && list[i] != objHeaderChkBox) {
                    if (!list[i].checked) {
                        checked = false;
                        break;
                    }
                }
            }
            objHeaderChkBox.checked = checked;
        }



    </script>
    <%-- <script type="text/javascript">
        function calculateTotal() {

            var grid = document.getElementById('ctl00_CP_FeeAllocationGridView');
            
            var Inputs = 0;
            var FAmount = 0;
            var FAdditionalAmount = 0;
            var FDiscountAmount = 0;
            var FNotApplicableAmount = 0;
            var FPaidAmount = 0;
            var FPendingAmount = 0;
            //var FooterRow = grid.rows.length - 1;
            var FooterRow = grid.rows.length - 1;
            for (i = 0; i < grid.rows.length - 2; i++) {
                //var Inputs = document.getElementById('ctl00_CP_FeeAllocationGridView_ctl02_PendingAmountTextBox').value;

                var Inputs = $("input[id*=PendingAmountTextBox]");
                var PendingAmountLabel = $("input[id*=PendingAmountLabel]");
                //FAmount = Inputs[i].value;
                if (Inputs[i].value != "")
                    FAmount = parseFloat(FAmount) + parseFloat(Inputs[i].value);
                else
                    FAmount = parseFloat(FAmount) + parseFloat(PendingAmountLabel[i].value);
            }

            //$('.TotalvariableLabel').html(FAmount);
           
            document.getElementById('ctl00_CP_VariablePendingAmountTextBox').value = FAmount;
            document.getElementById('ctl00_CP_FooterCountTextBox').value = FooterRow;
           

        }
    </script>--%>
    <%--  <script data-main="../../JavaScript/rjs/encrypt/paystudent-fee-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/paystudent-fee")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <script type="text/javascript">
        localStorage.paystudentfeetab = Date.now();
        var onLocalStorageEvent = function (e) {
            if (e.key == "paystudentfeetab") {
                // Listen if anybody else opening the same page!
                localStorage.paystudentfeetab_available = Date.now();
            }
            if (e.key == "paystudentfeetab_available") {
                alert("One more page already open");
                window.location = '/Pages/Baseframework/MyDashBoard.aspx';
            }
        };
        window.addEventListener('storage', onLocalStorageEvent, false);
    </script>
    <button id="rzp-button1" hidden>Pay</button>
    <script src="https://erp-sdk.grayquest.com/v1/gqerp-sdk.min.js"></script>
    <script src="https://checkout.razorpay.com/v1/checkout.js"></script>
    <script type="text/javascript" src="https://ebz-static.s3.ap-south-1.amazonaws.com/easecheckout/easebuzz-checkout.js"></script>
    <script>
        var Razorpayorderid = document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_Razorpayorderid').value

        if (Razorpayorderid != null) {
            var options = {

                "key": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_RazorpayKeyId').value, // Enter the Key ID generated from the Dashboard
                //"amount": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_Razorpayamount').value, // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise
                //"currency": "INR",
                "name": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_Razorpayname').value,
                "description": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_RazorpayCollectionGroup').value,
                "image": "https://razorpay.com/favicon.png",
                "order_id": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_Razorpayorderid').value,
                "prefill": {
                    "name": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_Razorpayname').value,
                    "email": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_Razorpayemail').value,
                    "contact": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_Razorpaycontact').value
                },
                "notes": {
                    "TransactionId": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_TransactionIdHiddenField').value,
                    "Organization": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_OrganizationHiddenField').value,
                    "Batch": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_BatchHiddenField').value,
                    "Receiptbook": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_ReceiptBookHiddenField').value,
                    "StudentCode": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_StudentCodeHiddenField').value,
                    "Class": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_ClassHiddenField').value,
                    "Division": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_DivisionHiddenField').value,
                    "Name": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_Razorpayname').value,
                    "Email": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_Razorpayemail').value,
                    "Contact": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_Razorpaycontact').value,
                    "submerchant_id": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_RazorpaySubMerchantIdHiddenField').value,
                    "OsType": "Web"
                },
                //"email": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_Razorpayemail').value,
                //"contact": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_Razorpaycontact').value,

                //"callback_url": "/Pages/OnlinePayment/PaymentStatus.aspx",
                "callback_url": document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_Razorpaycallbackurl').value
            };

        }
        var rzp1 = new Razorpay(options);
        //rzp1.on('payment.failed', function (response) {
        //    alert(response.error.code);
        //    alert(response.error.description);
        //    alert(response.error.source);
        //    alert(response.error.step);
        //    alert(response.error.reason);
        //    alert(response.error.metadata.order_id);
        //    alert(response.error.metadata.payment_id);
        //});
        document.getElementById('rzp-button1').onclick = function (e) {
            rzp1.open();
            e.preventDefault();
        }
        //$("#rzp-button1").click();
        //}

        // GrayQuest Payment
        function GrayQuestSDKRender(OrgGroupId) {
            var IsGrayQuestPaymentKitOnline = document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_IsGrayQuestPaymentKitUat').value
            var environment = "live";
            if (IsGrayQuestPaymentKitOnline == "True") {
                environment = "live"
            }
            else {
                environment = "test"
            }
            var returndata = {
                paymenttransactionid: document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_GrayQuestPaymentTransactionIdHiddenField').value,
                orggroupid: OrgGroupId,
                receiptbookid: document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_ReceiptBookIdHiddenField').value
            }
            GqErpSDK.setOptions({
                env: environment,
                auth: {
                    client_id: document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_GrayQuestClientIdHiddenField').value,
                    client_secret_key: document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_GrayQuestSecretKeyHiddenField').value,
                    gq_api_key: document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_GrayQuestAPIKeyHiddenField').value,
                },
                student_id: document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_GrayQuestStudentIdHiddenField').value,
                customer_mobile: document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_GrayQuestContactNoHiddenField').value,
                fee_editable: false,
                fee_amount: parseInt(document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_GrayQuestFeeAmountHiddenField').value),
                payable_amount: parseInt(document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_GrayQuestPayableAmountHiddenField').value),
                notes: returndata,
                customizations: {
                    texts: {
                        fee_helper_text: document.getElementById('ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_GrayQuestPaymentTransactionIdHiddenField').value
                    },
                    logo_url: "https://www.vidyalayaschoolsoftware.com/assets/images/header_logo.svg",
                    theme: {
                        theme_color: "#5667FF",
                    },
                }
            });
            GqErpSDK.render();
        };

        // Popup Close Event
        document.addEventListener("onGqPopupClose", function (e) {
            console.log("GQ Popup close");
        });
        // Form Submit Event
        document.addEventListener("onGqFormSubmit", function (e) {
            console.log("form submit");
        });
        // Error Event
        document.addEventListener("onGqError", function (e) {
            console.log("Error");
        });

        //Easebuzz Payment window - Iframe      
        function processPayment() {
            var access_key = "<%=EasebuzzAccessKey%>";
            var merchant_key = "<%=EasebuzzKey%>";
            var env = "<%=EasebuzzEnv%>";
            //console.log("access_key: " + access_key);
            //console.log("EasebuzzKey: " + merchant_key);
            //console.log("env: " + env);

            var easebuzzCheckout = new EasebuzzCheckout(merchant_key, env)

            var options = {
                access_key: access_key, // access key received via Initiate Payment

                onResponse: function (response) { console.log(response); },
                theme: "#123456" // color hex
            }
            easebuzzCheckout.initiatePayment(options);
        }


        function openJsCheckoutPopup(orderId, txnToken, amount) {
            // console.log(orderId, txnToken, amount);
            var config = {
                "root": "",
                "flow": "DEFAULT",
                "data": {
                    "orderId": orderId,
                    "token": txnToken,
                    "tokenType": "TXN_TOKEN",
                    "amount": amount
                },
                "handler": {
                    "notifyMerchant": function (eventName, data) {
                        console.log("notifyMerchant handler function called");
                        console.log("eventName => ", eventName);
                        console.log("data => ", data);
                        location.reload();
                    }
                }
            };
            if (window.Paytm && window.Paytm.CheckoutJS) {
                // initialze configuration using init method
                window.Paytm.CheckoutJS.init(config).then(function onSuccess() {
                    // after successfully updating configuration, invoke checkoutjs
                    window.Paytm.CheckoutJS.invoke();
                }).catch(function onError(error) {
                    console.log("error => ", error);
                });
            }
        }
    </script>

</asp:Content>

