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

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

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="IncidentLogUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont" runat="server" id="ScreenGroup">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="172"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader1WireBox card card-box">
                        <div class="himsBoxHeader card-head">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText">
                                    <header>
                                        <i class="fas fa-user-check"></i>
                                        <asp:Label ID="AssignToLabel" runat="server" Text="Assign To"></asp:Label>
                                    </header>
                                </div>
                            </div>
                        </div>
                        <div class="himsBoxContent card-body">
                            <div class="contentHolder">
                                <table runat="server" visible="false">
                                </table>
                                <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_OnSelectedIndexChanged">
                                        </asp:DropDownList>
                                    </div>
                                </div>

                                <asp:Panel ID="StudentSearchPanel" runat="server">
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="fLeft pRight5">
                                            <asp:HiddenField ID="SourceIdHiddenField" runat="server" />
                                            <asp:HiddenField ID="ClassIdHiddenField" runat="server" />
                                            <asp:HiddenField ID="AdmissionCategoryIdHiddenField" runat="server" />
                                        </div>
                                    </div>
                                </asp:Panel>

                                <div class="himssuHeader6WireBox col-md-12">
                                    <div id="FeeAllocationDetailDiv" runat="server" visible="false">

                                        <div class="himsBoxHeader card-head" id="GridViewPagerDiv" runat="server" visible="false">

                                            <%-- <div class="gridHeaderText ">
                                                                <header>
                                                                <asp:Label ID="GridViewLabel" Text="Available Fee List" runat="server" />
                                                                </header>
                                                            </div>--%>
                                            <div class="cBoth"></div>
                                            <br />
                                        </div>


                                        <div class="himsBoxContent pTop10">
                                            <div id="Div5" runat="server" visible="false" class="table-responsive">
                                                <div id="GridViewMessageDiv" class="himsBoxContentMsg" runat="server" visible="False">
                                                </div>
                                                <asp:GridView ID="FeeAllocationGridView" runat="server" AutoGenerateColumns="False"
                                                    EmptyDataText="No Records Found !!" AllowPaging="false" ShowHeader="true" DataKeyNames=""
                                                    OnRowDataBound="FeeAllocationGridView_RowDataBound" ShowFooter="true" CssClass="table table-striped table-bordered table-hover">
                                                    <Columns>
                                                        <asp:TemplateField HeaderText="Fee" ItemStyle-Width="17%" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="FeeNameLabel" ClientIDMode="Static" runat="server" Text='<%#Eval("FeeName")%>'></asp:Label>
                                                            </ItemTemplate>
                                                            <FooterTemplate>
                                                                <asp:Label ID="FFeeNameLabel" ClientIDMode="Static" runat="server" Text="Total" Font-Bold="true"></asp:Label>
                                                            </FooterTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Optional" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="3%"
                                                            ItemStyle-Wrap="true" Visible="false">
                                                            <ItemStyle HorizontalAlign="Center" />
                                                            <ItemTemplate>
                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                    <asp:CheckBox ID="IsOptionalCheckBox" Checked='<%#Eval("IsOptional")%>' Enabled="false"
                                                                        runat="server" />
                                                                    <span></span>
                                                                </label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Variable" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="3%"
                                                            ItemStyle-Wrap="true" Visible="false">
                                                            <ItemStyle HorizontalAlign="Center" />
                                                            <ItemTemplate>
                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                    <asp:CheckBox ID="IsVariableCheckBox" Checked='<%#Eval("IsVariable")%>' Enabled="false"
                                                                        runat="server" />
                                                                    <span></span>
                                                                </label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Amount" ItemStyle-Width="6%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="AmountLabel" runat="server" ClientIDMode="Static" Font-Bold="true"
                                                                    Text='<%#Eval("Amount") %>'></asp:Label>

                                                            </ItemTemplate>
                                                            <FooterTemplate>
                                                                <asp:Label ID="AmountLabel" runat="server" ClientIDMode="Static" Font-Bold="true"></asp:Label>
                                                            </FooterTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Additional Amount" ItemStyle-Width="6%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="AdditionalAmountLabel" runat="server" ClientIDMode="Static" Font-Bold="true"
                                                                    Text='<%#Eval("AdditionalAmount") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <FooterTemplate>
                                                                <asp:Label ID="AdditionalAmountLabel" runat="server" ClientIDMode="Static" Font-Bold="true"></asp:Label>
                                                            </FooterTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Exemption Amount" ItemStyle-Width="6%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="DiscountAmountLabel" runat="server" ClientIDMode="Static" Font-Bold="true"
                                                                    Text='<%#Eval("DiscountAmount") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <FooterTemplate>
                                                                <asp:Label ID="DiscountAmountLabel" runat="server" ClientIDMode="Static" Font-Bold="true"></asp:Label>
                                                            </FooterTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Not Applicable Amount" ItemStyle-Width="6%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="NotApplicableAmountLabel" runat="server" ClientIDMode="Static" Font-Bold="true"
                                                                    Text='<%#Eval("NotApplicableAmount") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <FooterTemplate>
                                                                <asp:Label ID="NotApplicableAmountLabel" runat="server" ClientIDMode="Static" Font-Bold="true"></asp:Label>
                                                            </FooterTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Paid Amount" ItemStyle-Width="5%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="PaidAmountLabel" ClientIDMode="Static" runat="server"></asp:Label>
                                                            </ItemTemplate>
                                                            <FooterTemplate>
                                                                <asp:Label ID="FPaidAmountLabel" ClientIDMode="Static" runat="server" Font-Bold="true"></asp:Label>
                                                            </FooterTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Pending Amount" ItemStyle-Width="5%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="PendingAmountLabel" ClientIDMode="Static" runat="server"></asp:Label>
                                                            </ItemTemplate>
                                                            <FooterTemplate>
                                                                <asp:Label ID="FPendingAmountLabel" ClientIDMode="Static" runat="server" Font-Bold="true"></asp:Label>
                                                            </FooterTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Start Date" ItemStyle-Width="5%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="StartDateLabel" runat="server"></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="End Date" ItemStyle-Width="5%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="EndDateLabel" runat="server"></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Remark" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="RemarkLabel" Text='<%# ("Remark") %>' runat="server"></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <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>
                                                    </Columns>
                                                    <PagerSettings Visible="False" />
                                                </asp:GridView>
                                            </div>
                                        </div>
                                    </div>
                                </div>

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

                                <div class="himssuHeader6WireBox">
                                </div>
                                <div id="divOuterFeeExpense" runat="server">
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="Label1" Text="Fee Setup" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList ID="FeeExpenseDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control"
                                                AutoPostBack="true" OnSelectedIndexChanged="FeeExpenseDropDownList_OnSelectedIndexChanged">
                                            </asp:DropDownList>
                                        </div>
                                        <div class="fLeft pRight5" id="divExpenseMasterData" runat="server" visible="false" style="margin-top: 10px">
                                            <div>
                                                <b style="font-size: 16px">Opening Amount :</b><asp:Label ID="OpeningAmountLabel" ClientIDMode="Static" runat="server"></asp:Label><br />
                                            </div>
                                            <div>
                                                <b style="font-size: 16px">Paid Amount :</b><asp:Label ID="PaidAmountLabel" ClientIDMode="Static" runat="server"></asp:Label><br />
                                            </div>
                                            <div>
                                                <b style="font-size: 16px">Closing Balance :</b><asp:Label ID="ClosingBalanceLabel" ClientIDMode="Static" runat="server"></asp:Label><br />
                                            </div>
                                            <div>
                                                <b style="font-size: 16px">Total Expense Amount :</b><asp:Label ID="TotalExpenseAmountLabel" ClientIDMode="Static" runat="server"></asp:Label><br />
                                            </div>
                                        </div>
                                    </div>

                                    <div style="clear: both"></div>


                                    <div class="himsBoxContent pTop10" style="margin-top: 100px">
                                        <div id="divGridOuter" runat="server" class="table-responsive col-md-12">
                                            <%--visible="false"--%>
                                            <div id="Div2" class="himsBoxContentMsg" runat="server" visible="False">
                                            </div>
                                            <asp:GridView ID="FeeExpenseDetailsGridView" runat="server" AutoGenerateColumns="False"
                                                EmptyDataText="No Records Found !!" AllowPaging="false" ShowHeader="true" DataKeyNames=""
                                                ShowFooter="true" CssClass="table table-striped table-bordered table-hover">
                                                <Columns>
                                                    <asp:TemplateField HeaderText="Expense Type" ItemStyle-Width="17%" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:Label ID="FeeExpenseTypeLabel" ClientIDMode="Static" runat="server" Text='<%#Eval("FeeExpenseType")%>'></asp:Label>
                                                        </ItemTemplate>
                                                        <FooterTemplate>
                                                            <asp:Label ID="TotalLabel" ClientIDMode="Static" runat="server" Text="Total" Font-Bold="true"></asp:Label>
                                                        </FooterTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Expense Date" ItemStyle-Width="17%" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:Label ID="ExpenseDateLabel" ClientIDMode="Static" runat="server" Text='<%#Eval("ExpenseDate", "{0: dd/MM/yyyy}")%>'></asp:Label>

                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Expense Amount" ItemStyle-Width="17%" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:Label ID="ExpenseAmountLabel" ClientIDMode="Static" runat="server" Text='<%#Eval("ExpenseAmount")%>'></asp:Label>
                                                        </ItemTemplate>
                                                        <FooterTemplate>
                                                            <asp:Label ID="TotalExpenseAmountLabel" ClientIDMode="Static" runat="server" Font-Bold="true" Text='<%#TotalExpenseAmount()%>'></asp:Label>
                                                        </FooterTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Remark" ItemStyle-Width="17%" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:Label ID="ExpenseRemarkLabel" ClientIDMode="Static" runat="server" Text='<%#Eval("ExpenseRemark")%>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                </Columns>
                                                <PagerSettings Visible="False" />
                                            </asp:GridView>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                </tr>
                    </table>
            </div>
            </div>
          
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--    <script data-main="../../JavaScript/rjs/encrypt/my-fee-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/my-fee")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
