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

<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="Date" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="DPC" %>
<%@ Register Src="~/UserControls/Common/StudentSearch/StudentSearch.ascx" TagName="StudentSearch" TagPrefix="Std" %>
<%@ Register Src="~/UserControls/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl" TagPrefix="hims" %>
<%@ Register Src="~/UserControls/AutoComplete/AutoCompleteControl.ascx" TagName="AutoCompleteControl" TagPrefix="acc" %>
<%@ Register Src="~/UserControls/FeeManagement/BatchTransfer.ascx" TagName="BatchTransfer" TagPrefix="btr" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <style>
        .item:focus {
            border: 1px solid #000000;
        }
    </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" />
            <btr:BatchTransfer ID="BatchTransfer" Visible="false" runat="server" />

            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont" valign="top">
                    <div class="himssuHeader3WireBox">
                        <table width="0px" cellpadding="0" cellspacing="0">
                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="104"
                                Visible="true" runat="server" />
                        </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 class="fRight mt-27 display-flex pagination">
                                <div class="outerBox col">
                                    <asp:Button ID="AddStudentImageButton" runat="server" Text="Add Student" SkinID="0" ToolTip="Add Student" Visible="true"
                                        OnClick="AddStudentImageButton_Click" CssClass="btn btn-info fas" />
                                    <asp:Button ID="StudentwiseFeeImageButton" runat="server" Text="Student Fee" SkinID="0" ToolTip="Add Student Fee"
                                        OnClick="StudentwiseFeeImageButton_Click" CssClass="btn btn-info fas" Visible="true" />
                                    <asp:Button ID="TransferBatchButton" runat="server" Text="Transfer Batch" SkinID="0" ToolTip="Transfer Batch"
                                        CssClass="btn btn-info fas" OnClick="TransferBatchButton_Click" />
                                    <asp:Button ID="MultiReceiptPrintButton" runat="server" Text="Multi Receipt Print" SkinID="0" ToolTip="Multi Receipt Print"
                                        CssClass="btn btn-info fas" Visible="false" OnClick="MultiReceiptPrintButton_Click" />                  
                                    <asp:Button ID="PrintStudentFeeDetailsButton" runat="server" Text="&#xf15b; Student Fee Details" OnClick="PrintStudentFeeDetailsButton_Click"
                                        SkinID="0" CssClass="fas btn btn-report " Style="width: auto!important" Font-Bold="true" CommandName="Print" />
                                    <asp:Button ID="RedirectToPayStudentFeeButton" runat="server" Text="Pay Online Fee" SkinID="0" ToolTip="Pay Online Fee"
                                        OnClick="RedirectToPayStudentFeeButton_Click" CssClass="btn btn-info fas" />
                                </div>
                                <asp:LinkButton CssClass="btn btn-default gridviewpagerbuttonpadding" ToolTip="First page"
                                    ID="FirstRecordImageButton" runat="server" OnClick="FirstRecordImageButton_Click">
                                                       <i class="fa fa-fast-backward"></i>
                                </asp:LinkButton>
                                <asp:LinkButton CssClass="btn btn-default gridviewpagerbuttonpadding" ToolTip="First page"
                                    ID="PreviousImageButton" runat="server" OnClick="PreviousImageButton_Click">
                                                       <i class="fa fa-play fa-rotate-180"></i>
                                </asp:LinkButton>
                                &nbsp; &nbsp;
                                                    <asp:Label ID="LabelPage" runat="server" Text="Record " AssociatedControlID="ReCordNumber" />
                                &nbsp;  
                                <asp:Label ID="ReCordNumber" Font-Bold="true" SkinID="Dummy" runat="server"></asp:Label>
                                &nbsp;   
                                <asp:Label ID="ofLabel" Text="of" runat="server" />
                                &nbsp;   
                                <asp:Label ID="TotalRecord" runat="server" />
                                &nbsp; &nbsp;
                                                    <asp:LinkButton CssClass="btn btn-default gridviewpagerbuttonpadding" ToolTip="First page"
                                                        ID="NextImageButtom" runat="server" OnClick="NextImageButton_Click">
                                                       <i class="fa fa-play"></i>
                                                    </asp:LinkButton>
                                <asp:LinkButton CssClass="btn btn-default gridviewpagerbuttonpadding" ToolTip="First page"
                                    ID="LastRecordImageButton" runat="server" OnClick="LastRecordImageButton_Click">
                                                       <i class="fa fa-fast-forward"></i>
                                </asp:LinkButton>
                                &nbsp;&nbsp;
                                <div class="outerBox col-md">
                                    <asp:Button ID="BackButton" runat="Server" OnClick="BackButton_Click" SkinID="0"
                                        CssClass="btn btn-back fas" Text="&#xf30a; Back" />
                                </div>
                                &nbsp; 
                            </div>
                        </div>
                        <div class="himsBoxContent card-body">
                            <div runat="server" id="PrintReceiptDiv" class="col-md-12 pTop10 pb5">
                                <asp:Button ID="ReceiptButton1" runat="Server" OnClick="ReceiptButton1_Click" SkinID="0"
                                    Text="ReceiptButton1" Visible="false" CssClass="btn btn-examcommon" />
                                <asp:Button ID="ReceiptButton2" runat="Server" OnClick="ReceiptButton2_Click" SkinID="0"
                                    Text="ReceiptButton2" Visible="false" CssClass="btn btn-examcommon" />
                                <asp:Button ID="ReceiptButton3" runat="Server" OnClick="ReceiptButton3_Click" SkinID="0"
                                    Text="ReceiptButton3" Visible="false" CssClass="btn btn-examcommon" />
                                <asp:Button ID="ReceiptButton4" runat="Server" OnClick="ReceiptButton4_Click" SkinID="0"
                                    Text="ReceiptButton4" Visible="false" CssClass="btn btn-examcommon" />
                                <asp:Button ID="ReceiptButton5" runat="Server" OnClick="ReceiptButton5_Click" SkinID="0"
                                    Text="ReceiptButton5" Visible="false" CssClass="btn btn-examcommon" />
                            </div>
                            <%--Added for mantis : 36608--%>
                            <div id="DivReceiptChequeClear" style="position: relative; float: right; margin-top: -18px;">
                                <div id="DivReceiptChequeClearButton" class="outerBox col-md" runat="server">
                                    <asp:Button ID="Button1" runat="Server" SkinID="0" OnClick="BackReceiptChequeClearButton_Click"
                                        CssClass="btn btn-back fas" Text="&#xf30a; Receipt Cheque Clear" />
                                </div>
                            </div>
                            <%--<div runat="server" id="Div1" class="col-md-12 pTop10 pb5">
                                <asp:Button ID="BackReceiptChequeClearButton" runat="Server" SkinID="0" Onclick="BackReceiptChequeClearButton_Click"
                                    CssClass="btn btn-back fas" Text="&#xf30a; Receipt Cheque Clear" style="margin-left: 916px; margin-top: -40px;"/>
                            </div>--%>
                            <div id="SUIdDiv" class="outerBox pTop5 col-md-3" runat="server" visible="false">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="SUIdLabel" runat="server" Text="SU Id"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:TextBox ID="SUIdTextBox" runat="server" SkinID="CustomWidthTextBox"
                                        AutoPostBack="true" MaxLength="50" OnTextChanged="SUIdTextBox_TextChanged"></asp:TextBox>
                                </div>
                            </div>
                            <div class="">
                            </div>
                            <asp:HiddenField ID="PostDatedPaymentIdHiddenField" runat="server" />
                            <asp:HiddenField ID="PostDatedPaymentAmountHiddenField" runat="server" />
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="OrganizationLabel" Text="Organization" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:DropDownList ID="OrganizationDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                        onmouseenter="showHideTooltip()" AutoPostBack="true" SkinID="CustomWidthDropDownList"
                                        CssClass="form-control" OnSelectedIndexChanged="OrganizationDropDownList_OnSelectedIndexChanged">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="BatchLable" Text="Batch" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:DropDownList ID="BatchDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                        onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control"
                                        AutoPostBack="true" OnSelectedIndexChanged="BatchDropDownList_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </div>
                            </div>


                            <div class="outerBox pTop5 col-md-3" visible="false" id="canceldiv" runat="server">
                                <div class="fLeft pRight5">
                                    <asp:Label ID="IsRecieptCancelLabel" runat="server" Text="Cancelled" Font-Bold="true"
                                        Font-Size="Medium" ForeColor="Red"></asp:Label>
                                </div>
                            </div>

                            <div visible="false" class="col-md-12 bg-lghtgrey" runat="server" id="studentradiodiv">

                                <div class="col-md-6 text-center">
                                    <asp:RadioButton ID="StudentRadioButton" runat="server" GroupName="S1" AutoPostBack="true"
                                        OnCheckedChanged="StudentRadioButton_CheckedChanged" Text="Student" />
                                </div>
                                <%-- <td>
                                                    <asp:Label ID="StudentLabel" runat="server" Text="Student" Font-Bold="true"></asp:Label>
                                                </td>--%>
                                <div class="col-md-6 text-center">
                                    <asp:RadioButton ID="EmployeeRadioButton" runat="server" GroupName="S1" AutoPostBack="true"
                                        OnCheckedChanged="EmployeeRadioButton_CheckedChanged" Text="Employee" />
                                </div>
                                <%--  <td>
                                                    <asp:Label ID="EmployeeLabel" runat="server" Text="Employee" Font-Bold="true"></asp:Label>
                                                </td>--%>
                            </div>
                            <div id="StudentAutoSearchDiv" runat="server" visible="false">
                                <div class="outerBox pTop5 col-md-6 col-sm-4 col-xs-12">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="StudentAutoSearchLabel" runat="server" Text="Student Search"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="StudentAutoSearchTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" onkeyup="Search(this);" onclick="Search(this);"
                                            SkinID="CustomWidthTextBox" runat="server" CssClass="studentautosearchitem" autocomplete="off"> </asp:TextBox>
                                        <div id="AutoSearchSuggestion"></div>
                                        <asp:HiddenField ID="SearchListHiddenField" runat="server" />
                                    </div>
                                </div>
                                <div class="cBoth"></div>
                            </div>
                            <!-- Hidden field to track modal state -->
                            <input type="hidden" id="IsDisplayOldPendingInReceiptHdn" name="IsDisplayOldPendingInReceiptHdn" runat="server" />
                            <asp:Panel ID="StudentSearchPanel" runat="server">
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="StudentIdNoLabel" runat="server" Text="Id No" SkinID="MandatoryLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5 display-flex">
                                        <asp:TextBox ID="StudentIdNoTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="200" AutoPostBack="true"
                                            OnTextChanged="StudentIdNoTextBox_TextChanged">
                                        </asp:TextBox>
                                        <asp:ImageButton SkinID="FindImage" ToolTip="Student Search" ID="StudentIdNoImageButton"
                                            runat="server" ImageUrl="../../Images/icons/icon_find.gif" />
                                        <br />
                                        <br />
                                        <br />
                                        <asp:LinkButton ID="StudentAddGetImageButton" runat="server"
                                            Visible="true" OnClick="AddStudentGetImageButton_Click">
                                         <i class="fa fa-refresh" style="font-size:1.5em;padding-left:3px;color:black"></i>
                                        </asp:LinkButton>
                                        <%-- <asp:HiddenField ID="AcademicIdHiddenField" runat="server" />--%>
                                        <asp:HiddenField ID="SourceIdHiddenField" runat="server" />
                                        <asp:HiddenField ID="ClassIdHiddenField" runat="server" />
                                        <asp:HiddenField ID="ReceiptIdHiddenField" runat="server" />
                                        <asp:HiddenField ID="DeleteHiddenField" runat="server" />
                                        <asp:HiddenField ID="RedirectHiddenField" runat="server" />
                                        <asp:HiddenField ID="AdmissionCategoryHiddenField" runat="server" />
                                        <asp:HiddenField ID="ReportPrintButtonHiddenField" runat="server" />
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="StudentNameLabel" runat="server" Text="Name"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="StudentNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                            SkinID="CustomWidthTextBox" Width="250px" runat="server" MaxLength="200"> </asp:TextBox>
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="ClassLabel" runat="server" Text="Class/Division/Roll No"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="ClassTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="StudentStatusLabel" runat="server" Text="Student Status"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:Label ID="StatusNameLabel" runat="server"></asp:Label>
                                    </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 display-flex">
                                        <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" />
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3">
                                    <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">
                                    <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="">
                            </div>
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="ReceiptBookLabel" runat="server" Text="Receipt Book" meta:resourcekey="ReceiptBookLabelResource1"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:DropDownList runat="server" ID="ReceiptBookDropDownList" SkinID="CustomWidthDropDownList"
                                        CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                        AutoPostBack="true" OnSelectedIndexChanged="ReceiptBookDropDownList_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="ReceiptNoLabel" runat="server" Text="Receipt No"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:TextBox ID="ReceiptNoTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                        SkinID="CustomWidthTextBox" runat="server" MaxLength="9" onkeypress="javascript:return isNumberKey(this)"> </asp:TextBox>
                                </div>
                            </div>
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="ReceiptDateLabel" runat="server" Text="Receipt Date"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <Date:DatePickerControl DisplayDatePicker="true" ID="ReceiptDatePickerControl" runat="server" />
                                </div>
                            </div>
                            <div class="">
                            </div>
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="PayTypeLabel" runat="server" Text="Pay Type" SkinID="MandatoryLabel"
                                        meta:resourcekey="PayTypeLabelResource1"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:DropDownList runat="server" ID="PayTypeDropDownList" SkinID="CustomWidthDropDownList"
                                        CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                        OnSelectedIndexChanged="PayTypeDropDownList_SelectedIndexChanged" AutoPostBack="true">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="ChequeNoLabel" runat="server" Text="Cheque No / Reference No"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:TextBox ID="ChequeNoTextBox" SkinID="CustomWidthTextBox" runat="server"
                                        MaxLength="40">
                                    </asp:TextBox>
                                </div>
                            </div>
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="BankNameLabel" runat="server" Text="Bank Name"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <%-- 0029561 --%>
                                    <acc:AutoCompleteControl ID="BankNameTextBox" runat="server" MinimumPrefixLength="1"
                                        MaxLength="50" ContextKey="sFinanceCommon.Bank" DisplayLoadingStatus="true" SkinID="CustomWidthTextBox"
                                        CssClass="form-control" ValidateOnTextChanged="false" />
                                    <asp:HiddenField ID="BankIdHiddenField" runat="server" />
                                </div>
                            </div>
                            <div class="">
                            </div>
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="ChequeDateLabelM" runat="server" Text="Cheque Date" SkinID="MandatoryLabel" Visible="false"></asp:Label>
                                    <asp:Label ID="ChequeDateLabel" runat="server" Text="Cheque Date"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <Date:DatePickerControl DisplayDatePicker="true" ID="ChequeDateDatePickerControl"
                                        runat="server" />
                                </div>
                            </div>
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="RemarkLabel" runat="server" Text="Remark" meta:resourcekey="CodeSearchLabelResource1"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:TextBox ID="RemarkTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                        SkinID="MultiLineTextBox" Width="250px" TextMode="MultiLine" Height="40px" runat="server"
                                        MaxLength="200"> </asp:TextBox>
                                </div>
                            </div>
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="AmountLabel" runat="server" Text="Amount"></asp:Label>
                                    <asp:Label ID="MAmountLabel" runat="server" Text="Amount" SkinID="MandatoryLabel" Visible="false"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:TextBox ID="AmountTextBox" runat="server" MaxLength="15" SkinID="CustomWidthTextBox"
                                        AutoPostBack="true" onKeypress="javascript:return MaskDecimal(event,12,2)"
                                        OnTextChanged="AmountTextBox_OnTextChanged"></asp:TextBox>
                                </div>
                                <asp:HiddenField ID="IsAmountMandatoryHiddenField" runat="server" />
                            </div>
                            <div class="">
                            </div>
                            <div id="ChargeDiv" runat="server" visible="false" class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="ChargeLabel" runat="server" Text="Charge"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:TextBox ID="ChargeTextBox" runat="server" MaxLength="15" SkinID="CustomWidthTextBox" OnTextChanged="ChargeTextBox_TextChanged" AutoPostBack="true"
                                        onKeypress="javascript:return MaskDecimal(event,12,2)"></asp:TextBox>
                                </div>
                            </div>
                            <div class="outerBox pTop15 col-md-3" runat="server" id="DiscountPercentageDiv" visible="false">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="Label3" runat="server" Text="Discount Percentage"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:TextBox ID="DiscountPercentageTextBox" runat="server" MaxLength="15" SkinID="CustomWidthTextBox"
                                        AutoPostBack="true" onKeypress="javascript:return MaskDecimal(event,12,2)"
                                        OnTextChanged="DiscountPercentageTextBox_TextChanged"></asp:TextBox>
                                </div>
                            </div>
                            <div class="outerBox pTop15 col-md-3" runat="server" id="DiscountDiv" visible="false">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="Label2" runat="server" Text="Discount Amount"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:TextBox ID="DiscountAmountTextBox" runat="server" MaxLength="15" SkinID="CustomWidthTextBox"
                                        AutoPostBack="true" onKeypress="javascript:return MaskDecimal(event,12,2)"
                                        OnTextChanged="DiscountAmountTextBox_OnTextChanged"></asp:TextBox>
                                </div>
                            </div>

                            <div runat="server" id="CollectionGroupDiv" visible="false">
                                <div class="outerBox pTop15 col-md-12" style="margin-bottom: 10px; height: fit-content">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="CollectionGroupLabel" runat="server" Text="Collection Group"
                                            meta:resourcekey="CollectionGroupLabelResource1"></asp:Label>
                                        <asp:Label ID="CollectionGroupMandatoryLabel" runat="server" Text="Collection Group" Visible="false" SkinID="MandatoryLabel"
                                            meta:resourcekey="CollectionGroupLabelResource1"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5" id="CollectionGroupDropDownListDiv" runat="server">
                                        <asp:DropDownList runat="server" ID="CollectionGroupDropDownList" SkinID="CustomWidthDropDownList"
                                            CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" Style="width: 20%"
                                            OnSelectedIndexChanged="CollectionGroup_SelectedIndexChanged" AutoPostBack="true">
                                        </asp:DropDownList>
                                    </div>
                                    <div class="chck-dropdown-onclick bg-lghtgrey col-md-12 overflow-x-hidden padd-0" id="CollectionGroupCheckBoxListDiv" runat="server" visible="false" style="height: max-content; width: 100% !important; overflow: hidden">
                                        <asp:CheckBoxList runat="server" ID="CollectionGroupCheckBoxList" OnSelectedIndexChanged="CollectionGroupCheckBoxList_SelectedIndexChanged" AutoPostBack="true" RepeatDirection="Horizontal" RepeatColumns="4"></asp:CheckBoxList>
                                    </div>
                                </div>
                                <%--<div class="outerBox pTop15 col-md-3">
                                    <div class="fLeft pRight5">
                                        <asp:CheckBox ID="CollectionGroupWiseCheckBox" runat="server" OnCheckedChanged="CollectionGroupWiseCheckBox_CheckedChanged" AutoPostBack="true" />
                                        <asp:Label ID="ApplyForAllClassLabel" AssociatedControlID="CollectionGroupWiseCheckBox" runat="server" Text="Collection GroupWise" class="pLeft5"></asp:Label>
                                    </div>
                                </div>--%>
                            </div>

                            <div class="outerBox pTop5 col-md-3" id="DepositedLedgerDiv" runat="server" visible="false">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="DepositedLedgerLabel" runat="server" Text="Deposited Ledger"
                                        meta:resourcekey="DepositedLedgerLabelResource1" SkinID="MandatoryLabel"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:DropDownList runat="server" ID="DepositedLedgerDropDownList" SkinID="CustomWidthDropDownList"
                                        CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                    </asp:DropDownList>
                                </div>
                            </div>

                            <div class="outerBox pTop5 col-md-3" id="PDCDiv" runat="server" visible="false">
                                <asp:Button ID="PDCButton" runat="server" OnClick="PDCButton_Click" Text="PDC" SkinID="0" CssClass="btn-search btn fas" />
                            </div>
                            <div class="cBoth">
                            </div>

                            <div class="outerBox pTop5 col-md-3" id="CancelRemarkDiv" runat="server" visible="false">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="CancelRemarkLabel" runat="server" Text="Cancel Remark"
                                        meta:resourcekey="DepositedLedgerLabelResource1"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:TextBox ID="CancelRemarkTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                        SkinID="MultiLineTextBox" Width="250px" TextMode="MultiLine" Height="40px" runat="server"
                                        MaxLength="200"> </asp:TextBox>
                                </div>
                            </div>

                            <div class="outerBox pTop5 col-md-3" id="MaintainIDNoDiv" runat="server" visible="false">
                                <div class="controlLabelWidth">
                                    <asp:CheckBox ID="MaintainIDNoCheckBox" runat="server" />
                                    <asp:Label ID="MaintainIDNoLabel" AssociatedControlID="MaintainIDNoCheckBox" runat="server" Text="Maintain ID No"></asp:Label>
                                </div>
                            </div>

                            <div class="outerBox pTop15 col-md-3" id="StopApplicationAccessDiv" runat="server">
                                <div class="controlLabelWidth">
                                    <asp:CheckBox ID="IsStopApplicationAccessCheckBox" runat="server" Text="Stop Application Access" />
                                </div>
                            </div>

                            <div class="outerBox pTop15 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="TransportDetailsLabel" runat="server"></asp:Label>
                                </div>
                            </div>

                            <div class="col-md-12 pTop15">
                                <div class="col-md-6">
                                    <div class="himssuHeader1WireBox">
                                        <div class="himssuHeader6WireBox width-100">
                                            <div id="FeeDetailDiv" runat="server" visible="false">

                                                <div class="himsBoxHeader  card-head inner pTop5" id="GridViewPagerDiv" runat="server" visible="false">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                        <div class="gridHeaderText">
                                                            <header>
                                                                <asp:Label ID="GridViewLabel" Text="Payable Fee List" runat="server" />
                                                            </header>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="himsBoxContent">
                                                    <div id="Div5" runat="server" visible="true" class="tab-responsive">
                                                        <asp:GridView ID="FeeListGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                            CssClass="table table-striped table-bordered" EmptyDataText="No Records Found !!"
                                                            AllowPaging="false" ShowHeader="true" DataKeyNames="Id,ReceiptBookId,FeeId,FeeSetupId,OrderIndex,CollectionGroupId"
                                                            OnRowDataBound="FeeListGridView_RowDataBound">
                                                            <Columns>
                                                                <asp:BoundField DataField="FeeName" HeaderText="Fee" ItemStyle-Width="45%" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                <asp:TemplateField HeaderText="Pending Amount" ItemStyle-Width="25%" ItemStyle-Wrap="true"
                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                    <HeaderTemplate>
                                                                        <asp:Label ID="PendingAmountLabel" runat="server" Visible="true"></asp:Label>
                                                                    </HeaderTemplate>
                                                                    <ItemTemplate>
                                                                        <asp:TextBox ID="PendingAmountTextBox" runat="server" ClientIDMode="Static" MaxLength="15"
                                                                            Width="110px" onKeypress="javascript:return MaskDecimal(event,12,2)"></asp:TextBox>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField ItemStyle-Width="25%" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                    <HeaderTemplate>
                                                                        <asp:Label ID="PayableAmountLabel" runat="server" Visible="true"></asp:Label>
                                                                    </HeaderTemplate>
                                                                    <ItemTemplate>
                                                                        <asp:TextBox ID="PayableAmountTextBox" Visible="true" runat="server" ClientIDMode="Static"
                                                                            MaxLength="15" Width="110px" onKeypress="javascript:return MaskDecimal(event,12,2)"
                                                                            onkeyup="fCalculation()"></asp:TextBox>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Start Date" ItemStyle-Width="20%" ItemStyle-Wrap="true"
                                                                    HeaderStyle-HorizontalAlign="Left" Visible="false">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="StartDateLabel" runat="server" Text='<%# Eval("StartDate", "{0:M-dd-yyyy}") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="" meta:resourcekey="TemplateFieldResource4">
                                                                    <HeaderTemplate>
                                                                        <label class="rt-chkbox rt-chkbox-outline">
                                                                            <asp:CheckBox ID="HeaderIsObsoleteCheckBox" runat="server" AutoPostBack="true" OnCheckedChanged="DeleteHeaderIsObsoleteCheckBox_OnCheckedChanged" />
                                                                            <span></span>
                                                                        </label>
                                                                    </HeaderTemplate>
                                                                    <ItemTemplate>
                                                                        <asp:ImageButton ID="DeleteImageButton" runat="server" CommandName="Delete" SkinID="DeleteImage"
                                                                            ToolTip="Delete Fee" Enabled="true" meta:resourcekey="DeleteImageButtonResource1"
                                                                            OnClick="DeleteImageButton_Click" ImageUrl="../../Images/icons/icon_delete.gif" />
                                                                    </ItemTemplate>
                                                                    <HeaderStyle HorizontalAlign="Center" />
                                                                    <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                                </asp:TemplateField>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div id="divTotal" runat="server" visible="false" class="width-100">
                                        <div class="row">
                                            <span class="col-md-5">
                                                <asp:Label ID="TotalAmountLabel" runat="server" Text="Total" Font-Bold="true"></asp:Label>
                                            </span>
                                            <span class="col-md-7 ml-10 display-flex">&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp; 
                                                 <asp:TextBox ID="TotalPendingAmountTextBox" SkinID="CustomWidthTextBox" Width="120px"
                                                     runat="server" MaxLength="200">
                                                 </asp:TextBox>
                                                &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;
                                                        <asp:TextBox ID="TotalPayableAmountTextBox" SkinID="CustomWidthTextBox" Width="110px"
                                                            EnableViewState="false" runat="server" MaxLength="200">
                                                        </asp:TextBox>
                                            </span>
                                        </div>

                                        <div runat="server" id="NetDiscountDiv" visible="false" class="row">
                                            <span class="col-md-5">
                                                <asp:Label ID="TotalDiscountAmountLabel" runat="server" Text="Discount Amount" Font-Bold="true"></asp:Label>
                                            </span>
                                            <span class="col-md-7 ml-7">

                                                <asp:TextBox ID="TotalDiscountAmountTextBox" SkinID="CustomWidthTextBox" Width="110px" CssClass="pull-right"
                                                    EnableViewState="false" runat="server" MaxLength="200">
                                                </asp:TextBox>
                                            </span>
                                            <span class="col-md-5">
                                                <asp:Label ID="AmountAfterDiscountLabel" runat="server" Text="Amount After Discount" Font-Bold="true"></asp:Label>
                                            </span>
                                            <span class="col-md-7 ml-7">

                                                <asp:TextBox ID="AmountAfterDiscountTextBox" SkinID="CustomWidthTextBox" Width="110px" CssClass="pull-right"
                                                    EnableViewState="false" runat="server" MaxLength="200" Enabled="false">
                                                </asp:TextBox>
                                            </span>
                                        </div>

                                        <div runat="server" id="AllowGSTDiv" visible="false">
                                            <asp:HiddenField ID="AllowGSTHiddenField" runat="server" />
                                            <asp:HiddenField ID="CGSTPercentageHiddenField" runat="server" />
                                            <asp:HiddenField ID="SGSTPercentageHiddenField" runat="server" />
                                            <div class="row pTop5">
                                                <span class="col-md-5">
                                                    <asp:Label ID="CGSTLabel" runat="server" Text="CGST :" Font-Bold="true" />
                                                </span>
                                                <span class="col-md-7 ml-7">

                                                    <asp:TextBox ID="CGSTTextBox" SkinID="CustomWidthTextBox" Width="110px" CssClass="pull-right"
                                                        EnableViewState="false" runat="server" MaxLength="200" Enabled="false">
                                                    </asp:TextBox>
                                                </span>
                                            </div>
                                            <div class="row pTop5">
                                                <span class="col-md-5">
                                                    <asp:Label ID="SGSTLabel" runat="server" Text="SGST :" Font-Bold="true" />
                                                </span>
                                                <span class="col-md-7 ml-7">
                                                    <asp:TextBox ID="SGSTTextBox" SkinID="CustomWidthTextBox" Width="110px" CssClass="pull-right"
                                                        EnableViewState="false" runat="server" MaxLength="200" Enabled="false">
                                                    </asp:TextBox>
                                                </span>
                                            </div>
                                        </div>

                                        <div class="row pTop5" runat="server" id="DisplayChargeDiv" visible="false">
                                            <span class="col-md-5">
                                                <asp:Label ID="DisplayChargeLabel" runat="server" Text="Charge" Font-Bold="true"></asp:Label>
                                            </span>
                                            <span class="col-md-7 ml-7">
                                                <asp:TextBox ID="DisplayChargeTextBox" SkinID="0" Width="110px" Style="float: right" Enabled="false"
                                                    EnableViewState="false" runat="server" MaxLength="200">
                                                </asp:TextBox>
                                            </span>
                                        </div>

                                        <div class="row pTop5">
                                            <span class="col-md-5">
                                                <asp:Label ID="NetAmountLabel" runat="server" Text="Net Amount" Font-Bold="true"></asp:Label>
                                            </span>
                                            <span class="col-md-7 ml-7">
                                                <asp:TextBox ID="NetPayableAmountTextBox" SkinID="0" Width="110px" Style="float: right"
                                                    EnableViewState="false" runat="server" MaxLength="200">
                                                </asp:TextBox>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="himssuHeader1WireBox">
                                        <div class="himssuHeader6WireBox width-100">
                                            <div id="FreeFeeDetailDiv" runat="server" visible="false">

                                                <div class="himsBoxHeader card-head inner" id="Div2" runat="server" visible="false">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                        <div class="gridHeaderText">
                                                            <header>
                                                                <asp:Label ID="Label1" Text="Pending Fee List" runat="server" />
                                                            </header>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="himsBoxContent">
                                                    <div id="Div3" runat="server" visible="true" class="table-responsive">
                                                        <asp:GridView ID="FreeFeeListGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                            EmptyDataText="No Records Found !!" AllowPaging="false" ShowHeader="true" DataKeyNames="Id,ReceiptBookId,FeeId,FeeSetupId,OrderIndex"
                                                            OnRowDataBound="FreeFeeListGridView_RowDataBound" CssClass="table table-striped table-bordered">
                                                            <Columns>
                                                                <asp:BoundField DataField="FeeName" HeaderText="Fee" ItemStyle-Width="45%" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                <asp:TemplateField HeaderText="Pending Amount" ItemStyle-Width="30%" ItemStyle-Wrap="true"
                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:TextBox ID="PendingAmountTextBox" runat="server" ClientIDMode="Static" MaxLength="15"
                                                                            onKeypress="javascript:return MaskDecimal(event,12,2)"></asp:TextBox>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Start Date" ItemStyle-Width="20%" ItemStyle-Wrap="true"
                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="StartDateLabel" runat="server" Text='<%# Eval("StartDate", "{0:M-dd-yyyy}") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="" meta:resourcekey="TemplateFieldResource4">
                                                                    <HeaderTemplate>
                                                                        <label class="rt-chkbox rt-chkbox-outline">
                                                                            <asp:CheckBox ID="HeaderIsObsoleteCheckBox" runat="server" AutoPostBack="true" OnCheckedChanged="AddHeaderIsObsoleteCheckBox_OnCheckedChanged" />
                                                                            <span></span>
                                                                        </label>
                                                                    </HeaderTemplate>
                                                                    <ItemTemplate>
                                                                        <asp:ImageButton SkinID="AddImageButton" ToolTip="Add Fee" ID="ExpandImageButton"
                                                                            ImageUrl="~/Images/expand.gif" runat="server" OnClick="AddImageButton_Click" />
                                                                    </ItemTemplate>
                                                                    <HeaderStyle HorizontalAlign="Center" />
                                                                    <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                                </asp:TemplateField>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div id="divTotal2" runat="server" class="col-md-12" visible="false">
                                        <span class="col-md-8">
                                            <asp:Label ID="TotalAmount2Label" runat="server" Text="Total" Font-Bold="true"></asp:Label>
                                        </span>
                                        <span class="col-md-4">
                                            <asp:TextBox ID="TotalPendingAmount2TextBox" SkinID="CustomWidthTextBox" Width="110px" CssClass="pull-right"
                                                runat="server" MaxLength="200">
                                            </asp:TextBox>
                                        </span>


                                        <span class="col-md-8">
                                            <asp:Label ID="TotalPendingAmountLabel" runat="server" Text="Total Pending Amount" Font-Bold="true"></asp:Label>
                                        </span>
                                        <span class="col-md-4">
                                            <asp:TextBox ID="TotalPendingAmount3TextBox" SkinID="CustomWidthTextBox" Width="110px" CssClass="pull-right"
                                                runat="server" MaxLength="200">
                                            </asp:TextBox>
                                        </span>
                                    </div>
                                </div>

                            </div>

                            <div class="alignCenter col-md-12">
                                <asp:Button ID="FeeRefundButton" runat="server" Text="Fee Refund" SkinID="0" CssClass="btn btn-library fas " OnClick="FeeRefundButton_Click" />
                            </div>

                            <div id="CancelFeeDiv" class="modal" style="display: none;">
                                <div class="modal-dialog" style="margin-top: 88px">
                                    <!-- Modal content-->
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <h2><b>Cancel Receipt List</b>
                                                <button type="button" class="close" data-dismiss="modal" onclick="closeshowpopup();">&times;</button></h2>
                                        </div>
                                        <div class="modal-body padd-0 table-responsive" style="max-height: 175px; overflow: scroll;">
                                            <table class="table table-striped table-bordered">
                                                <thead>
                                                    <tr>
                                                        <th scope="col">Receipt No</th>
                                                        <th scope="col">Receipt Date</th>
                                                        <th scope="col">Receipt Amount</th>
                                                        <th scope="col">Pay Type</th>
                                                        <th scope="col">Cheque No / Reference No</th>
                                                        <th scope="col">Bank Name</th>
                                                        <th scope="col">Receipt Book</th>
                                                        <th scope="col">Invoice No	</th>
                                                        <th scope="col">Remark	</th>
                                                    </tr>
                                                </thead>
                                                <tbody id="CancelFeeGridBody">
                                                    <asp:Label ID="CancelFeeListLabel" runat="server"></asp:Label>
                                                </tbody>
                                            </table>
                                        </div>

                                    </div>
                                </div>
                            </div>

                            <div id="PendingFeeDiv" class="modal" style="display: none;" runat="server">
                                <div class="modal-dialog" style="margin-top: 88px">
                                    <!-- Modal content-->
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <h2 style="color: red;"><b>Please check old pending fee</b>
                                                <button type="button" class="close" data-dismiss="modal" onclick="closependingfeepopup();">&times;</button></h2>
                                        </div>
                                        <div class="modal-body padd-0 table-responsive">
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div id="PendingChequeListDiv" class="modal" style="display: none;">
                                <div class="modal-dialog" style="margin-top: 88px">
                                    <!-- Modal content-->
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <h2><b>Pending Cheque Receipt list</b>
                                                <button type="button" class="close" data-dismiss="modal" onclick="closePendingChequepopup();">&times;</button></h2>

                                        </div>
                                        <div class="modal-body padd-0 table-responsive" style="max-height: 175px; overflow: auto;">

                                            <table class="table table-striped table-bordered">
                                                <thead>
                                                    <tr>
                                                        <th scope="col">Receipt No</th>
                                                        <th scope="col">Receipt Date</th>
                                                        <th scope="col">Receipt Amount</th>
                                                        <th scope="col">Pay Type</th>
                                                        <th scope="col">Cheque No</th>
                                                        <th scope="col">Cheque Date</th>
                                                        <th scope="col">Bank Name</th>
                                                        <th scope="col">Receipt Book</th>
                                                    </tr>
                                                </thead>
                                                <tbody id="PendingChequeGridBody">
                                                    <asp:Label ID="PendingChequeListLabel" runat="server"></asp:Label>
                                                </tbody>
                                            </table>
                                        </div>

                                    </div>
                                </div>
                            </div>

                            <div id="FeesRemarkDiv" class="modal" style="display: none;">
                                <div class="modal-dialog" style="margin-top: 88px">
                                    <!-- Modal content-->
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <h2 style="color: red;"><b><span style="font-size: 18px" id="FeesRemarkText" runat="server"></span></b>
                                                <button type="button" class="close" data-dismiss="modal" onclick="closeFeesRemarkpopup();">&times;</button></h2>
                                        </div>
                                        <div class="modal-body padd-0 table-responsive">
                                        </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>

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

                                    <div class="himsBoxHeader card-head inner" id="Div4" runat="server">
                                        <div class="leftdiv">
                                        </div>
                                        <div class="himsBoxTitle">
                                            <div class="headerText">
                                                <header>
                                                    <asp:Label ID="Label4" Text="Paid Receipt List" runat="server" />
                                            </div>
                                            </header>
                                        </div>
                                    </div>
                                    <div class="himsBoxContent  width-100 pTop5 table-responsive">
                                        <div id="Div8" 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" >
                                                <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%" Visible="false"></asp:BoundField>
                                                    <%--MantisId : 0035274--%>
                                                    <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" Text="Student Sibling Fee Detail Show" SkinID="0"
                                    CssClass="btn btn-assign fas" Visible="false" OnClick="StudentSiblingFeeDetail_Click" />
                            </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>
                    </div>

                </div>
            </div>

            <div id="Popupdiv" style="display: none;">
                <div class="sweet-alert showSweetAlert visible" style="display: block; background-color: #ffcccc; margin-top: -100px;">
                    <div class="sa-icon sa-error" style="display: none;">
                        <span class="sa-x-mark">
                            <span class="sa-line sa-left"></span>
                            <span class="sa-line sa-right"></span>
                        </span>
                    </div>
                    <div class="sa-icon sa-warning" style="display: none;">
                        <span class="sa-body"></span>
                        <span class="sa-dot"></span>
                    </div>
                    <div class="sa-icon sa-info" style="display: none;"></div>
                    <div class="sa-icon sa-success" style="display: none;">
                        <span class="sa-line sa-tip"></span>
                        <span class="sa-line sa-long"></span>

                        <div class="sa-placeholder"></div>
                        <div class="sa-fix"></div>
                    </div>
                    <div class="sa-icon sa-custom" style="display: none;"></div>
                    <h3><b>Your extra student limit has been exceeded kindly contact your School Administrator.</h3>
                    </b>
                    <p></p>
                </div>
            </div>

        </ContentTemplate>
    </asp:UpdatePanel>
    <%--  <script data-main="../../JavaScript/rjs/encrypt/fee-receipt-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/fee-receipt")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <%--<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>--%>
    <%--    <script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js" type="text/javascript"></script>
    <link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/start/jquery-ui.css" rel="stylesheet" type="text/css" />--%>
    <script type="text/javascript">
        localStorage.feereceipttab = Date.now();
        var onLocalStorageEvent = function (e) {
            if (e.key == "feereceipttab") {
                // Listen if anybody else opening the same page!
                localStorage.feereceipttab_available = Date.now();
            }
            if (e.key == "feereceipttab_available") {
                alert("One more page already open");
                window.location = '/Pages/Baseframework/MyDashBoard.aspx';
            }
        };
        window.addEventListener('storage', onLocalStorageEvent, false);

        document.addEventListener('keydown', function (e) {
            if ($('#IsDisplayOldPendingInReceiptHdn').val() == 'Force') {
                e.preventDefault();
            }
            else {
                // Please Add this Page name in StudentSearch.js KeyDown event so that the keydown event is not triggered twice
                var tag = $(e.target).attr("id");
                var tag1 = $(e.target).attr('class');
                if (tag1 == "studentautosearchitem" && (e.keyCode == 37 || e.keyCode == 38 || e.keyCode == 39 || e.keyCode == 40)) {
                    switch (e.keyCode) {
                        case 37: case 39: case 38: case 40: e.preventDefault();
                    }
                }
                if ((tag == "ctl00_CP_StudentAutoSearchTextBox" || e.keyCode == 13) || (e.keyCode == 13 || tag1 == "studentautosearchitem")) {
                    Focus();
                }
            }
        });

        $(document).mouseup(function (e) {
            var container = $("#ctl00_CP_AutoSearchSuggestion");

            // if the target of the click isn't the container nor a descendant of the container
            if (!container.is(e.target) && container.has(e.target).length === 0) {
                document.getElementById("AutoSearchSuggestion").hidden = true;
            }
        });

        function ShowPopup() {
            $('#CancelFeeDiv').css('display', 'block');
        }
        function closeshowpopup() {
            $('#CancelFeeDiv').css('display', 'none');
            $('#CancelFeeDiv').hide();
        }

        function ShowPendingFeePopup(IsDisplayOldPendingInReceipt) {
            $('#ctl00_CP_IsDisplayOldPendingInReceiptHdn').val(IsDisplayOldPendingInReceipt);
            $('#ctl00_CP_PendingFeeDiv').css('display', 'block');
        }
        function closependingfeepopup() {
            var IsDisplayOldPendingInReceipt = $('#ctl00_CP_IsDisplayOldPendingInReceiptHdn').val();

            if (IsDisplayOldPendingInReceipt == 'Force') {
                $('#ctl00_CP_PendingFeeDiv').css('display', 'none');
                $('#ctl00_CP_PendingFeeDiv').hide();
                $('#ctl00_ClearButton').click();
                $('#ctl00_CP_TotalPendingAmountTextBox').val('');
                $('#ctl00_CP_TotalPayableAmountTextBox').val('');
            }
            else {
                $('#ctl00_CP_PendingFeeDiv').css('display', 'none');
                $('#ctl00_CP_PendingFeeDiv').hide();
            }
        }

        function ShowPendingChequePopup() {
            $('#PendingChequeListDiv').css('display', 'block');
        }
        function closePendingChequepopup() {
            $('#PendingChequeListDiv').css('display', 'none');
            $('#PendingChequeListDiv').hide();
        }

        function ShowFeesRemarkpopup() {
            $('#FeesRemarkDiv').css('display', 'block');
        }
        function closeFeesRemarkpopup() {
            $('#FeesRemarkDiv').css('display', 'none');
            $('#FeesRemarkDiv').hide();
        }

        function StudentwiseFee() {
            var left = (screen.width / 2) - (1000 / 2);
            var top = (screen.height / 2) - (500 / 2);
            if (popwindow == null) {
                popwindow = window.open('../../Pages/FeeManagement/StudentwiseFee.aspx?MasterPage=Dialog', '', 'height=600,width=1000,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes' + ', top=' + top + ', left=' + left);
            }
            else {
                popwindow.close();
                popwindow = window.open('../../Pages/FeeManagement/StudentwiseFee.aspx?MasterPage=Dialog', '', 'height=600,width=1000,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes' + ', top=' + top + ', left=' + left);
            }
        }

        function fCalculation() {
            var table = document.getElementById('ctl00_CP_FeeListGridView');
            var sum = 0;
            var PayableAmount = 0;
            var PendingAmount = 0;
            var flag = 0;
            var location = 0;
            for (var i = 0; i < table.rows.length; i++) {
                if (!isNaN(table.rows[i].cells[2].innerText)) {
                    PendingAmount = parseFloat(table.rows[i].cells[1].childNodes[1].value);
                    PayableAmount = parseFloat(table.rows[i].cells[2].childNodes[1].value);

                    if (PayableAmount > PendingAmount) {
                        flag = 1;
                        location = i;
                        break;
                    }
                }
            }
            if (flag == 1) {
                alert("Amount should be less than Pending Amount");
                table.rows[location].cells[2].childNodes[1].value = "";
            }
            for (var i = 0; i < table.rows.length; i++) {
                if (!isNaN(table.rows[i].cells[2].innerText)) {
                    PayableAmount = parseFloat(table.rows[i].cells[2].childNodes[1].value);
                    if (!isNaN(PayableAmount))
                        sum = (parseFloat(sum) + PayableAmount).toString();
                }
            }
            document.getElementById('<%=TotalPayableAmountTextBox.ClientID %>').value = sum;

            var AmountMandatory = document.getElementById('<%=IsAmountMandatoryHiddenField.ClientID %>').value;
            if (AmountMandatory == "1") {
                document.getElementById('<%=AmountTextBox.ClientID %>').value = sum;
            }

            var AllowGST = document.getElementById('<%=AllowGSTHiddenField.ClientID %>').value;
            if (AllowGST == "1") {

                var CGSTPercentage = document.getElementById('<%=CGSTPercentageHiddenField.ClientID %>').value;
                var SGSTPercentage = document.getElementById('<%=SGSTPercentageHiddenField.ClientID %>').value;

                var TotalPayableAmount = document.getElementById('<%=TotalPayableAmountTextBox.ClientID %>').value;

                var CGSTAmount = (TotalPayableAmount * CGSTPercentage / 100).toString();
                var SGSTAmount = (TotalPayableAmount * SGSTPercentage / 100).toString();

                document.getElementById('<%=CGSTTextBox.ClientID %>').value = CGSTAmount;
                document.getElementById('<%=SGSTTextBox.ClientID %>').value = SGSTAmount;

                var NetPayableAmount = parseFloat(sum) + parseFloat(CGSTAmount) + parseFloat(SGSTAmount);

            }
            document.getElementById('<%=NetPayableAmountTextBox.ClientID %>').value = NetPayableAmount.toString();
        }

        function Search(obj) {
            if (obj.id == 'ctl00_CP_StudentAutoSearchTextBox') {
                var OrgId = $("#ctl00_CP_OrganizationDropDownList").val();
                var BatchId = $("#ctl00_CP_BatchDropDownList").val();
                if ($(obj).val().length > 1) {
                    $.ajax({
                        type: "POST",
                        url: "/Pages/FeeManagement/FeeReceipt.aspx/SearchStudent",
                        data: '{"SearchValue":"' + $(obj).val() + '", "OrgId": "' + OrgId + '", "BatchId": "' + BatchId + '", "Flag": "' + $("#ctl00_CP_SearchListHiddenField").val() + '"}',
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (data) {
                            if ($("#ctl00_CP_SearchListHiddenField").val() == "true") {
                                if (data.d.includes("</li>")) {
                                    $("#ctl00_CP_SearchListHiddenField").val("false");
                                }
                            }
                            document.getElementById("AutoSearchSuggestion").hidden = false;
                            document.getElementById("AutoSearchSuggestion").innerHTML = data.d;
                        },
                        error: function (jqXHR, Status, errorMsg) {

                        }
                    });
                }
                else {
                    document.getElementById("AutoSearchSuggestion").hidden = true;
                }
            }
        }

        function Focus() {
            var keyCode = window.event.keyCode;
            if (keyCode !== 38 && keyCode !== 40 && keyCode !== 13) return;

            var current = document.activeElement;
            let items = [];
            for (i = 0; i < document.getElementsByClassName('studentautosearchitem').length; i++) {
                items[i] = document.getElementsByClassName('studentautosearchitem')[i];
            }
            var currentIndex = items.indexOf(current);
            var newIndex;

            if (keyCode == 13) {
                selectStudent(items[currentIndex].innerHTML, true);
            }
            else {
                if (currentIndex === -1) {
                    newIndex = 0
                } else {
                    if (keyCode === 38) newIndex = (currentIndex + items.length - 1) % items.length
                    else newIndex = (currentIndex + 1) % items.length
                }
                items[newIndex].focus();
            }
        }

        function selectStudent(val, IsEnter) {
            $("#ctl00_CP_StudentAutoSearchTextBox").val(val);
            var str = $("#ctl00_CP_StudentAutoSearchTextBox").val();
            if (!IsEnter)
                str = str.substring(0, str.length - 1);

            $("#ctl00_CP_StudentAutoSearchTextBox").val(str);
            //$("#ctl00_CP_StudentIdNoTextBox").val(str.substring(str.lastIndexOf(' ') + 1)); //Mantis 35022
            $("#ctl00_CP_StudentIdNoTextBox").val(str.substring(str.lastIndexOf('[') + 1, str.lastIndexOf(']')).trim());
            $("#ctl00_CP_StudentIdNoTextBox").trigger("change");
            document.getElementById("AutoSearchSuggestion").hidden = true;
        }

        function refreshclick() {
            var a = $('#<%=StudentAddGetImageButton.ClientID %>').find('[id*="StudentAddGetImageButton"]');
            a.click();
        }

        function showmodalpopup() {
            $(".hls-bg").show();
            $(".container").hide();
            $("#Popupdiv").show();
            setTimeout(function () {
                $("#Popupdiv").hide();
                $(".hls-bg").hide();
                $(".container").show();
            }, 4000);
        };

    </script>

</asp:Content>
