<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="PF_account_opening.aspx.cs" Inherits="HRMS.PF_account_opening" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="main-panel">
        <div class="row">
            <div class="col-md-12">
                <section class="panel">
                    <header class="panel-heading">
                    Provident Fund Opening
                        <div class="pull-right">
                            <asp:Button CssClass="btn btn-info" ID="btn_save" Text="Save" runat="server" 
                                onclick="btn_save_Click"/>
                            <asp:Button CssClass="btn btn-info" ID="btn_cancel" Text="Back" 
                                runat="server" onclick="btn_cancel_Click"/>
                        </div>
                    </header>
                    <div class="panel-body">
                        <div class="span6">
                                <div id="divmessage" runat="server" visible="false" class="alert alert-info alert-dismissable">
                                    <asp:label text="" ID="lbl_msg" CssClass="msg" runat="server"></asp:label>
                                </div>
                            </div>

                            <div class="span6">
                                <div id="diverrmessage" runat="server" visible="false" class="alert alert-info alert-dismissable">
                                    <asp:label text="" id="lbl_err_msg" CssClass="msg" runat="server"></asp:label>
                                    
                                </div>
                            </div>
                            
                            <div class="row">
                                <label class="control-label col-md-2" runat="server">Account ID</label>
                                <div class="col-md-2">
                                    <asp:TextBox CssClass="form-control" ReadOnly="true" ID="txt_account_id" runat="server"></asp:TextBox>    
                                </div>

                                <label id="Label8" class="control-label col-md-3" runat="server">Account Code</label>
                                <div class="col-md-2">
                                    <asp:TextBox CssClass="form-control" ID="txt_account_code" runat="server"></asp:TextBox>    
                                </div>
                            </div>


                            <div class="row" style ="padding-top:5px">
                            <label class="control-label col-md-2" runat="server">Employee</label> 
                                <div class="col-md-3">
                                <asp:DropDownList ID="ddl_employee" runat="server" CssClass="form-control col-md-3 select2" 
                                        onselectedindexchanged="ddl_employee_SelectedIndexChanged" 
                                        AutoPostBack="True"></asp:DropDownList>
                                   
                                </div>

                                 <label id="Label1" class="control-label col-md-2" runat="server">Basic Salary</label> 
                                <div class="col-md-3">
                                    <asp:TextBox ID="txt_b_salary" CssClass="form-control" style="text-align:right" ReadOnly="true" runat="server"></asp:TextBox>
                                </div>
                            
                            </div>

                             <div class="row" style="padding-top:5px">
                            <label id="Label2" class="control-label col-md-2"  runat="server">Employeer Contribution</label> 
                                <div class="col-md-3">
                                    <asp:TextBox ID="txt_employeer_cont" ReadOnly="true" Visible="false" CssClass="form-control" runat="server"></asp:TextBox>
                                    <asp:TextBox ID="txt_emp_amount" CssClass="form-control" ReadOnly="true" style="text-align:right" runat="server"></asp:TextBox>
                                </div>

                                 <label id="Label3" class="control-label col-md-2" runat="server">Employee Contribution</label> 
                                <div class="col-md-3">
                                    <asp:TextBox ID="txt_emp_cont" CssClass="form-control" Visible="false"  ReadOnly="true"  runat="server"></asp:TextBox>
                                    <asp:TextBox ID="txt_empl_amount" CssClass="form-control" ReadOnly="true" style="text-align:right" runat="server"></asp:TextBox>
                                </div>
                            
                            </div>


                             <div class="row">
                            <label id="Label9" class="control-label col-md-2"  visible="false" runat="server">Amount</label> 
                                <div class="col-md-2">
                                    
                                </div>

                                 <label id="Label12" class="control-label col-md-3"  visible="false"  runat="server">Amount</label> 
                                <div class="col-md-2">
                                    
                                </div>
                            
                            </div>


                            <hr />
                            <div class="row" style="padding-top:5px">
                            <label id="Label10" class="control-label col-md-3">Employeer Opening Balance</label> 
                                <div class="col-md-2">
                                    <asp:TextBox ID="txt_employeer_opn_bal" onkeyup = "javascript:this.value=Comma(this.value);" style="text-align:right" CssClass="form-control" runat="server"></asp:TextBox>
                                </div>

                                 <label id="Label11" class="control-label col-md-3">Employee Opening Balance</label> 
                                <div class="col-md-2">
                                    <asp:TextBox ID="txt_emp_opn_bal" onkeyup = "javascript:this.value=Comma(this.value);" style="text-align:right" CssClass="form-control" runat="server"></asp:TextBox>
                                </div>
                            </div>

                            <div class="row" style="padding-top:5px">
                            <label id="Label6" class="control-label col-md-3">Profit Opening</label> 
                                <div class="col-md-2">
                                    <asp:TextBox ID="txt_profit_bal"  CssClass="form-control" onkeyup = "javascript:this.value=Comma(this.value);" style="text-align:right" runat="server"></asp:TextBox>
                                </div>

                                 <label id="Label7" class="control-label col-md-3">Loan Opening</label> 
                                <div class="col-md-2">
                                    <asp:TextBox ID="txt_loan_opn" CssClass="form-control" onkeyup = "javascript:this.value=Comma(this.value);" style="text-align:right" runat="server"></asp:TextBox>
                                </div>
                            </div>

                            <%--<hr />--%>

                            <div class="row" style="padding-top:5px">
                            <label id="Label4" class="control-label col-md-2" runat="server">Start Date</label> 
                                <div class="col-md-3">
                                    <asp:TextBox ID="txt_strt_date" CssClass="form-control datetime" runat="server"></asp:TextBox>
                                </div>

                                 <label id="Label5" class="control-label col-md-2" runat="server">End Date</label> 
                                <div class="col-md-3">
                                    <asp:TextBox ID="txt_end_date" CssClass="form-control datetime" runat="server"></asp:TextBox>
                                </div>
                            </div>

                             
                    </div>

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

    <script src="../../ThemeScrips/jquery.min.js"></script>
    <link href="../../ThemeScrips/select2.min.css" rel="stylesheet" />
    <script src="../../ThemeScrips/select2.min.js"></script>
    <script>
        $('.select2').select2();
    </script>

    <script>
        function Comma(Num) { //function to add commas to textboxes
            Num += '';
            Num = Num.replace(',', ''); Num = Num.replace(',', ''); Num = Num.replace(',', '');
            Num = Num.replace(',', ''); Num = Num.replace(',', ''); Num = Num.replace(',', '');
            x = Num.split('.');
            x1 = x[0];
            x2 = x.length > 1 ? '.' + x[1] : '';
            var rgx = /(\d+)(\d{3})/;
            while (rgx.test(x1))
                x1 = x1.replace(rgx, '$1' + ',' + '$2');
            return x1 + x2;
        }

    </script>

</asp:Content>
