<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_FeeManagement_StudentwiseFee, App_Web_tognf0lv" 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/Common/StudentSearch/StudentSearch.ascx" TagName="StudentSearch" TagPrefix="Std" %>
<%@ Register Src="~/UserControls/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl" TagPrefix="hims" %>
<%@ Register Src="~/UserControls/Common/CommonSearch/CommonSearch.ascx" TagName="CommonSearchUserControl" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/AutoComplete/AutoCompleteControl.ascx" TagName="AutoCompleteControl" TagPrefix="acc" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="Date" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <style>
        #dvAssignOptionalFeeGridDiv tr > td {
            background: #fff !important;
        }

        .skin-darkblack .table.table-bordered tbody tr:first-child th,
        table-bordered > thead > tr > th {
            color: #000 !important;
        }

        .table.table-bordered tbody tr:first-child th,
        .table-bordered > thead > tr > th,
        table.table-bordered tr:first-child td {
            color: unset !important;
        }
    </style>
    <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" />
            <Std:StudentSearch ID="StudentSearch1" Visible="false" runat="server" />
            <Std:StudentSearch ID="HistoryStudentSearch" Visible="false" runat="server" />
            <uc1:CommonSearchUserControl ID="CommonSearchControl" 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="104"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader1WireBox card card-box">
                        <%--<div class="himsBoxHeader card-head">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText">
                                    <header>
                                        <i class="fas fa-tasks"></i>
                                        <asp:Label ID="AssignToLabel" runat="server" Text="Assign To"></asp:Label>
                                    </header>
                                </div>
                            </div>
                        </div>--%>
                        <cc1:TabContainer Width="100%" ID="StudentFeeTabContainer" runat="server" CssClass="ajax__myTab nav nav-tabs tabs-style-iconbox"
                            AutoPostBack="true" meta:resourcekey="StudentFeeTabContainerResource1"
                            ActiveTabIndex="0">
                            <cc1:TabPanel Width="100%" ID="StudentwiseFeeTabPanel" runat="server" HeaderText="Exam Master">
                                <HeaderTemplate>
                                    <ul class="nav nav-tabs tabs-style-iconboxinner ajaxnavtabs">
                                        <li class="fancyTab">
                                            <a href="#"><i class="fas fa-tasks"></i>&nbsp;Assign To
                                            </a>
                                        </li>
                                    </ul>

                                </HeaderTemplate>
                                <ContentTemplate>
                                    <div class="himsBoxContent card-body">
                                        <div class="contentHolder col-md-12 col-xs-12" style="overflow: inherit">
                                            <div class="col-md-12 col-xs-12 bg-lghtgrey text-center" runat="server" visible="false">
                                                <div class="col-md-6 col-xs-12">
                                                    <asp:RadioButton ID="StudentRadioButton" runat="server" GroupName="S1" Text="Student" AutoPostBack="true"
                                                        OnCheckedChanged="StudentRadioButton_CheckedChanged" />

                                                    <%--  <asp:Label ID="StudentLabel" runat="server" Text="Student" Font-Bold="true"></asp:Label>--%>
                                                </div>
                                                <div class="col-md-6 col-xs-12">
                                                    <asp:RadioButton ID="EmployeeRadioButton" runat="server" GroupName="S1" Text="Employee" AutoPostBack="true"
                                                        OnCheckedChanged="EmployeeRadioButton_CheckedChanged" />

                                                    <%--<asp:Label ID="EmployeeLabel" runat="server" Text="Employee" Font-Bold="true"></asp:Label>--%>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3 col-sm-4 col-xs-12">
                                                <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"
                                                        class="form-control" OnSelectedIndexChanged="OrganizationDropDownList_OnSelectedIndexChanged">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3 col-sm-4 col-xs-12">
                                                <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" class="form-control"
                                                        AutoPostBack="true" OnSelectedIndexChanged="BatchDropDownList_OnSelectedIndexChanged">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <asp:Panel ID="StudentSearchPanel" runat="server">
                                                <div class="outerBox pTop5 col-md-3 col-sm-4 col-xs-12">
                                                    <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="" 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" />
                                                        <input type="hidden" id="OneTabHiddenField" />
                                                        <asp:HiddenField ID="SourceIdHiddenField" runat="server" />
                                                        <asp:HiddenField ID="ClassIdHiddenField" runat="server" />

                                                        <asp:HiddenField ID="AdmissionCategoryIdHiddenField" runat="server" />
                                                        <asp:HiddenField ID="ExtraRemarkHiddenValue" runat="server" />

                                                        <asp:HiddenField ID="IdHiddenField" runat="server" />
                                                        <asp:HiddenField ID="IsEnableChangeLogHiddenField" runat="server" />
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3 col-sm-4 col-xs-12">
                                                    <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 col-sm-4 col-xs-12">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="ClassLabel" runat="server" Text="Class \ Fee Category"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="ClassTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" runat="server"> </asp:TextBox>
                                                    </div>
                                                </div>
                                                <div id="DivForChangeLog" runat="server" visible="false">
                                                    <div class="outerBox11 pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="IsEnableChangeLogLabel" runat="server" SkinID="MandatoryLabel" Text="Change Remark"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight15">
                                                            <asp:TextBox ID="IsEnableChangeLogTextBox" runat="server" SkinID="0"
                                                                onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" TextMode="MultiLine"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="fLeft">
                                                        <asp:CheckBox ID="ExtraRemarkCheckBox" runat="server" Text="With Extra Remark" OnCheckedChanged="ExtraRemarkCheckBox_CheckedChanged" AutoPostBack="true" />
                                                    </div>
                                                </div>
                                                <%--Mantis -0031307	 ---%>
                                                <div class="outerBox11 pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="ReferenceRemarkLabel" runat="server" Text="Fees Remark"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="FeesRemarkTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            SkinID="MultiLineTextBox" TextMode="MultiLine" runat="server"> </asp:TextBox>
                                                    </div>
                                                </div>

                                                <%--   <div class="outerBox pTop5 col-md-3 col-sm-4 col-xs-12">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="FeeCategoryLabel" runat="server"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:Label ID="OutFeeCategoryLabel" runat="server"></asp:Label>
                                                    </div>
                                                </div>--%>

                                                <div class="modal fade popup-data" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
                                                    <div class="modal-dialog modal-dialog modal-xl" role="document">
                                                        <div class="modal-content">
                                                            <div class="modal-header">
                                                                <h5 class="modal-title" id="exampleModalLabel">Change Log Remark
                                                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                                                    <span aria-hidden="true">&times;</span>
                                                                </button>

                                                                </h5>

                                                            </div>
                                                            <div class="modal-body">
                                                                <div class="table-responsive">
                                                                    <table id='tlbChangeLog' class='table table-striped table-bordered'>
                                                                    </table>

                                                                </div>
                                                            </div>

                                                        </div>
                                                    </div>
                                                </div>
                                            </asp:Panel>
                                            <asp:Panel ID="EmployeeSearchPanel" runat="server" Visible="false">
                                                <div class="outerBox pTop5 col-md-3 ">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="EmployeeIdNoLabel" runat="server" Text="Id No" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5 ">
                                                        <asp:TextBox ID="EmployeeIdNoTextBox" SkinID="CustomWidthTextBox" runat="server"
                                                            MaxLength="200" AutoPostBack="true" OnTextChanged="EmployeeIdNoTextBox_TextChanged">
                                                        </asp:TextBox>
                                                        <asp:ImageButton SkinID="FindImage" ToolTip="Employee Search" ID="EmployeeIdNoImageButton"
                                                            runat="server" Style="width: 14px" />
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3 col-sm-4 col-xs-12">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="EmployeeNameLabel" runat="server" Text="Name"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="EmployeeNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3 col-sm-4 col-xs-12">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="DepartmentLabel" runat="server" Text="Department"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="DepartmentTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                                    </div>
                                                </div>
                                            </asp:Panel>

                                            <div class="cBoth">
                                            </div>
                                            <div class="himssuHeader6WireBox">
                                                <div id="FeeAllocationDetailDiv" runat="server" visible="false">
                                                    <div class="himsBoxHeader pTop5" id="GridViewPagerDiv" runat="server" visible="false">
                                                        <div class="leftdiv">
                                                        </div>
                                                        <div class="himsBoxTitle" style="padding-left: 10px; padding-right: 10pt;">

                                                            <%--<div class="fRight mt-27 pagination display-flex display-flex">
                                                    <asp:Label ID="ExemptionTypeLabel" Text="Exemption Type" runat="server" Width="154px"></asp:Label>
                                                    <asp:Label ID="FeeHeadLabel" Text="Fee Head" runat="server" Width="154px"></asp:Label>
                                                    <asp:Label ID="ApplyLabel" Text="Exemption" runat="server" Width="154px"></asp:Label>
                                                    <asp:Label ID="PercentLabel" Text="Percent" runat="server" Width="60px"></asp:Label>
                                                    <asp:Label ID="ButtonLabel" Text="" runat="server" Width="80px"></asp:Label>
                                                </div>
                                                <br />
                                                <div class="fRight mt-27 pagination display-flex display-flex">
                                                    <asp:DropDownList ID="ExemptionTypeDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                        onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" class="form-control">
                                                    </asp:DropDownList>
                                                    <asp:DropDownList ID="FeeHeadIdDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                        onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" class="form-control">
                                                    </asp:DropDownList>
                                                    <asp:DropDownList ID="ApplyDropDownList" runat="server" SkinID="CustomWidthDropDownList"
                                                        class="form-control">
                                                        <asp:ListItem Text="- Select -" Value="0" Selected="True"></asp:ListItem>
                                                        <asp:ListItem Text="Additional Amount" Value="1"></asp:ListItem>
                                                        <asp:ListItem Text="Exemption Amount" Value="2"></asp:ListItem>
                                                        <asp:ListItem Text="Not Applicable Amount" Value="3"></asp:ListItem>
                                                    </asp:DropDownList>
                                                    <asp:TextBox ID="ApplyTextBox" runat="server" ClientIDMode="Static" SkinID="CustomWidthTextBox"
                                                        Width="60px" MaxLength="9" onkeypress="javascript:return isNumberKey(this)"></asp:TextBox>
                                                    <asp:Button ID="ApplyButton" runat="server" OnClick="ApplyButton_Click"
                                                        Text="Apply" SkinID="0" CssClass="btn btn-assign fas" />
                                                </div>--%>
                                                            <div class="card-head inner">

                                                                <div class="fLeft pRight5 headerText">
                                                                    <header>
                                                                        <asp:Label ID="GridViewLabel" Text="Available Fee List" runat="server" />
                                                                    </header>
                                                                </div>
                                                            </div>
                                                            <%--for mantis 0039673 : Changes Button Position : by Krunal K Patel--%>
                                                            <%--Student Refund Details--%>
                                                            <%--<div class="col-md-12" style="margin-top: 1%; margin-bottom: 1%;">--%>
                                                            <div class="fRight pull-right">
                                                                <asp:Button ID="StudentRefundDetailsButton" runat="Server" OnClick="StudentRefundDetailsButton_Click" Text="Student Refund Details Show"
                                                                    SkinID="0" CssClass="btn btn-assign fas" Visible="true" />
                                                            </div>
                                                            <div class="col-md-12 padd-0">
                                                                <div class="outerBox pTop5 col-md-2">
                                                                    <div class="controlLabelWidth">
                                                                        <asp:Label ID="ExemptionTypeLabel" Text="Exemption Type" runat="server" Width="154px"></asp:Label>
                                                                    </div>
                                                                    <div class="fLeft pRight5">
                                                                        <asp:DropDownList ID="ExemptionTypeDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                                            onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" class="form-control"
                                                                            OnSelectedIndexChanged="ExemptionTypeDropDownList_SelectedIndexChanged" AutoPostBack="true">
                                                                        </asp:DropDownList>
                                                                    </div>
                                                                </div>

                                                                <div class="outerBox pTop5 col-md-2">
                                                                    <div class="controlLabelWidth">
                                                                        <asp:Label ID="FeeHeadLabel" Text="Fee Head" runat="server" Width="154px"></asp:Label>
                                                                    </div>
                                                                    <div class="fLeft pRight5">
                                                                        <asp:DropDownList ID="FeeHeadIdDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                                            onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" class="form-control">
                                                                        </asp:DropDownList>
                                                                    </div>
                                                                </div>

                                                                <div class="outerBox pTop5 col-md-2">
                                                                    <div class="controlLabelWidth">
                                                                        <asp:Label ID="ApplyLabel" Text="Applicable To" runat="server" Width="154px"></asp:Label>
                                                                    </div>
                                                                    <div class="fLeft pRight5">
                                                                        <asp:DropDownList ID="ApplyDropDownList" runat="server" SkinID="CustomWidthDropDownList"
                                                                            class="form-control">
                                                                            <asp:ListItem Text="- Select -" Value="0" Selected="True"></asp:ListItem>
                                                                            <asp:ListItem Text="Additional Amount" Value="1"></asp:ListItem>
                                                                            <asp:ListItem Text="Exemption Amount" Value="2"></asp:ListItem>
                                                                            <asp:ListItem Text="Not Applicable Amount" Value="3"></asp:ListItem>
                                                                        </asp:DropDownList>
                                                                    </div>
                                                                </div>

                                                                <div class="outerBox pTop5 col-md-2">
                                                                    <div class="controlLabelWidth">
                                                                        <asp:Label ID="AssignTypeLabel" Text="Assign Type" runat="server" Width="154px"></asp:Label>
                                                                    </div>
                                                                    <div class="fLeft pRight5">
                                                                        <asp:DropDownList ID="AssignTypeDropDownList" runat="server" SkinID="CustomWidthDropDownList"
                                                                            class="form-control">
                                                                            <asp:ListItem Text="- Select -" Value="0" Selected="True"></asp:ListItem>
                                                                            <asp:ListItem Text="Amount" Value="1"></asp:ListItem>
                                                                            <asp:ListItem Text="Percentage" Value="2"></asp:ListItem>
                                                                        </asp:DropDownList>
                                                                    </div>
                                                                </div>

                                                                <div class="outerBox pTop5 col-md-2">
                                                                    <br />
                                                                    <div class="fLeft pRight5">
                                                                        <asp:TextBox ID="ApplyTextBox" runat="server" ClientIDMode="Static" SkinID="CustomWidthTextBox"
                                                                            Width="100px" MaxLength="9" onkeypress="javascript:return isNumberKeyForApply(this)"></asp:TextBox>
                                                                    </div>
                                                                </div>

                                                                <div class="outerBox pTop5 col-md-2">
                                                                    <div class="controlLabelWidth">
                                                                        <asp:Label ID="ButtonLabel" Text="" runat="server" Width="80px"></asp:Label>
                                                                    </div>
                                                                    <div class="fLeft pRight5" style="width: 200px">
                                                                        <asp:Button ID="ApplyButton" runat="server" OnClick="ApplyButton_Click"
                                                                            Text="Apply" SkinID="0" CssClass="btn btn-apply fas" />
                                                                        <asp:Button ID="ApplyExemptionTypeButton" runat="server" OnClick="ApplyExemptionTypeButton_Click"
                                                                            Text="Apply Exemption" SkinID="0" CssClass="btn btn-apply fas" />
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <%-- <div class="himsBoxContent  col-md-12 pTop5 table-responsive" style="padding-bottom: 0px !important" >--%>
                                                    <div class="himsBoxContent">
                                                        <div id="Div5" runat="server" visible="false">
                                                            <div id="GridViewMessageDiv" class="himsBoxContentMsg" runat="server" visible="False">
                                                            </div>


                                                            <asp:GridView ID="FeeAllocationGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                EmptyDataText="No Records Found !!" AllowPaging="false" ShowHeader="true" DataKeyNames="FeeHeadId,FeeId,FeeName,ExemptionTypeId" Style="margin: 0px;"
                                                                CssClass="table table-striped table-bordered table-hover" OnRowDataBound="FeeAllocationGridView_RowDataBound"
                                                                ShowFooter="true">
                                                                <Columns>
                                                                    <asp:TemplateField HeaderText="Fee" ItemStyle-Width="10%" HeaderStyle-Width="100px" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" ItemStyle-Height="30px" HeaderStyle-Height="30px">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="FeeNameLabel" ClientIDMode="Static" runat="server" Text='<%#Eval("FeeCode")%>' Height="30px"></asp:Label>
                                                                        </ItemTemplate>
                                                                        <FooterTemplate>
                                                                            <asp:Label ID="FFeeNameLabel" ClientIDMode="Static" runat="server" Text="Total" Font-Bold="true"></asp:Label>
                                                                        </FooterTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Optional" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="70px" ItemStyle-Width="70px"
                                                                        ItemStyle-Wrap="true">
                                                                        <ItemStyle HorizontalAlign="Center" />
                                                                        <ItemTemplate>
                                                                            <label class="rt-chkbox rt-chkbox-outline">
                                                                                <asp:CheckBox ID="IsOptionalCheckBox" Checked='<%#Eval("IsOptional")%>' Enabled="false"
                                                                                    runat="server" />
                                                                                <span></span>
                                                                            </label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Variable" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="70px" ItemStyle-Width="70px"
                                                                        ItemStyle-Wrap="true">
                                                                        <ItemStyle HorizontalAlign="Center" />
                                                                        <ItemTemplate>
                                                                            <label class="rt-chkbox rt-chkbox-outline">
                                                                                <asp:CheckBox ID="IsVariableCheckBox" Checked='<%#Eval("IsVariable")%>' Enabled="false"
                                                                                    runat="server" />
                                                                                <span></span>
                                                                            </label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Amount" ItemStyle-Width="7%" ItemStyle-Wrap="true"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:TextBox ID="AmountTextBox" runat="server" ClientIDMode="Static" MaxLength="15"
                                                                                SkinID="CustomWidthTextBox" Width="70px" onKeypress="javascript:return MaskDecimal(event,12,2)"
                                                                                AutoPostBack="false" onkeyup="funcsum(this)"></asp:TextBox>
                                                                        </ItemTemplate>
                                                                        <FooterTemplate>
                                                                            <asp:Label ID="AmountLabel" runat="server" ClientIDMode="Static" Font-Bold="true"></asp:Label>
                                                                        </FooterTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Additional Amount" ItemStyle-Width="6%" ItemStyle-Wrap="true"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:TextBox ID="AdditionalAmountTextBox" runat="server" ClientIDMode="Static" MaxLength="15"
                                                                                SkinID="CustomWidthTextBox" Width="70px"
                                                                                AutoPostBack="false" onKeypress="javascript:return MaskDecimal(event,12,2)" onkeyup="funcsum(this)">
                                                                            </asp:TextBox>
                                                                        </ItemTemplate>
                                                                        <FooterTemplate>
                                                                            <asp:Label ID="AdditionalAmountLabel" runat="server" ClientIDMode="Static" Font-Bold="true"></asp:Label>
                                                                        </FooterTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Exemption Amount" ItemStyle-Width="6%" ItemStyle-Wrap="true"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:TextBox ID="DiscountAmountTextBox" runat="server" ClientIDMode="Static" MaxLength="15"
                                                                                SkinID="CustomWidthTextBox" Width="70px" onkeydown="myFunction(this)"
                                                                                onKeypress="javascript:return MaskDecimal(event,12,2)" AutoPostBack="false" onkeyup="funcsum(this)"></asp:TextBox>
                                                                            <asp:HiddenField Value='<%#Eval("DiscountAmount")%>' runat="server" />
                                                                        </ItemTemplate>
                                                                        <FooterTemplate>
                                                                            <asp:Label ID="DiscountAmountLabel" runat="server" ClientIDMode="Static" Font-Bold="true"></asp:Label>
                                                                        </FooterTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Not Applicable Amount" ItemStyle-Width="6%" ItemStyle-Wrap="true"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:TextBox ID="NotApplicableAmountTextBox" runat="server" ClientIDMode="Static"
                                                                                MaxLength="15" SkinID="CustomWidthTextBox" Width="70px"
                                                                                onKeypress="javascript:return MaskDecimal(event,12,2)" AutoPostBack="false" onkeyup="funcsum(this)"></asp:TextBox>
                                                                            <asp:HiddenField Value='<%#Eval("NotApplicableAmount")%>' runat="server" />
                                                                        </ItemTemplate>
                                                                        <FooterTemplate>
                                                                            <asp:Label ID="NotApplicableAmountLabel" runat="server" ClientIDMode="Static" Font-Bold="true"></asp:Label>
                                                                        </FooterTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Paid Amount" ItemStyle-Width="7%" ItemStyle-Wrap="true"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="PaidAmountLabel" ClientIDMode="Static" runat="server"></asp:Label>

                                                                        </ItemTemplate>
                                                                        <FooterTemplate>
                                                                            <asp:Label ID="FPaidAmountLabel" ClientIDMode="Static" runat="server" Font-Bold="true"></asp:Label>
                                                                        </FooterTemplate>
                                                                    </asp:TemplateField>                              
                                                                    <asp:TemplateField HeaderText="Fee Refund" ItemStyle-Width="7%" ItemStyle-Wrap="true" Visible="false"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="FeeRefundLabel" ClientIDMode="Static" runat="server"  Text='<%#Eval("RefundAmount")%>'></asp:Label>
                                                                        </ItemTemplate>
                                                                        <FooterTemplate>
                                                                            <asp:Label ID="FFeeRefundLabel" ClientIDMode="Static" runat="server" Font-Bold="true"></asp:Label>
                                                                        </FooterTemplate>
                                                                    </asp:TemplateField>
                                                                   
                                                                    <asp:TemplateField HeaderText="Pending Amount" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <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>
                                                                        </FooterTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Start Date" ItemStyle-Width="80px" ItemStyle-Wrap="true"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <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-Width="80px" ItemStyle-Wrap="true"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="EndDateLabel" Text='<%# Bind("EndDate","{0:dd/MM/yyyy}") %>' runat="server"></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Status" ItemStyle-Width="7%" ItemStyle-Wrap="true"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="StatusLabel" runat="server"></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Remark" ItemStyle-Width="8%" ItemStyle-Wrap="true"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:TextBox ID="RemarkTextBox" runat="server" ClientIDMode="Static" MaxLength="200"
                                                                                Width="200px" SkinID="CustomWidthTextBox"></asp:TextBox>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Additional Remark" ItemStyle-Width="8%" ItemStyle-Wrap="true" Visible="false"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:TextBox ID="AdditionalRemarkTextBox" runat="server" ClientIDMode="Static" MaxLength="200"
                                                                                Width="200px" SkinID="CustomWidthTextBox"></asp:TextBox>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Exemption Remark" ItemStyle-Width="8%" ItemStyle-Wrap="true" Visible="false"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:TextBox ID="ExemptionRemarkTextBox" runat="server" ClientIDMode="Static" MaxLength="200"
                                                                                Width="200px" SkinID="CustomWidthTextBox"></asp:TextBox>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Not Applicable Remark" ItemStyle-Width="8%" ItemStyle-Wrap="true" Visible="false"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:TextBox ID="NotApplicableRemarkTextBox" runat="server" ClientIDMode="Static" MaxLength="200"
                                                                                Width="200px" SkinID="CustomWidthTextBox"></asp:TextBox>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>

                                                                </Columns>
                                                                <PagerSettings Visible="False" />
                                                            </asp:GridView>


                                                            <asp:HiddenField ID="hfFeeAllocationGridViewSV" runat="server" />
                                                            <asp:HiddenField ID="hfFeeAllocationGridViewSH" runat="server" />
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

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

                                                <div class="himsBoxHeader card-head inner" id="Div6" runat="server">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                        <div class="headerText">
                                                            <header>
                                                                <asp:Label ID="OldBatchFeeLabel" Text="Old Batch Fee" runat="server" />
                                                        </div>
                                                        </header>
                                                    </div>
                                                </div>
                                                <div class="himsBoxContent  width-100 pTop5 table-responsive">
                                                    <div id="Div7" runat="server" visible="true">
                                                        <asp:GridView ID="FeePendingAllBatchGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                            EmptyDataText="No Records Found !!" AllowPaging="False" CssClass="table table-striped table-bordered table-hover"
                                                            DataKeyNames="" ShowHeader="True">
                                                            <Columns>
                                                                <asp:BoundField DataField="ReceiptBookTitle" HeaderText="Receipt Book" ItemStyle-Width="10%"></asp:BoundField>
                                                                <asp:BoundField DataField="BatchName" HeaderText="Batch Name" ItemStyle-Width="10%"></asp:BoundField>
                                                                <asp:BoundField DataField="ClassDivision" HeaderText="Class Division" ItemStyle-Width="10%"></asp:BoundField>
                                                                <asp:BoundField DataField="PendingFeeName" HeaderText="Pending Fee Detail" ItemStyle-Width="60%"></asp:BoundField>
                                                                <asp:BoundField DataField="PendingAmount" HeaderText="Pending Amount" ItemStyle-Width="10%"></asp:BoundField>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <%--Changes done for mantis : 34444 by Nilesh--%>
                                        <div id="PDCDiv" runat="server" style="padding-top: 0px !important">
                                            <div class="himssuHeader6WireBox col-md-12 pTop5">
                                                <div class="himsBoxHeader card-head inner" id="PDCHeading" runat="server">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                        <div class="headerText">
                                                            <header>
                                                                <asp:Label ID="PDCHeadLabel" Text="PDC Details" runat="server" />
                                                        </div>
                                                        </header>
                                                    </div>
                                                </div>
                                                <div class="himsBoxContent  width-100 pTop5 table-responsive">
                                                    <div id="Div27" runat="server" visible="true">
                                                        <asp:GridView ID="PDCGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                            EmptyDataText="No Records Found !!" AllowPaging="False" CssClass="table table-striped table-bordered table-hover"
                                                            DataKeyNames="" ShowHeader="True">
                                                            <Columns>
                                                                <asp:BoundField DataField="ReceiptBook" HeaderText="Receipt Book" ItemStyle-Width="10%"></asp:BoundField>
                                                                <asp:BoundField DataField="PayType" HeaderText="Pay Type" ItemStyle-Width="10%"></asp:BoundField>
                                                                <asp:BoundField DataField="PaymentClearanceDate" HeaderText="Cheque Date" ItemStyle-Width="10%" DataFormatString="{0:dd/MM/yyyy}"></asp:BoundField>
                                                                <%--Mantis - 0035153--%>
                                                                <asp:BoundField DataField="ChequeNo" HeaderText="Cheque No" ItemStyle-Width="20%"></asp:BoundField>
                                                                <asp:BoundField DataField="BankName" HeaderText="Bank Name" ItemStyle-Width="20%"></asp:BoundField>
                                                                <asp:BoundField DataField="ReceiptAmount" HeaderText="Amount" ItemStyle-Width="10%"></asp:BoundField>
                                                                <asp:BoundField DataField="Remark" HeaderText="Remark" ItemStyle-Width="10%"></asp:BoundField>
                                                                <asp:BoundField DataField="StatusTitle" HeaderText="Status" ItemStyle-Width="10%"></asp:BoundField>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div id="AssignOptionalFeeDetailDiv" runat="server"
                                            style="padding-top: 0px !important;">
                                            <div class="himssuHeader6WireBox col-md-12 pTop5">
                                                <div class="himsBoxHeader " id="Div1" runat="server">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                        <div class="himsBoxHeader card-head inner" id="Div21" runat="server">
                                                            <div class="leftdiv">
                                                            </div>
                                                            <div class="himsBoxTitle">
                                                                <div class="headerText">
                                                                    <header>
                                                                        <asp:Label ID="Label1" Text="Assign Optional Fee / Fee Head" runat="server" />
                                                                </div>
                                                                </header>
                                                            </div>
                                                        </div>
                                                        <div>
                                                            <asp:RadioButtonList ID="SourceTypeRadioButtonList" runat="server" RepeatDirection="Horizontal" Style="width: 50%" AutoPostBack="false" OnSelectedIndexChanged="SourceTypeRadioButtonList_SelectedIndexChanged" onchange="SourceTypeChange();">
                                                                <asp:ListItem Text="Fee Wise" Value="1" Selected="True"></asp:ListItem>
                                                                <asp:ListItem Text="Fee Head Wise" Value="2"></asp:ListItem>
                                                            </asp:RadioButtonList>
                                                        </div>
                                                        <div class="fRight pull-right">
                                                            <input type="button" id="AssignOptionalFeeButton" value="Assign Optional Fee" onclick="AssignOptionalFee();" class="btn fa-solid fa-location-arrow" style="background-color: #2c2c54; color: white" runat="server" />
                                                            <asp:Button ID="AssingButton" runat="Server" OnClick="AssignButton_Click" Text="Assign Optional Fee"
                                                                SkinID="0" CssClass="btn btn-assign fas" Visible="false" />
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="himsBoxContent width-100 pTop5 table-responsive">
                                                    <div id="Div2" runat="server" visible="true">
                                                        <asp:Button ID="JqerySuccessMessageButton" runat="server" Text="Refresh" CssClass="btn back fas" OnClick="JqerySuccessMessageButton_Click" Style="display: none" />
                                                        <asp:Button ID="JqeryErrorMessageButton" runat="server" Text="Refresh" CssClass="btn back fas" OnClick="JqeryErrorMessageButton_Click" Style="display: none" />
                                                        <table class="table table-striped table-bordered " id="AssignOptionalFeeTable">
                                                            <thead>
                                                                <tr>
                                                                    <th scope="col" style="width: 2%; text-align: center">Select</th>
                                                                    <th scope="col">Optional Fee</th>
                                                                </tr>
                                                            </thead>
                                                            <tbody id="dvAssignOptionalFeeGridDiv">
                                                            </tbody>
                                                        </table>
                                                        <asp:GridView ID="AssignOptionalFeeGridView" runat="server" AutoGenerateColumns="False" Visible="false"
                                                            EmptyDataText="No Records Found !!" AllowPaging="False" CssClass="table table-striped table-bordered table-hover"
                                                            DataKeyNames="Id" ShowHeader="True">
                                                            <Columns>
                                                                <asp:TemplateField HeaderText="Select" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="2%"
                                                                    ItemStyle-Wrap="true">
                                                                    <ItemStyle HorizontalAlign="Center" />
                                                                    <ItemTemplate>
                                                                        <label class="rt-chkbox rt-chkbox-outline">
                                                                            <asp:CheckBox ID="SelectCheckBox" runat="server" Checked='<%# Convert.ToBoolean(Eval("IsCheck")) %>' onclick="GetOptionalFeeDetail(this);" />
                                                                            <asp:HiddenField ID="hdID" Value='<%#Eval("Id") %>' runat="server" />
                                                                        </label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:BoundField DataField="Title" HeaderText="Optional Fee" ItemStyle-Width="20%"></asp:BoundField>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div id="StudentFeeReceiptDiv" runat="server" visible="false"
                                            style="padding-top: 0px !important">
                                            <div class="himssuHeader6WireBox col-md-12 pTop5">
                                                <div class="himsBoxHeader card-head inner" id="Div3" runat="server">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                        <div class="headerText">
                                                            <header>
                                                                <asp:Label ID="Label2" Text="Receipt List" runat="server" />
                                                            </header>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="himsBoxContent width-100 pTop5 table-responsive">
                                                    <div id="Div4" runat="server" visible="true">
                                                        <asp:GridView ID="StudentFeeReceiptGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                            EmptyDataText="No Records Found !!" AllowPaging="False" CssClass="table table-striped table-bordered table-hover"
                                                            DataKeyNames="ReceiptId,ReceiptBookId" ShowHeader="True" OnRowDataBound="StudentFeeReceiptGridView_RowDataBound">
                                                            <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="30%"></asp:BoundField>
                                                                <asp:BoundField DataField="ReceiptAmount" HeaderText="Receipt Amount" ItemStyle-Width="10%"></asp:BoundField>
                                                                <asp:BoundField DataField="DiscountAmount" HeaderText="Discount Amount" ItemStyle-Width="10%"></asp:BoundField>
                                                                <asp:TemplateField HeaderText="Status" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                                    HeaderStyle-HorizontalAlign="Center">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblStatus" runat="server" Text='<%# (Convert.ToBoolean(Eval("IsObsolete")) == true) ? "Cancelled" : "Clear"   %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Print" ItemStyle-Width="15%" ItemStyle-Wrap="true"
                                                                    HeaderStyle-HorizontalAlign="Center">
                                                                    <ItemTemplate>
                                                                        <asp:Button ID="ReceiptPrintButton" runat="server" Text="&#xf02f; Print"
                                                                            SkinID="0" CssClass="btn-print btn fas" OnClick="ReceiptPrintButton_Click" />
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <%--Student Sibling Fee Details--%>
                                        <div class="col-md-12" style="margin-top: 1%; margin-bottom: 1%;">
                                            <asp:Button ID="StudentSiblingFeeDetail" runat="Server" OnClick="StudentSiblingFeeDetail_Click" Text="Student Sibling Fee Detail Show"
                                                SkinID="0" CssClass="btn btn-assign fas" Visible="false" />
                                        </div>
                                        <div id="StudentSiblingFeeDetailDiv" runat="server" visible="false"
                                            style="padding-top: 0px !important">
                                            <div class="himssuHeader6WireBox col-md-12 pTop5">
                                                <div class="himsBoxHeader card-head inner" id="Div20" runat="server">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                        <div class="headerText">
                                                            <header>
                                                                <asp:Label ID="Label6" Text="Student Slibling Fee Details" runat="server" />
                                                            </header>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-md-12">
                                                    <asp:Label ID="HtmlStringLabel" runat="server"></asp:Label>
                                                </div>
                                                <div class="himsBoxContent width-100 pTop5 table-responsive">
                                                    <div id="Div17" runat="server" visible="true">
                                                        <asp:GridView ID="StudentSiblingFeeDetailsGridView" runat="server" Width="100%" AutoGenerateColumns="False" Visible="false"
                                                            EmptyDataText="No Records Found !!" AllowPaging="False" CssClass="table table-striped table-bordered table-hover" OnRowDataBound="StudentSiblingFeeDetailsGridView_RowDataBound"
                                                            ShowHeader="True">
                                                            <Columns>
                                                                <asp:BoundField DataField="FeeCode" HeaderText="Fee" ItemStyle-Width="10%"></asp:BoundField>
                                                                <asp:TemplateField HeaderText="Optional" ItemStyle-Width="5%" ItemStyle-Wrap="true"
                                                                    HeaderStyle-HorizontalAlign="Center">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="IsOptionalLabel" runat="server" Text='<%# (Convert.ToBoolean(Eval("IsOptional")) == true) ? "Y" : "N"   %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Variable" ItemStyle-Width="5%" ItemStyle-Wrap="true"
                                                                    HeaderStyle-HorizontalAlign="Center">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="IsVariableLabel" runat="server" Text='<%# (Convert.ToBoolean(Eval("IsVariable")) == true) ? "Y" : "N"   %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:BoundField DataField="Amount" HeaderText="Amount" ItemStyle-Width="5%"></asp:BoundField>
                                                                <asp:BoundField DataField="AdditionalAmount" HeaderText="Additional Amount" ItemStyle-Width="5%"></asp:BoundField>
                                                                <asp:BoundField DataField="DiscountAmount" HeaderText="Exemption Amount" ItemStyle-Width="5%"></asp:BoundField>
                                                                <asp:BoundField DataField="NotApplicableAmount" HeaderText="Not Applicable Amount" ItemStyle-Width="5%"></asp:BoundField>
                                                                <asp:BoundField DataField="PaidAmount" HeaderText="Paid Amount" ItemStyle-Width="5%"></asp:BoundField>
                                                                <asp:BoundField DataField="PendingAmount" HeaderText="Pending Amount" ItemStyle-Width="5%"></asp:BoundField>
                                                                <asp:BoundField DataField="StartDate" HeaderText="Start Date" ItemStyle-Width="5%" DataFormatString="{0:dd/MM/yyyy}"></asp:BoundField>
                                                                <asp:BoundField DataField="EndDate" HeaderText="End Date" ItemStyle-Width="5%" DataFormatString="{0:dd/MM/yyyy}"></asp:BoundField>
                                                                <asp:TemplateField HeaderText="Status" ItemStyle-Width="5%" ItemStyle-Wrap="true"
                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="StatusLabel" runat="server"></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:BoundField DataField="Remark" HeaderText="Remark" ItemStyle-Width="10%"></asp:BoundField>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div id="StudentRefundDetailsDiv" runat="server" visible="false"
                                            style="padding-top: 0px !important">
                                            <div class="himssuHeader6WireBox col-md-12 pTop5">
                                                <div class="himsBoxHeader card-head inner" id="Div22" runat="server">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                        <div class="headerText">
                                                            <header>
                                                                <asp:Label ID="Label7" Text="Student Refund Details" runat="server" />
                                                            </header>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-md-12">
                                                    <asp:Label ID="Label8" runat="server"></asp:Label>
                                                </div>
                                                <div class="himsBoxContent width-100 pTop5 table-responsive">
                                                    <div id="StudentRefundGridViewDiv" runat="server" visible="true">
                                                        <asp:GridView ID="StudentRefundGridView" runat="server" Width="100%" AutoGenerateColumns="False" Visible="true"
                                                            EmptyDataText="No Records Found !!" AllowPaging="False" CssClass="table table-striped table-bordered table-hover"
                                                            ShowHeader="True">
                                                            <Columns>
                                                                <asp:BoundField DataField="ReceiptNumber" HeaderText="Receipt Number" ItemStyle-Width="14%"></asp:BoundField>
                                                                <asp:BoundField DataField="RefundDate" HeaderText="Refund Date" ItemStyle-Width="14%" DataFormatString="{0:dd/MM/yyyy}"></asp:BoundField>
                                                                <asp:BoundField DataField="RefundAmount" HeaderText="Refund Amount" ItemStyle-Width="14%"></asp:BoundField>
                                                                <asp:BoundField DataField="PayType" HeaderText="PayType" ItemStyle-Width="14%"></asp:BoundField>
                                                                <asp:BoundField DataField="ChequeNumber" HeaderText="Cheque No / Reference No" ItemStyle-Width="16%"></asp:BoundField>
                                                                <asp:BoundField DataField="BankName" HeaderText="Bank Name" ItemStyle-Width="14%"></asp:BoundField>
                                                                <asp:BoundField DataField="ReceiptBook" HeaderText="Receipt Book" ItemStyle-Width="14%"></asp:BoundField>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div id="ChangeLogDiv" runat="server" visible="false"
                                            style="padding-top: 0px !important">
                                            <div class="himssuHeader6WireBox col-md-12 pTop5">
                                                <div class="himsBoxHeader card-head inner" id="Div24" runat="server">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                        <div class="headerText">
                                                            <header>
                                                                <asp:Label ID="Label9" Text="Change Log " runat="server" />
                                                            </header>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <asp:Button ID="ChangeLogGetButton" runat="server" OnClick="ChangeLogGetButton_Click" Text="Change Log" SkinID="0" CssClass="btn btn-assign fas" />
                                                </div>
                                                <div class="himsBoxContent width-100 pTop5 table-responsive">
                                                    <div id="Div25" runat="server" visible="true">
                                                        <asp:GridView ID="ChangeLogGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                            EmptyDataText="No Records Found !!" AllowPaging="False" CssClass="table table-striped table-bordered table-hover"
                                                            ShowHeader="True">
                                                            <Columns>
                                                                <asp:BoundField DataField="ScreenName" HeaderText="Screen Title" ItemStyle-Width="20%"></asp:BoundField>
                                                                <asp:BoundField DataField="ChangeRemark" HeaderText="Change Remark" ItemStyle-Width="20%"></asp:BoundField>
                                                                <asp:BoundField DataField="CreatedDateTime" HeaderText="Created Date" ItemStyle-Width="20%"></asp:BoundField>
                                                                <asp:BoundField DataField="UserName" HeaderText="User Name" ItemStyle-Width="20%"></asp:BoundField>

                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </ContentTemplate>
                            </cc1:TabPanel>
                            <cc1:TabPanel Width="100%" ID="StudentwiseFeeTabPanel1" runat="server" HeaderText="Exam Master">
                                <HeaderTemplate>
                                    <ul class="nav nav-tabs tabs-style-iconboxinner ajaxnavtabs">
                                        <li class="fancyTab">
                                            <a href="#"><i class="fas fa-tasks"></i>&nbsp;Student Fee All Batch
                                            </a>
                                        </li>
                                    </ul>

                                </HeaderTemplate>
                                <ContentTemplate>
                                    <div class="himsBoxContent card-body">
                                        <div class="contentHolder col-md-12 col-xs-12">
                                            <div class="outerBox pTop5 col-md-3 col-sm-4 col-xs-12">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="SearchOrganizationLabel" Text="Organization" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList ID="SearchOrganizationDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                        onmouseenter="showHideTooltip()" AutoPostBack="true" SkinID="CustomWidthDropDownList"
                                                        class="form-control" OnSelectedIndexChanged="SearchOrganizationDropDownList_SelectedIndexChanged">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3 col-sm-4 col-xs-12">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="SearchBatchLabel" Text="Batch" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList ID="SearchBatchDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                        onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" class="form-control"
                                                        AutoPostBack="true" OnSelectedIndexChanged="SearchBatchDropDownList_SelectedIndexChanged">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <asp:Panel ID="Panel1" runat="server">
                                                <div class="outerBox pTop5 col-md-3 col-sm-4 col-xs-12">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="IdNoLabel" runat="server" Text="Id No" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5  display-flex">
                                                        <asp:TextBox ID="SearchIdNoTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            SkinID="" runat="server" MaxLength="200" AutoPostBack="true"
                                                            OnTextChanged="SearchIdNoTextBox_TextChanged">
                                                        </asp:TextBox>
                                                        <asp:ImageButton SkinID="FindImage" ToolTip="Student Search" ID="SearchStudentImageButton"
                                                            ImageUrl="~/Images/icons/icon_find.gif" runat="server" />

                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3 col-sm-4 col-xs-12">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="SearchNameLabel" runat="server" Text="Name"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="SearchNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3 col-sm-4 col-xs-12">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="SearchClassLabel" runat="server" Text="Class"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="SearchClassTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                                    </div>
                                                </div>

                                            </asp:Panel>


                                            <div class="alignCenter pTop5 col-md-12">
                                                <asp:Button ID="PrintButton" runat="server" Text="&#xf15b; View Report" OnClick="PrintButton_Click" SkinID="0" CssClass="btn-print btn fas" />
                                            </div>

                                        </div>

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

                                                <div class="himsBoxHeader card-head inner" id="Div13" runat="server">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                        <div class="headerText">
                                                            <header>
                                                                <asp:Label ID="PendingFeeDetailsLabel" Text="Batch Wise Pending Fee Details" runat="server" />
                                                        </div>
                                                        </header>
                                                    </div>
                                                </div>
                                                <div class="himsBoxContent  width-100 pTop5 table-responsive">
                                                    <div id="Div" runat="server" visible="true">
                                                        <asp:GridView ID="BatchWisePendingFeeGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                            EmptyDataText="No Records Found !!" AllowPaging="False" CssClass="table table-striped table-bordered table-hover"
                                                            DataKeyNames="" ShowHeader="True">
                                                            <Columns>
                                                                <asp:BoundField DataField="BatchName" HeaderText="Batch Name" ItemStyle-Width="10%"></asp:BoundField>
                                                                <asp:BoundField DataField="ClassDivision" HeaderText="Class Division" ItemStyle-Width="10%"></asp:BoundField>
                                                                <asp:BoundField DataField="ReceiptBookTitle" HeaderText="Receipt Book" ItemStyle-Width="10%"></asp:BoundField>
                                                                <asp:BoundField DataField="PendingFeeName" HeaderText="Pending Fee Detail" ItemStyle-Width="60%"></asp:BoundField>
                                                                <asp:BoundField DataField="PendingAmount" HeaderText="Pending Amount" ItemStyle-Width="10%"></asp:BoundField>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div id="BatchWisePaidFeeDiv" runat="server" visible="false"
                                            style="padding-top: 0px !important">
                                            <div class="himssuHeader6WireBox col-md-12 pTop5">

                                                <div class="himsBoxHeader card-head inner" id="Div9" runat="server">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                        <div class="headerText">
                                                            <header>
                                                                <asp:Label ID="Label3" Text="Batch Wise Paid Fee Details" runat="server" />
                                                        </div>
                                                        </header>
                                                    </div>
                                                </div>
                                                <div class="himsBoxContent  width-100 pTop5 table-responsive">
                                                    <div id="Div10" runat="server" visible="true">
                                                        <asp:GridView ID="PaidFeeGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                            EmptyDataText="No Records Found !!" AllowPaging="False" CssClass="table table-striped table-bordered table-hover"
                                                            DataKeyNames="" ShowHeader="True">
                                                            <Columns>
                                                                <asp:BoundField DataField="BatchName" HeaderText="Batch Name" ItemStyle-Width="7%"></asp:BoundField>
                                                                <asp:BoundField DataField="Class" HeaderText="Class" ItemStyle-Width="5%"></asp:BoundField>
                                                                <asp:BoundField DataField="ReceiptBook" HeaderText="ReceiptBook" ItemStyle-Width="8%"></asp:BoundField>
                                                                <asp:BoundField DataField="ReceiptNumber" HeaderText="ReceiptNumber" ItemStyle-Width="10%"></asp:BoundField>
                                                                <asp:BoundField DataField="ReceiptDate" HeaderText="ReceiptDate" ItemStyle-Width="8%" DataFormatString="{0:dd/MM/yyyy}"></asp:BoundField>
                                                                <asp:BoundField DataField="PayType" HeaderText="PayType" ItemStyle-Width="4%"></asp:BoundField>
                                                                <asp:BoundField DataField="ChequeNo" HeaderText="ChequeNo" ItemStyle-Width="8%"></asp:BoundField>
                                                                <asp:BoundField DataField="BankName" HeaderText="Bank Name" ItemStyle-Width="8%"></asp:BoundField>
                                                                <asp:BoundField DataField="FeeDetail" HeaderText="Fee Detail" ItemStyle-Width="30%"></asp:BoundField>
                                                                <asp:BoundField DataField="ReceiptAmount" HeaderText="Receipt Amount" ItemStyle-Width="15%"></asp:BoundField>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div id="BatchWiseCancelFeeDiv" runat="server" visible="false"
                                            style="padding-top: 0px !important">
                                            <div class="himssuHeader6WireBox col-md-12 pTop5">

                                                <div class="himsBoxHeader card-head inner" id="Div11" runat="server">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                        <div class="headerText">
                                                            <header>
                                                                <asp:Label ID="Label4" Text="Batch Wise Cancel Fee Details" runat="server" />
                                                        </div>
                                                        </header>
                                                    </div>
                                                </div>
                                                <div class="himsBoxContent  width-100 pTop5 table-responsive">
                                                    <div id="Div12" runat="server" visible="true">
                                                        <asp:GridView ID="BatchWiseCancelFeeGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                            EmptyDataText="No Records Found !!" AllowPaging="False" CssClass="table table-striped table-bordered table-hover"
                                                            DataKeyNames="" ShowHeader="True">
                                                            <Columns>
                                                                <asp:BoundField DataField="BatchName" HeaderText="Batch Name" ItemStyle-Width="7%"></asp:BoundField>
                                                                <asp:BoundField DataField="Class" HeaderText="Class" ItemStyle-Width="5%"></asp:BoundField>
                                                                <asp:BoundField DataField="ReceiptBook" HeaderText="ReceiptBook" ItemStyle-Width="8%"></asp:BoundField>
                                                                <asp:BoundField DataField="ReceiptNumber" HeaderText="ReceiptNumber" ItemStyle-Width="10%"></asp:BoundField>
                                                                <asp:BoundField DataField="ReceiptDate" HeaderText="ReceiptDate" ItemStyle-Width="8%" DataFormatString="{0:dd/MM/yyyy}"></asp:BoundField>
                                                                <asp:BoundField DataField="PayType" HeaderText="PayType" ItemStyle-Width="4%"></asp:BoundField>
                                                                <asp:BoundField DataField="ChequeNo" HeaderText="ChequeNo" ItemStyle-Width="8%"></asp:BoundField>
                                                                <asp:BoundField DataField="BankName" HeaderText="Bank Name" ItemStyle-Width="8%"></asp:BoundField>
                                                                <asp:BoundField DataField="FeeDetail" HeaderText="Fee Detail" ItemStyle-Width="30%"></asp:BoundField>
                                                                <asp:BoundField DataField="ReceiptAmount" HeaderText="Receipt Amount" ItemStyle-Width="15%"></asp:BoundField>
                                                                <asp:BoundField DataField="Remark" HeaderText="Remark" ItemStyle-Width="15%"></asp:BoundField>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div id="BatchWiseRefundFeeDiv" runat="server" visible="false"
                                            style="padding-top: 0px !important">
                                            <div class="himssuHeader6WireBox col-md-12 pTop5">

                                                <div class="himsBoxHeader card-head inner" id="Div18" runat="server">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                        <div class="headerText">
                                                            <header>
                                                                <asp:Label ID="Label5" Text="Batch Wise Refund Fee Details" runat="server" />
                                                        </div>
                                                        </header>
                                                    </div>
                                                </div>
                                                <div class="himsBoxContent  width-100 pTop5 table-responsive">
                                                    <div id="Div19" runat="server" visible="true">
                                                        <asp:GridView ID="BatchWiseRefundFeeGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                            EmptyDataText="No Records Found !!" AllowPaging="False" CssClass="table table-striped table-bordered table-hover"
                                                            DataKeyNames="" ShowHeader="True">
                                                            <Columns>
                                                                <asp:BoundField DataField="Batch" HeaderText="Batch Name" ItemStyle-Width="7%"></asp:BoundField>
                                                                <asp:BoundField DataField="ClassName" HeaderText="Class" ItemStyle-Width="5%"></asp:BoundField>
                                                                <asp:BoundField DataField="ReceiptBook" HeaderText="Receipt Book" ItemStyle-Width="8%"></asp:BoundField>
                                                                <asp:BoundField DataField="ReceiptNumber" HeaderText="Receipt Number" ItemStyle-Width="10%"></asp:BoundField>
                                                                <asp:BoundField DataField="ReceiptDate" HeaderText="Receipt Date" ItemStyle-Width="8%" DataFormatString="{0:dd/MM/yyyy}"></asp:BoundField>
                                                                <asp:BoundField DataField="RefundDate" HeaderText="Refund Date" ItemStyle-Width="8%" DataFormatString="{0:dd/MM/yyyy}"></asp:BoundField>
                                                                <asp:BoundField DataField="PayType" HeaderText="PayType" ItemStyle-Width="4%"></asp:BoundField>
                                                                <asp:BoundField DataField="ChequeNo" HeaderText="ChequeNo" ItemStyle-Width="8%"></asp:BoundField>
                                                                <asp:BoundField DataField="BankName" HeaderText="Bank Name" ItemStyle-Width="8%"></asp:BoundField>
                                                                <asp:BoundField DataField="FeeDetail" HeaderText="Fee Detail" ItemStyle-Width="15%"></asp:BoundField>
                                                                <asp:BoundField DataField="RefundAmount" HeaderText="Refund Amount" ItemStyle-Width="5%"></asp:BoundField>
                                                                <asp:BoundField DataField="Remark" HeaderText="Remark" ItemStyle-Width="10%"></asp:BoundField>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </ContentTemplate>
                            </cc1:TabPanel>
                            <cc1:TabPanel Width="100%" ID="TabPanel1" runat="server" HeaderText="Exam Master">
                                <HeaderTemplate>
                                    <ul class="nav nav-tabs tabs-style-iconboxinner ajaxnavtabs">
                                        <li class="fancyTab">
                                            <a href="#"><i class="fas fa-tasks"></i>&nbsp;View History
                                            </a>
                                        </li>
                                    </ul>

                                </HeaderTemplate>
                                <ContentTemplate>
                                    <div class="himsBoxContent card-body">
                                        <%-- <div class="contentHolder col-md-12 col-xs-12">
                                            
                                            <div class="outerBox pTop5 col-md-3 col-sm-4 col-xs-12">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="Label5" Text="Organization" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList ID="HistoryOrganizationDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                        onmouseenter="showHideTooltip()" AutoPostBack="true" SkinID="CustomWidthDropDownList"
                                                        class="form-control" OnSelectedIndexChanged="HistoryOrganizationDropDownList_SelectedIndexChanged">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3 col-sm-4 col-xs-12">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="Label6" Text="Batch" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList ID="HistoryBatchDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                        onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" class="form-control"
                                                        AutoPostBack="true" OnSelectedIndexChanged="HistoryBatchDropDownList_SelectedIndexChanged">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <asp:Panel ID="Panel2" runat="server">
                                                <div class="outerBox pTop5 col-md-3 col-sm-4 col-xs-12">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="Label7" runat="server" Text="Id No" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5  display-flex">
                                                        <asp:TextBox ID="HistoryIdNoTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            SkinID="" runat="server" MaxLength="200" AutoPostBack="true"
                                                            OnTextChanged="HistoryIdNoTextBox_TextChanged">
                                                        </asp:TextBox>
                                                        <asp:ImageButton SkinID="FindImage" ToolTip="Student Search" ID="HistoryStudentImageButton"
                                                            ImageUrl="~/Images/icons/icon_find.gif" runat="server" />

                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3 col-sm-4 col-xs-12">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="Label8" runat="server" Text="Name"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="HistoryStudentNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3 col-sm-4 col-xs-12">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="Label9" runat="server" Text="Class"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="HistoryClassTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                                    </div>
                                                </div>

                                                <div class="outerBox pTop5  col-md-3" id="UserDiv" runat="server">
                                                            <div class="controlLabelWidth">
                                                                <asp:Label ID="UserNameLabel" runat="server" Text="User Name"></asp:Label>
                                                            </div>

                                                            <div class="fLeft pRight5 display-flex">
                                                                <acc:AutoCompleteControl ID="UserNameTextBox" runat="server" MinimumPrefixLength="2" 
                                                                    TabIndex="5" ValidateOnTextChanged="false" ContextKey="Security.User"
                                                                    DisplayLoadingStatus="true" FirstRowSelected="false" AutoPostBack="true" />
                                                                <asp:ImageButton ID="UserNameSearchButton" runat="server" SkinID="FindImage" ToolTip="User Name"
                                                                    ImageUrl="~/Images/icons/icon_find.gif" TabIndex="6" OnClick="UserNameSearchButton_OnClick" meta:resourcekey="UserNameSearchButtonResource1" />

                                                            </div>
                                                   
                                                        </div>
                                                  <div class="outerBox pTop5 col-md-3">
                                                                <div class="controlLabelWidth">
                                                                    <asp:Label ID="Label11" runat="server" Text="From Date"></asp:Label>
                                                                </div>
                                                                <div class="fLeft pRight5">
                                                                    <Date:DatePickerControl DisplayDatePicker="true" ID="SearchFromDatePicker" runat="server" />
                                                                </div>
                                                            </div>

                                                            <div class="outerBox pTop5 col-md-3">
                                                                <div class="controlLabelWidth">
                                                                    <asp:Label ID="Label12" runat="server" Text="To Date"></asp:Label>
                                                                </div>
                                                                <div class="fLeft pRight5">
                                                                    <Date:DatePickerControl DisplayDatePicker="true" ID="SearchToDatePicker" runat="server" />
                                                                </div>
                                                            </div>

                                            </asp:Panel>


                                            <div class="alignCenter pTop5 col-md-12">
                                               
                                                <asp:Button ID="SearchButton" runat="server" Text="&#xf002; Search" OnClick="SearchButton_Click"
                                            SkinID="0" CssClass="btn-search btn fas" />
                                            </div>

                                        </div>--%>

                                        <div id="Div8" runat="server"
                                            style="padding-top: 0px !important">
                                            <div class="himssuHeader6WireBox col-md-12 pTop5">

                                                <div class="himsBoxHeader card-head inner" id="Div14" runat="server">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                        <div class="headerText">
                                                            <header>
                                                                <asp:Label ID="Label10" Text="View Detail" runat="server" />
                                                            </header>
                                                        </div>

                                                    </div>
                                                </div>
                                                <div class="himsBoxContent">

                                                    <div id="Div15" runat="server">
                                                        <div id="Div16" runat="server" class="table-responsive">
                                                            <asp:GridView ID="HistoryGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                CssClass="table table-striped table-bordered table-hover"
                                                                SkinID="" ShowHeader="true" PagerSettings-Visible="false" EmptyDataText="No records found">
                                                                <Columns>
                                                                    <asp:BoundField DataField="StudentCode" HeaderText="Code" ItemStyle-Width="10%"></asp:BoundField>
                                                                    <asp:BoundField DataField="StudentName" HeaderText="Student Name" ItemStyle-Width="10%"></asp:BoundField>
                                                                    <asp:BoundField DataField="FeeName" HeaderText="Fee Name" ItemStyle-Width="10%"></asp:BoundField>
                                                                    <asp:BoundField DataField="VariableAmount" HeaderText="Variable Amount" ItemStyle-Width="10%"></asp:BoundField>
                                                                    <asp:BoundField DataField="DiscountAmount" HeaderText="Exemption Amount" ItemStyle-Width="10%"></asp:BoundField>
                                                                    <asp:BoundField DataField="AdditionalAmount" HeaderText="Additional Amount" ItemStyle-Width="10%"></asp:BoundField>
                                                                    <asp:BoundField DataField="NotApplicableAmount" HeaderText="Not Applicable Amount" ItemStyle-Width="10%"></asp:BoundField>
                                                                    <asp:BoundField DataField="Remark" HeaderText="Remark" ItemStyle-Width="10%"></asp:BoundField>
                                                                    <asp:BoundField DataField="UserName" HeaderText="User Name" ItemStyle-Width="10%"></asp:BoundField>
                                                                    <asp:BoundField DataField="LogDateTime" HeaderText="Log DateTime" ItemStyle-Width="10%"></asp:BoundField>
                                                                    <asp:BoundField DataField="DiscountRemark" HeaderText="Exemption Remark" ItemStyle-Width="10%"></asp:BoundField>
                                                                    <asp:BoundField DataField="AdditionalRemark" HeaderText="Additional Remark" ItemStyle-Width="10%"></asp:BoundField>
                                                                    <asp:BoundField DataField="NotApplicableRemark" HeaderText="Not Applicable Remark" ItemStyle-Width="10%"></asp:BoundField>

                                                                </Columns>
                                                            </asp:GridView>
                                                        </div>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>

                                    </div>
                                </ContentTemplate>
                            </cc1:TabPanel>
                        </cc1:TabContainer>

                    </div>
                </div>
            </div>
            </div>
            <div class="spacer">
                <img src="../../Images/spacer.gif" />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>

    <%--  <script data-main="../../JavaScript/rjs/encrypt/studentwise-fee-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/studentwise-fee")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <style>
        .table label.rt-chkbox {
            display: inline !important;
        }

        div#ctl00_CP_FeeAllocationGridViewHorizontalBar {
            height: 7px !important;
        }
        /*div#ctl00_CP_FeeAllocationGridViewPanelItem {
    height: 1000px !important;
    overflow-y: hidden;
}*/
    </style>
    <script>

        function GetOptionalFeeDetail(obj) {

            if ($('input[name="ctl00$CP$StudentFeeTabContainer$StudentwiseFeeTabPanel$SourceTypeRadioButtonList"]:checked').val() == "2") {
                if (!$(obj).is(':checked')) {
                    if (obj.nextElementSibling.nextElementSibling.value == "True") {
                        alert('Cannot remove Assign Optional Fee from Fee Head');
                        $(obj).prop("checked", true);
                        return;
                    }
                }
            }

            var chkselect = false;
            if ($(obj).is(':checked'))
                chkselect = true;
            else
                chkselect = false;

            if (chkselect == false) {

                //var parentRow = $(btnShow).closest("tr");
                //var hiddenField = parentRow.find('input[id$=PatientRefferalId]');
                //alert(hiddenField.val());
                feesetupId = obj.nextElementSibling.value;
                batchid = $('#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_BatchDropDownList').val();
                $.ajax({
                    type: "POST",
                    url: "StudentwiseFee.aspx/GetOptionalFeeDetail",
                    data: JSON.stringify({ "FeeSetupId": parseInt(feesetupId), "BatchId": parseInt(batchid), "chk": chkselect, "TypeId": $('input[name="ctl00$CP$StudentFeeTabContainer$StudentwiseFeeTabPanel$SourceTypeRadioButtonList"]:checked').val(), "ClassId": $("#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_ClassIdHiddenField").val(), "AdmissionCategoryId": $("#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_AdmissionCategoryIdHiddenField").val() }),
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (data) {
                        var datas = data.d;
                        if (datas == "-50") {
                            alert('Referred in Fee Allocation can not be deleted');
                            $(obj).attr('checked', 'checked');
                            $(obj).prop("checked", true);
                        }
                        else if (datas == "-51") {
                            alert('Referred in Fee Receipt can not be deleted');
                            $(obj).attr('checked', 'checked');
                            $(obj).prop('checked', true);
                        }
                    },
                    error: function (xhr, status, error) {
                        var err = eval("(" + xhr.responseText + ")");
                        console.log(err.Message);
                    }
                });
            }
        }

        function SourceTypeChange() {
            var SourceTypeId = '';
            var ClassId = $("#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_ClassIdHiddenField").val();
            var AdmissionCategoryId = $("#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_AdmissionCategoryIdHiddenField").val();
            var BatchId = $('#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_BatchDropDownList').val();
            var SourceId = $('#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_SourceIdHiddenField').val();
            if ($('input[name="ctl00$CP$StudentFeeTabContainer$StudentwiseFeeTabPanel$SourceTypeRadioButtonList"]:checked').val() == null)
                SourceTypeId = "1";
            else
                SourceTypeId = $('input[name="ctl00$CP$StudentFeeTabContainer$StudentwiseFeeTabPanel$SourceTypeRadioButtonList"]:checked').val();
            var html = '';

            if (SourceTypeId == "1") {
                $("#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_AssignOptionalFeeButton").val("Assign Optional Fee");
                $('#AssignOptionalFeeTable  tr:eq(0) th:eq(1)').text("Optional Fee");
            }
            else {
                $("#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_AssignOptionalFeeButton").val("Assign Optional Fee Head");
                $('#AssignOptionalFeeTable  tr:eq(0) th:eq(1)').text("Optional Fee Head");
            }

            $.ajax({
                type: "POST",
                url: "StudentwiseFee.aspx/SourceTypeChange",
                data: JSON.stringify({ "ClassId": ClassId, "AdmissionCategoryId": AdmissionCategoryId, "BatchId": BatchId, "SourceId": SourceId, "SourceTypeId": SourceTypeId }),
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data != null) {
                        var datas = $.parseJSON(data.d);
                        if (datas.length > 0) {
                            for (var i = 0; i < datas.length; i++) {
                                if (datas[i].IsCheck == "True")
                                    html += '<tr><td align="center"><input type="checkbox" id="SelectCheckBox" name="SelectCheckBox" onclick="GetOptionalFeeDetail(this);" checked="checked" style="opacity:50;pointer-events:all;height:18px;width:16px;left:70px"><input type="hidden" id="hdID" value="' + datas[i].Id + '" /><input type="hidden" id="IsSelectCheckBoxHiddenField" value="' + datas[i].IsCheck + '" /></td>';
                                else
                                    html += '<tr><td align="center"><input type="checkbox" id="SelectCheckBox" name="SelectCheckBox" onclick="GetOptionalFeeDetail(this);" style="opacity:50;pointer-events:all;height:18px;width:16px;left:70px"><input type="hidden" id="hdID" value="' + datas[i].Id + '" /><input type="hidden" id="IsSelectCheckBoxHiddenField" value="' + datas[i].IsCheck + '" /></td>';
                                html += '<td style="width:20%;">' + datas[i].Title + '</td></tr>'
                            }
                            $("#dvAssignOptionalFeeGridDiv").html(html);
                        }
                        else
                            $('#dvAssignOptionalFeeGridDiv').html('<tr><td colspan="2">No Record found !</td><tr>');

                    }
                    else
                        $('#dvAssignOptionalFeeGridDiv').html('<tr><td colspan="2">No Record found !</td><tr>');
                },
                error: function (xhr, status, error) {
                    var err = eval("(" + xhr.responseText + ")");
                    console.log(err.Message);
                }
            });
        }

        function AssignOptionalFee() {
            //Changes for Mantis Id:0040748
            var Organization = $('#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_OrganizationDropDownList option:selected').text();
            var Batch = $('#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_BatchDropDownList option:selected').text();
            var Code = $('#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_StudentIdNoTextBox').val();
            var ClassId = $("#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_ClassIdHiddenField").val();
            var AdmissionCategoryId = $("#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_AdmissionCategoryIdHiddenField").val();
            var BatchId = $('#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_BatchDropDownList').val();
            var SourceId = $('#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_SourceIdHiddenField').val();
            var SourceTypeId = $('input[name="ctl00$CP$StudentFeeTabContainer$StudentwiseFeeTabPanel$SourceTypeRadioButtonList"]:checked').val();
            var StudentId = $('#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_IdHiddenField').val();
            var IsEnableChangeLog = $('#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_IsEnableChangeLogHiddenField').val();
            var OrgId = $('#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_OrganizationDropDownList').val();

            var t = document.getElementById('AssignOptionalFeeTable');
            if (IsEnableChangeLog == 'true') {
                var ChangeRemark = $('#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_IsEnableChangeLogTextBox').val();
                if (ChangeRemark == "") {
                    alert('Enter Change Remark ..!!');
                    return;
                }
            }
            $('#AssignOptionalFeeTable').find('tr').each(function () {
                var row = $(this);
                if (row.find('input[type="checkbox"]').is(':checked')) {
                    var Id = row.find('input[type="hidden"]').val();
                    $.ajax({
                        type: "POST",
                        url: "StudentwiseFee.aspx/AssignOptionalFee",
                        data: JSON.stringify({ "ClassId": ClassId, "AdmissionCategoryId": AdmissionCategoryId, "BatchId": BatchId, "SourceId": SourceId, "SourceTypeId": SourceTypeId, "FeeSetupId": Id, "Organization": Organization }),
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (data) {
                            if (data.d == "-1") {
                                var JqeryErrorMessageButton = $('#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_JqeryErrorMessageButton');
                                JqeryErrorMessageButton.click();
                                return;
                            }
                        },
                        error: function (xhr, status, error) {
                            return;
                        },
                        async: false
                    });
                }
                else {
                    var Id = row.find('input[type="hidden"]').val();
                    $.ajax({
                        type: "POST",
                        url: "StudentwiseFee.aspx/JqueryDeleteAssignOptionalFee",
                        data: JSON.stringify({ "ClassId": ClassId, "AdmissionCategoryId": AdmissionCategoryId, "BatchId": BatchId, "SourceId": SourceId, "SourceTypeId": SourceTypeId, "FeeSetupId": Id, "OrgId": OrgId, "Organization": Organization, "Batch": Batch, "Code": Code }),
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (data) {
                            if (data.d == "-1") {
                                var JqeryErrorMessageButton = $('#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_JqeryErrorMessageButton');
                                JqeryErrorMessageButton.click();
                                return;
                            }
                        },
                        error: function (xhr, status, error) {
                            return;
                        },
                        async: false
                    });
                }


                async: false
            });

            if (IsEnableChangeLog = 'true') {
                $.ajax({
                    type: "POST",
                    url: "StudentwiseFee.aspx/ChangeLogAdd",
                    data: JSON.stringify({ "StudentId": StudentId, "ChangeRemark": ChangeRemark }),
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (data) {
                        if (data.d == "-1") {
                            var JqeryErrorMessageButton = $('#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_JqeryErrorMessageButton');
                            JqeryErrorMessageButton.click();
                            return;
                        }
                    },
                    error: function (xhr, status, error) {
                        return;
                    },
                    async: false
                });
                //$('#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_IsEnableChangeLogTextBox').val() = "";
            }
            $('#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_IsEnableChangeLogTextBox').val('');

            var JqerySuccessMessageButton = $('#ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_JqerySuccessMessageButton');
            JqerySuccessMessageButton.click();
        }
        //Added for mantis 0039673 :  by Krunal K Patel
        function scrollToBottom() {
            document.getElementById("ctl00_CP_StudentFeeTabContainer_StudentwiseFeeTabPanel_StudentRefundGridViewDiv").scrollIntoView();
        }
    </script>
    <%--<script src='<%=ResolveUrl("~/JavaScript/rjs/lib/gridviewScroll.min.js")%>' type="text/javascript"></script>--%>
    <script type="text/javascript">
        window.name = "StudentWiseFeeTab";
        window.onload = function () {
            FreezGrid();
            CheckDuplicateTab();
        };

        function CheckDuplicateTab() {
            localStorage.studentwisefeetab = Date.now();
            var onLocalStorageEvent = function (e) {
                if (e.key == "studentwisefeetab") {
                    // Listen if anybody else opening the same page!
                    localStorage.studentwisefeetab_available = Date.now();
                }
                if (e.key == "studentwisefeetab_available" && window.name == "StudentWiseFeeTab") {
                    alert("One more page already open");
                    window.location = '/Pages/Baseframework/MyDashBoard.aspx';
                }
            };
            window.addEventListener('storage', onLocalStorageEvent, false);
        }

        function FreezGrid() {
            $('#<% =FeeAllocationGridView.ClientID%>').gridviewScroll({
                width: "99%",
                height: "100%",
                overflow: "Scroll",
                railsize: 1,
                freezesize: 1, // Freeze Number of Columns.
                startVertical: $("#<%=hfFeeAllocationGridViewSV.ClientID%>").val(),
                startHorizontal: $("#<%=hfFeeAllocationGridViewSH.ClientID%>").val(),
                onScrollVertical: function (delta) {
                    $("#<%=hfFeeAllocationGridViewSV.ClientID%>").val(delta);
                },
                onScrollHorizontal: function (delta) {
                    $("#<%=hfFeeAllocationGridViewSH.ClientID%>").val(delta);
                }
            });


            }

    </script>
    <%--  <script type="text/javascript">
        $(document).ready(function () {

            FreezGrid();


        });
    </script>--%>
    <%--  <script type="text/javascript">
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler_Page);
        function EndRequestHandler_Page(sender, args) {
            debugger;
            FreezGrid();

        }

        $(document).ready(function () {

            FreezGrid();


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