<%@ Page Language="C#" AutoEventWireup="true" CodeFile="otherincomes.aspx.cs" MasterPageFile="~/module/dashboardPage.master" Inherits="module_otherincomes" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <script src="../assets/js/jquery-1.9.1.js" type="text/javascript"></script>

    <script type="text/javascript">
        var orderi = 1;
        var amount = 0;
        var subtotal = 0;
        var existamount = 0;
        var existamount1 = 0;
        var existamount2 = 0;
        var existamount3 = 0;
        var existamount4 = 0;  var existamount5 = 0;
        var existamount6 = 0;
        var existamount7 = 0;
        var amountarray = [];
        var amountarray11 = [];
        var amountarray22 = []; var row = 0;
        var initials = "";
        var total1 = 0;
        var total2 = 0;
        var studenids = "";
        $(document).ready(function () {
            let today2 = new Date().toISOString().substr(0, 10);
                     
            document.querySelector("#incomedate").value = today2;
            Getcode();
            datatable();
            SearchText1();
            $("select[id$=ddlpaymode]").change(function () {
                if( $("select[id$=ddlpaymode]").val() == "online"){
                    $("#divutrn").show();
                } 
                else  if($("select[id$=ddlpaymode]").val() == "cash"){
                    $("#divutrn").hide();
                }
            });
            $(".addrow").on('click', '.deleterow', function () {
                $(this).parent().parent().remove();
                $("#total").text("");
                $("#subtotal").text("");
            });
            $.ajax({
                type: "POST",
                contentType: "application/json; charset=utf-8",
                url: "otherincomes.aspx/PopulateDropDownList4",
                data: "",
                dataType: "json",
                success: function (result) {
                    $('select[id$=ddlyears]').empty();
                    $('select[id$=ddlyears]').append("<option value='0'>Select Year</option>");
                    $.each(result.d, function (key, value) {
                        var ddyear1 = value.DeptName;
                        var ddyear2 = value.year1;
                        var dtyear1 = new Date(ddyear1);
                        var dtyear2 = new Date(ddyear2);
                        var stryr = dtyear1.getFullYear() + "-" + dtyear2.getFullYear();

                        $('select[id$=ddlyears]').append($("<option data-toggle='tooltip' data-placement='top' title='" + stryr + "'></option>").val(value.DeptId).html(stryr));
                        //console.log(value.DeptName);
                    });
                    $('select[id$=ddlyears]').val('0').change();
                    //$('select[id$=cat] option:eq(0)').attr("selected", true);
                    //  $('select[id$=ddlclassty]').selectpicker('refresh');
                    //  hdndoc=$('select[id$=cat] option:eq(1)').val();
                },
                error: function ajaxError(result) {
                    console.log(result.status + ' : ' + result.statusText);
                }

            }); 
            $('select[id$=ddlyears]').change(function () {
                $.ajax({
                    type: "POST",
                    contentType: "application/json; charset=utf-8",
                    url: "otherincomes.aspx/PopulateDropDownList15",
                    data: "",
                    dataType: "json",
                    success: function (result) {
                        $('select[id$=ddlclass]').empty();
                        $('select[id$=ddlclass]').append("<option value='0'>Select class</option>");
                        $.each(result.d, function (key, value) {
                            var dd = value.DeptName;


                            $('select[id$=ddlclass]').append($("<option data-toggle='tooltip' data-placement='top' title='" + dd + "'></option>").val(value.DeptId).html(dd));
                            //console.log(value.DeptName);
                        });
                        $('select[id$=ddlclass]').val('0').change();
                        //$('select[id$=cat] option:eq(0)').attr("selected", true);
                        //  $('select[id$=ddlclassty]').selectpicker('refresh');
                        //  hdndoc=$('select[id$=cat] option:eq(1)').val();
                    },
                    error: function ajaxError(result) {
                        console.log(result.status + ' : ' + result.statusText);
                    }

                });
            }); 
            $('select[id$=ddlclass]').change(function () {
                $.ajax({
                    type: "POST",
                    contentType: "application/json; charset=utf-8",
                    url: "otherincomes.aspx/PopulateDropDownList6",
                    data: "{clids :'" + $('select[id$=ddlclass]').val() + "'}",
                    dataType: "json",
                    success: function (result) {
                        $('select[id$=ddldivisions]').empty();
                        $('select[id$=ddldivisions]').append("<option value='0'>Select Division</option>");
                        $.each(result.d, function (key, value) {
                            var dd = value.DeptName;


                            $('select[id$=ddldivisions]').append($("<option data-toggle='tooltip' data-placement='top' title='" + dd + "'></option>").val(value.DeptId).html(dd));
                            //console.log(value.DeptName);
                        });
                        //$('select[id$=ddldivisions]').val('0').change();
                        //$('select[id$=cat] option:eq(0)').attr("selected", true);
                        //  $('select[id$=ddlclassty]').selectpicker('refresh');
                        //  hdndoc=$('select[id$=cat] option:eq(1)').val();
                    },
                    error: function ajaxError(result) {
                        console.log(result.status + ' : ' + result.statusText);
                    }

                });
            }); 
            $.ajax({
                type: "POST",
                contentType: "application/json; charset=utf-8",
                url: "otherincomes.aspx/PopulateDropDownList7",
                data: "",
                dataType: "json",
                success: function (result) {
                    $('select[id$=ddlsemester]').empty();
                    $('select[id$=ddlsemester]').append("<option value='0'>Select Semester</option>");
                    $.each(result.d, function (key, value) {
                        var dd = value.DeptName;

                          
                        $('select[id$=ddlsemester]').append($("<option data-toggle='tooltip' data-placement='top' title='" + dd + "'></option>").val(value.DeptId).html(dd));
                           
                        //console.log(value.DeptName);
                    });
                    $('select[id$=ddlsemester]').val('0').change();
                    //$('select[id$=cat] option:eq(0)').attr("selected", true);
                    //  $('select[id$=ddlclassty]').selectpicker('refresh');
                    //  hdndoc=$('select[id$=cat] option:eq(1)').val();
                },
                error: function ajaxError(result) {
                    console.log(result.status + ' : ' + result.statusText);
                }

            }); 
            $('select[id$=ddldivisions]').change(function () {
               
                $.ajax({
                    type: "POST",
                    contentType: "application/json; charset=utf-8",
                    url: "otherincomes.aspx/PopulateDropDownListstud",
                    data: "{yrs :'"+  $('select[id$=ddlyears]').val() +"',cls :'"+ $('select[id$=ddlclass]').val() +"',divs : '"+ $('select[id$=ddldivisions]').val() +"'}",
                    dataType: "json",
                    success: function (result) {
                        $('select[id$=ddlstudents]').empty();
                        $('select[id$=ddlstudents]').append("<option value='0'>Select Student</option>");
                        $.each(result.d, function (key, value) {
                     

                            $('select[id$=ddlstudents]').append($("<option data-toggle='tooltip' data-placement='top' title='" + value.DeptName + "'></option>").val(value.studids).html(value.DeptName));
                            //console.log(value.DeptName);
                        });
                        $('select[id$=ddlstudents]').val('0').change();
                        //$('select[id$=cat] option:eq(0)').attr("selected", true);
                        //  $('select[id$=ddlclassty]').selectpicker('refresh');
                        //  hdndoc=$('select[id$=cat] option:eq(1)').val();
                    },
                    error: function ajaxError(result) {
                        console.log(result.status + ' : ' + result.statusText);
                    }

                });
            });
            $.ajax({
                type: "POST",
                contentType: "application/json; charset=utf-8",
                url: "otherincomes.aspx/PopulateDropDownList5",
                data: "",
                dataType: "json",
                success: function (result) {
                    $('select[id$=ddlincome]').empty();
                    $('select[id$=ddlincome]').append("<option value='0'>Select Income</option>");
                    $.each(result.d, function (key, value) {
                     

                        $('select[id$=ddlincome]').append($("<option data-toggle='tooltip' data-placement='top' title='" + value.DeptName + "'></option>").val(value.DeptId).html(value.DeptName));
                        //console.log(value.DeptName);
                    });
                    $('select[id$=ddlincome]').val('0').change();
                    //$('select[id$=cat] option:eq(0)').attr("selected", true);
                    //  $('select[id$=ddlclassty]').selectpicker('refresh');
                    //  hdndoc=$('select[id$=cat] option:eq(1)').val();
                },
                error: function ajaxError(result) {
                    console.log(result.status + ' : ' + result.statusText);
                }

            });
         
            $("select[id$=ddlincome]").change(function () {
                $.ajax({
                    url: 'otherincomes.aspx/getshortcodes',
                    type: 'post',
                    contentType: 'application/json;charset=utf-8',
                    dataType: 'json',
                    data: "{incod :'"+  $("select[id$=ddlincome]").val() +"'}",
                    success: function (data) {

                        data = JSON.parse(data.d);

                        initials = data[0].shortscodes;

                    
                           
                        //var name = "REC";

                        //fill = name + nn;
                        //$("#lblrecptnos").html(fill); 
                        //  $('#pre').html(fill);
                    },

                    
                 
                    error: function (error) {
                        console.log(JSON.stringify(error));
                    }
                });
            });
          
        }); 
        var fill = "";
        function Getcode() {
         
            $.ajax({
                url: 'otherincomes.aspx/GetEmpData',
                type: 'post',
                contentType: 'application/json;charset=utf-8',
                dataType: 'json',
                data: "{}",
                success: function (data) {

                    data = JSON.parse(data.d);

                    var nn = data;

                    
                           
                    var name = "REC";

                    fill = name + nn;
                    $("#lblrecptnos").html(fill); 
                    //  $('#pre').html(fill);
                },

                    
                 
                error: function (error) {
                    console.log(JSON.stringify(error));
                }
            });
        } 

        function SearchText1() {
                     	              
            $("#dstudent").autocomplete({
                source: function (request, response) {
                    $.ajax({
                        url: "otherincomes.aspx/GetCompanyName",
                        data: "{ 'pre':'" + request.term + "',years : '"+ $('select[id$=ddlyears]').val() +"', divionss :'"+ $('select[id$=ddldivisions]').val() +"', classids  : '"+ $('select[id$=ddlclass]').val() +"'}",
                        dataType: "json",
                        type: "POST",
                        contentType: "application/json; charset=utf-8",
                        success: function (data) {
                            if(data.d =="")
                            {
                                var dd = "&nbsp;&nbsp;Student Not Found";
                                Lobibox.notify(
                       'success',
                                      {
                                          title: true,
                                          msg: dd,
                                          position: "top right",
                                          closable: true,

                                          delay: 3000
                                      }
                  );
                                //$("#mclose")[0].click();
                            }
                            response($.map(data.d, function (item) {
                                                            
                                return {
                                    Name: item.titles+"." +item.firstnm+" "+item.midnm+" "+item.lastnm +"/"+item.studids,
                                    lnam:item.Name,
                                    val:item.studids,
                                    
                                    json: item
                                }
                            }))
                        },
                        error: function (XMLHttpRequest, textStatus, errorThrown) {
                            var dd = "&nbsp;&nbsp;Invalid Input";
                            //noty({ text: dd, layout: 'topRight', type: 'error' });
                            //setTimeout(function () { $.noty.closeAll(); }, 3000);
                        }
                    });
                },
              
                focus: function (event, ui) {
                    $("#dstudent").val(ui.item.Name);
                   
                    return false;
                },
                select: function (event, ui) {
                                    	                    
                  
                    srdstudentid(ui.item.val);
                                    	                        
                
                                    	                        
                    return false;

                },
                minLength: 1
            }).data("ui-autocomplete")._renderItem = function (ul, item) {
                return $("<li>")
                .append("<a>" + item.Name + "</a>")
                .appendTo(ul);
            };
        }
        function srdstudentid(sids){
            studenids = sids;
        }
        function Addrow(){
         
            var obj = {}; var markup = "";
          
              
                    amount = $("#txtamount").val();
                   
                    if (orderi == 1) {
                        $("#subtotal").text(amount);
                        existamount = $("#subtotal").text();
                        $("#total").text(amount);
                      
                        existamount1 = $("#total").text();
                        amountarray[orderi] = amount;
                        amountarray11[orderi] = amount;
                    } 
                    if (orderi > 1) {
                     
                        existamount = $("#subtotal").text();
                        $("#total").text(amount);
                         total1 = parseFloat(existamount) + parseFloat(amount);
                        total2 = parseFloat(existamount1) + parseFloat(amount);
                        total1 = total1.toFixed(2);
                        total2 = total2.toFixed(2);
                        $("#subtotal").text(total1);
                        existamount = $("#subtotal").text();
                        $("#total").text(total2);
                        existamount1 = $("#total").text();
                     
                      
                    } 
                    markup = "<tr><td style='text-align:center;'>"+ $("select[id$=ddlincome]").val() +"</td><td style='text-align:center;'>"+ $("#txtnarrations").val() +"</td><td style='text-align:center;'>"+ $("#txtamount").val() +"</td><td  align='center'><input value='X' id=" + orderi + " class='btn active deleterow' type=button style='color:#FF0000;' /></td></tr>";
                    $(".addrow").append(markup); orderi++;
                    $("select[id$=ddlincome]").val("0").change();$("#txtnarrations").val("");$("#txtamount").val("");
        }  
        function clear(){
            $("select[id$=ddlyears]").val("0").change();
            fill = ""; 
            Getcode();
            let today2 = new Date().toISOString().substr(0, 10);
                     
            document.querySelector("#incomedate").value = today2;
        }
        function SaveData(){
            var customers = new Array();
            var table = document.getElementById("tt12");
            for (var i = 1; i < table.rows.length; i++) {
                var row = table.rows[i]; 
               
                var customer = {};
                customer.incomeh =  row.cells[0].innerText;
                customer.particular =  row.cells[1].innerText;
                customer.amounts =  row.cells[2].innerText;
             
                customers.push(customer);console.log(customers);
            }
            var obj = {};
            obj.recinitials = initials;
            obj.recptdt = $("#incomedate").val();
            obj.yrs = $("select[id$=ddlyears]").val();
            obj.arrays = JSON.stringify(customers);
            obj.subtotals = $("#subtotal").html();alert( $("#total").html());
            obj.totlaamts = $("#total").html();
            obj.clses = $("select[id$=ddlclass]").val();
            obj.divisions = $("select[id$=ddldivisions]").val();
            obj.semisters = $("select[id$=ddlsemester]").val();
            obj.studnm = studenids;
            obj.paymode = $("select[id$=ddlpaymode]").val();
            obj.utrnos = $("#txtutrnos").val();
            $.ajax({
                url: 'otherincomes.aspx/SaveData',
                method: 'post',
                contentType: 'application/json;charset=utf-8',
                dataType: 'json',
                data: JSON.stringify(obj),
                success: function (data) {
                   // var lstid = data.d;
                  
                  
                    noty({ text: 'Saved Successfully', layout: 'topRight', type: 'information' });
                    setTimeout(function () { $.noty.closeAll(); }, 3000);
                    $("#tt12").find("tbody").empty();
                    datatable(); clear();
                },
                error: function () {
                    noty({ text: 'Get Error', layout: 'topRight', type: 'error' });
                    setTimeout(function () { $.noty.closeAll(); }, 3000);
                }

            });
        } 
        function datatable() {
            $.ajax({
                type: "POST",
                url: "otherincomes.aspx/GetData",
                contentType: "application/JSON; charset=utf-8",

                datatype: "JSON",
                success: function (data) {
                    var table = $('#Table1').DataTable();
                    data = JSON.parse(data.d);
                    table.clear();
               
                    for (var i = 0,count = 1; i < data.length; i++,count++) {
                        var fullname = data[i].title +"."+data[i].fname+" "+data[i].mname+" "+data[i].lname;
                        table.row.add([
                             count, data[i].recptnos,fullname,data[i].clsnm,data[i].divsnm ,data[i].paymentdt,data[i].incname, data[i].totalamts,
                             "<button  style='height:35px; width: 35px; padding-left:7px;' type='button' onclick=printdata(\"" + data[i].recptnos + "\") id='btnedit' class='btn btn-success'><i class='fadeIn animated bx bx-printer'></i></button> <button  style='height:35px; width: 35px; padding-left:7px;' type='button' onclick=deletedata(\"" + data[i].recptnos + "\") id='btndelete' class='btn btn-danger'><i class='fadeIn animated bx bx-trash-alt'></i></button>"

                        ]).draw(true);

                    }
                }
            });
        }
        function printdata(recpt) {
           
            $("#printabel3").remove();
            loadpage1(recpt);
        }
        function loadpage1(recept) {
            setTimeout(function () {
                $("<iframe id='printabel3'>")

            .attr("src", "incomeprint.aspx?receipts=" + recept)
                
            .appendTo("body");
                $("#printabel3").hide();
            }, 2000);
          
        }
        function deletedata(reptsid){
            Swal.fire({
                title: "Delete",
                //text: "Enter your Pin",
                html:
               '<input id="swal-input1" type="password" class="swal2-input" placeholder="Enter Your Pin" autofocus>',
                // input: 'password',
                showCancelButton: true,
                //target: document.getElementById('exampleLargeModal5'),
             
            }).then((result) => {
                if ($("#swal-input1").val() != "") {
//Swal.fire('Result:'+result.value); 
  inputValue = $("#swal-input1").val();
                    
            if (inputValue == "2024") {
                $.ajax({
                    url: "otherincomes.aspx/DeleteData",
                    contentType: "application/JSON; charset=utf-8",
                    method: "post",
                    datatype: "JSON",
                    data: "{id:'" + reptsid + "'}",
                    success: function (data) {
                        datatable();
                        $("#Table1").find("tbody").empty(); datatable();
                        noty({ text: 'Delete Successfully', layout: 'topRight', type: 'information' });
                        setTimeout(function () { $.noty.closeAll(); }, 3000);
                    }
                });
            }
            else   {
                //  Swal.fire("Input","Please Enter Valid Pin!");
                Swal.fire({
                    title: 'Please Enter Valid Pin!',
                    text: "do you want to continue!",
                    icon: 'warning',
                    showCancelButton: true,
                    confirmButtonColor: '#3085d6',
                    cancelButtonColor: '#d33',
                    cancelButtonText: 'Continue',
                    confirmButtonText: 'Re-Enter'
                }).then(function (result) {
                    if (result.isConfirmed) {
                        $("#swal-input1").focus();
                    }
                    else if(result.isDismissed && result.dismiss=="cancel") {
                        // rnear = "1";
                        //glass1101(Uhid,pid);
                    }
                
            
                });
            } 
    }
    });
        }
        function clear(){
            $("select[id$=ddlyears]").val("0").change();
            $("select[id$=ddlclass]").val("0").change();
            $("select[id$=ddldivisions]").val("0").change(); 
            $("select[id$=ddlstudents]").val("0").change();
            $("select[id$=ddlpaymode]").val("").change();
            $("#txtutrnos").val("");
            $('select[id$=ddlincome]').val("0").change();
            $("#txtnarrations").val("");
            $("#txtamount").val("");
            $("#subtotal").html("");
            $("#total").html("");
            total1 = 0;
            total2 = 0;
             $("#dstudent").val('');
            orderi = 1;
           // $("#tt12").find("tbody").empty();
        }
    </script> 
     <div class="page-wrapper">
			<div class="page-content">
				<!--breadcrumb-->
				<!--<div class="page-breadcrumb d-none d-sm-flex align-items-center mb-3">
					<div class="breadcrumb-title pe-3">Forms</div>
					<div class="ps-3">
						<nav aria-label="breadcrumb">
							<ol class="breadcrumb mb-0 p-0">
								<li class="breadcrumb-item"><a href="javascript:;"><i class="bx bx-home-alt"></i></a>
								</li>
								<li class="breadcrumb-item active" aria-current="page">Text Editor</li>
							</ol>
						</nav>
					</div>
					<div class="ms-auto">
						<div class="btn-group">
							<button type="button" class="btn btn-primary">Settings</button>
							<button type="button" class="btn btn-primary split-bg-primary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown">	<span class="visually-hidden">Toggle Dropdown</span>
							</button>
							<div class="dropdown-menu dropdown-menu-right dropdown-menu-lg-end">	<a class="dropdown-item" href="javascript:;">Action</a>
								<a class="dropdown-item" href="javascript:;">Another action</a>
								<a class="dropdown-item" href="javascript:;">Something else here</a>
								<div class="dropdown-divider"></div>	<a class="dropdown-item" href="javascript:;">Separated link</a>
							</div>
						</div>
					</div>
				</div>-->
				<!--end breadcrumb-->
				<h6>INCOME  ENTRY</h6>

				<div class="card">
					<div class="card-body">
						<div class="card-title d-flex align-items-center">

						</div>
						<hr />
						<form class="row g-2">
							

						<%--	<h6 style="background-color:#00a65a; color: white;text-align:center;font-size:16px">Other Income Voucher</h6>--%>
							<div class="col-md-2"></div>
							<div style="">

							<div class="row">
                                <div class="col-md-3"></div>
                                <div class="col-md-2" style="display:none">
                                    Receipt No. :&nbsp;<label id="lblrecptnos"></label>
                                </div>
								<div class="col-md-2">
									<label>Years<font color="#000000">*</font> </label>
									<select id="ddlyears" class="form-select">
								
									</select> 
                                    
								</div>
                               
                                <div class="col-md-2">
									<label>Class <font color="#000000">*</font></label>
									<select id="ddlclass" class="form-select">
                                    
                                         
									</select>
								</div>
                                <div class="col-md-2">
									<label>Division <font color="#000000">*</font></label>
									<select id="ddldivisions" class="form-select">
                                    
                                         
									</select>
								</div>
                                <div class="col-md-2">
									<label>Semester <font color="#000000">*</font></label>
									<select id="ddlsemester" class="form-select">
                                    
                                         
									</select>
								</div>
								<div class="col-md-3">
									<label>Student <font color="#000000">*</font></label>
								<%--	<select id="ddlstudents" class="form-select">
                                    
                                         
									</select>--%>
                                      <%-- <asp:DropDownList ID="ddlstudents" class="form-control select" data-live-search="true" runat="server"></asp:DropDownList>--%> 
                                    <input  type="text" id="dstudent" class="form-control" />
								</div> 
                                	 <div class="col-md-2">
									<label>Date<font color="#000000">*</font> </label>
									<input type="date" id="incomedate" class="form-control" />
								</div>
                              
                                	<div class="col-md-2">
									<label class="control-label">Pay Mode<font color="#000000">*</font></label>
									<select id="ddlpaymode" class="form-select">
                                            <option value="">Select Pay Mode</option>
                                    <option value="cash">Cash</option>
                                        <option value="online">Online</option> 
									</select>
								</div>
                                	<div class="col-md-2" style="display:none" id="divutrn">
                                        <label>UTR Nos.<font color="#000000">*</font> </label>
									<input type="text" id="txtutrnos" class="form-control" />
                                        </div>
							</div>
                            <br />
                            <div class="row">
                                
                                <div class="col-md-2" style="display:none">
                                    <p>Cur Bal (Dr. A/C): <label id="lblledgeramt"></label>Rs. </p>
                                </div>
                              
                                <div class="col-md-2" style="display:none">
                                    <p>Cur Bal (Cr. A/C): <label id="lblacctamt"></label>Rs. </p>
                                </div>
                                
                                <hr />
							</div>

							

					
							
							<div class="row">
                                <div class="col-md-2">
									
								</div>
                                
						
                                	<div class="col-md-2">
									<label class="control-label">Income Heads<font color="#000000">*</font></label>
									<%--<input type="number" id="lblamount" class="form-control chkamt" value="" />--%>
                                        	<%--<select id="ddlincome" class="form-select"></select>--%>
                                           <asp:DropDownList ID="ddlincome" class="form-control select" data-live-search="true" runat="server"></asp:DropDownList>
								</div>
                                <div class="col-md-2">
                                <label class="control-label">Narration</label>
                                    <input type="text" id="txtnarrations" class="form-control" value="" />
                                </div>
							<div class="col-md-2">
									<label class="control-label">Amount<font color="#000000">*</font></label>
									<input type="number" id="txtamount" class="form-control chkamt" value="" />
								</div>
                                
								<div class="col-md-1" id="divaddrow" style="padding-top: 16px;">
									<div class="btn btn-primary px-4" onclick="Addrow()">  <i class="fadeIn animated bx bx-plus"></i>
									</div>

								</div>
							</div>
                                <%--<p>Receipt Nos <a target="_blank" style="padding-left: 800px;"
                            rel="noopener noreferrer"> Particular<a target="_blank" style="padding-left: 800px;"
                            rel="noopener noreferrer">Amount(Dr)</a></a></p>
                              <div id="divadd">

                              </div>--%>
                                <div  id="divshow1">
                            <table id="tt12" class="addrow"  width="100%" border="0">
                    <thead>
                        <!--  <H6>Vendor List</H6> -->
                        <tr style="background-color:#f0f0f0; font-size:12px; height:30px;">

                            
                            <th width="20%" style="text-align:center"> Particular</th>
                             <th style="text-align:center">Narration</th>
                            <th style="text-align:center"> Amount(Dr) </th>
                         
                        </tr>
                    </thead>
                    <tbody>

                    </tbody>

                </table>

							<hr />
							<div class="row">
								<div class="col-md-2" style="padding-top: 18px;margin-left: 85%;">
                                    <label id="subtotal"></label>
									<hr />
								</div>
							</div>
							<div class="row">
								<div class="col-md-1" style="padding-top: 18px;margin-left: 85%;">
									<p>Total:<label id="total"></label></p>
								</div>
							</div>
							<div class="row">
								<div class="col-md-2" style="padding-top: 18px;margin-left: 85%;">
									<hr />
								</div>
								<div class="col-md-2" style="padding-top: 18px;margin-left: 85%;">
									<hr />
								</div>
							</div>
							<label class="control-label" style="display:none">Narration</label>
							<textarea class="form-control" style="display:none"  id="txtnarration" aria-label="With textarea"></textarea></div>
							<div class="col-md-12" style="padding-top: 16px;">
								<div class="btn btn-primary px-4">
									<div class="ms-2" id="" onclick="SaveData();"> Save </div></div>
								

							</div>
					</div>
                            <hr />
 
                <table id="Table1" class="addrow1" width="100%" border="0">
                    <thead>
                        <!--  <H6>Vendor List</H6> -->
                        <tr style="background-color:#f0f0f0; font-size:12px; height:30px;">

                            <th width="8%" style="text-align:center;"> Sr.No.</th>
                             <th width="14%" style="text-align:center"> Transactions Nos. </th>
                           <th width="14%" style="text-align:center"> Student Name </th>
                            <th width="14%" style="text-align:center"> Class  </th>
                            <th width="14%" style="text-align:center"> Division </th>
                             <th style="text-align:center">Transaction Date</th>
                            <th style="text-align:center">Income</th>
                            <th style="text-align:center">Total Amount</th>
                            <th style="text-align:center">Action</th>
                        </tr>
                    </thead>
                    <tbody>

                    </tbody>

                </table>
  
						</form>
				</div>
					

				</div>

			</div> 
         
			<div class="col">
				<!-- Button trigger modal -->
				
				<!-- Modal -->
				<div class="modal fade" id="exampleLargeModal" tabindex="-1" aria-hidden="true">
					<div class="modal-dialog modal-dialog-scrollable">
						<div class="modal-content">
							<div class="modal-header">
								<h5 class="modal-title">Add New</h5>
								<button type="button" class="btn-close" data-bs-dismiss="modal"
									aria-label="Close"></button>
							</div>
							<div class="modal-body">
								<div class="card">
									<div class="card-body">
										<label>Select Status<font color="#000000">*</font></label>
										<select class="form-select mb-3" aria-label="Default select example">
											<option selected>Select Status view</option>
											<option value="1">Active</option>
											<option value="1">Inactive</option>

										</select>

										<label class="control-label">Ledger<font color="#000000">*</font></label> <input
											class="form-control mb-3" type="text" placeholder="Name"
											aria-label="default input example">

										<label>Group<font color="#000000">*</font></label>
										<select class="form-select mb-3" aria-label="Default select example">
											<option>Select Group</option>
											<option>BANK A/C</option>
											<option>BANK OD A/C</option>
											<option>CAPITAL</option>
											<option>CASH IN HAND</option>
											<option>CURRENT ASSETS</option>
											<option>CURRENT LIABILITY</option>
											<option>Deposit(Assets)</option>
											<option>Direct Expenses</option>
											<option>Direct Income</option>
											<option>Indirect Expenses</option>
											<option>Indirect Income</option>
											<option>Duties and Taxes</option>
											<option>Loans and Advance(Assets)</option>
											<option>Loan(Liability)</option>
											<option>Provision</option>
											<option>Purchase Account</option>
											<option>Sales Account</option>
											<option>Secured Loan</option>
											<option>Stock In Hand</option>
											<option>Sundery Creditor</option>
											<option>Sundery Debtors</option>
											<option>Suspense A/C</option>
											<option>Unsecured Loan</option>
											<option>Depreciation</option>
											<option>Fixed Assets</option>
											<option>Unknown</option>
											<option>Unknown1</option>
											<option>Unknown2</option>
											<option>Unknown3</option>

										</select>

										<label class="control-label">Alias <font color="#000000">*</font></label> <input
											class="form-control mb-3" type="text" placeholder="Short Name"
											aria-label="default input example">

										<label class="control-label">OpeningBalance <font color="#000000">*</font>
											</label> <input class="form-control mb-3" type="text"
											placeholder="Short Name" aria-label="default input example">

									</div>
								</div>

							</div>
							<div class="modal-footer">
								<button type="button" class="btn btn-primary">Create</button>
								<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>

							</div>
						</div>
					</div>
				</div>
			</div>
            			<div class="col">
				<!-- Button trigger modal -->
				
				<!-- Modal -->
				<div class="modal fade" id="exampleLargeModal1" tabindex="-1" aria-hidden="true">
					<div class="modal-dialog modal-lg">
						<div class="modal-content">
							<div class="modal-header">
								<h5 class="modal-title">Transaction Entry</h5>
								<button type="button" id="mclose" class="btn-close" data-bs-dismiss="modal"
									aria-label="Close"></button>
							</div>
							<div class="modal-body">
								   <table id="Table2" class="addrow1" width="100%" border="1">
                    <thead>
                        <!--  <H6>Vendor List</H6> -->
                        <tr style="background-color:#f0f0f0;border :1px solid #000000; font-size:12px; height:30px;">

                            <th width="20%" style="text-align:center;"> Sr.No.</th>
                                <th width="20%" style="text-align:center"> Receipt Nos.</th>
                          <th width="20%" style="text-align:center"> Account Name/Nos.</th>
                             <th width="20%" style="text-align:center"> Particular </th>
                        
                            
                             <th style="text-align:center">Debit</th>
                               <th style="text-align:center">Credit</th>
                           
                        </tr>
                    </thead>
                    <tbody id="Tbody1">

                    </tbody>

                </table>
                 <div class="col-md-12">
                     <div class="row">
                       <div class="col-md-6"></div>
                       <div class="col-md-2">
                  <label style="float:right;font-weight:bold;display:none"> Grand Total</label> :</div> <div class="col-md-2"> <label style="float:right;font-weight:bold" id="totals"></label></div> <div class="col-md-2"></div></div>
							</div>
                              
							<div class="modal-footer">
					<div id="divshow" style="display:none"><input type="password" id="phpin" class="form-control" placeholder="Enter Pin" value="" /> </div>	 <div class="btn btn-primary px-4"><div class="ms-2" onclick="SavePostData();" id="btnapprove"> Post</div></div>&nbsp;
								<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>

							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
        </asp:Content>      