<?php if(isset($_POST['submit'])){
      $FinempCode1=rand(0,9999);
        if($_FILES['signature']['name']!='')
        {
          $name=$_FILES['signature']['name'];
          $tmp_name=$_FILES['signature']['tmp_name'];
          $name_brk=explode('.',$name);
          $type=$name_brk[1];
          $new_name=$FinempCode1.'.'.$type;
          $path="uploaded_docs/HR/sign_image/".$new_name;
          $file_copy=copy($tmp_name,$path);
      }
      $data['emp_id']              =$_REQUEST['emp_id']; 
      $data['tot_ded']            =$_REQUEST['tot_ded'];
      $data['place']            =$_REQUEST['place'];   
      $data['date']        =FormatDateForSQL($_REQUEST['date']);
      $data['signature']              =$new_name;
      $data['dependece_adress']            =$_REQUEST['address']; 
      $data['fin_year']            =$_REQUEST['fin_year']; 
      $data['rent_total']            =$_REQUEST['rent_total_amount']; 
      $data['property_total']            =$_REQUEST['property_total_amount']; 
      $data['medical_total']            =$_REQUEST['medical_total_amount']; 
      $data['edu_total']            =$_REQUEST['edu_total_amount']; 
      $data['insurance_total']            =$_REQUEST['insurance_total_amount'];  
      $data['created_by']            =$_REQUEST['created_by'];
      $data['created_date']          =date("Y-m-d H:i:s"); 
//echo "<pre>";print_r($data);
//die;
  $s->RecordInsert('hr_declaration_head',$data);
 $headdec_id=DB_Last_Insert_ID($db,'hr_declaration_head','id');
//($db,'crm_ta_da_claim_form_main','id');

    if($headdec_id!=""){
        $noofdepends=count($_REQUEST['relation']);
          for($dep=0;$dep<$noofdepends;$dep++)
          {
              $data_dep['declaration_head_id'] =$headdec_id; 
              $data_dep['name']      =$_REQUEST['name'][$dep];
              $data_dep['relation']      =$_REQUEST['relation'][$dep]; 
              $data_dep['age']      =$_REQUEST['age'][$dep];
              $s->RecordInsert('hr_declaration_dependence', $data_dep);
          }

          $noofrent=count($_REQUEST['rent_month']);
          for($rent=0;$rent<$noofrent;$rent++)
          {
              $data_rent['declaration_head_id'] =$headdec_id; 
              $data_rent['month']      =$_REQUEST['rent_month'][$rent];
              $data_rent['year']      =$_REQUEST['rent_year'][$rent]; 
              $data_rent['amount']      =$_REQUEST['rent_amount'][$rent];
               $data_rent['metro_flag']      =$_REQUEST['rent_metro'][$rent];
              $s->RecordInsert('hr_declaration_rent', $data_rent);
          }
          $noofproperty=count($_REQUEST['property_amount']);
          for($property=0;$property<$noofproperty;$property++)
          {
              $data_property['declaration_head_id'] =$headdec_id; 
              $data_property['declaration_particulars_id']      =$_REQUEST['property_perticuler'][$property];
              $data_property['amount']      =$_REQUEST['property_amount'][$property];
              $s->RecordInsert('hr_declaration_property', $data_property);
          }
          $noofmedical=count($_REQUEST['medical_amount']);
          for($medical=0;$medical<$noofmedical;$medical++)
          {
              $data_medical['declaration_head_id'] =$headdec_id; 
              $data_medical['declaration_particulars_id']      =$_REQUEST['medical_perticuler'][$medical];
              $data_medical['amount']      =$_REQUEST['medical_amount'][$medical];
              $s->RecordInsert('hr_declaration_medical', $data_medical);
          }
          $noofedu=count($_REQUEST['edu_amount']);
          for($edu=0;$edu<$noofedu;$edu++)
          {
              $data_edu['declaration_head_id'] =$headdec_id; 
              $data_edu['declaration_particulars_id']      =$_REQUEST['edu_perticuler'][$edu];
              $data_edu['amount']      =$_REQUEST['edu_amount'][$edu];
             $s->RecordInsert('hr_declaration_edu', $data_edu);
          }
          $noofinsurance=count($_REQUEST['insurance_amount']);
          for($insurance=0;$insurance<$noofinsurance;$insurance++)
          {
              $data_insurance['declaration_head_id'] =$headdec_id; 
              $data_insurance['declaration_particulars_id']      =$_REQUEST['insurance_perticuler'][$insurance];
              $data_insurance['amount']      =$_REQUEST['insurance_amount'][$insurance];
            $s->RecordInsert('hr_declaration_insurance', $data_insurance);
          }
       }  
        $s->pageLocation("index.php?route=HRModule/Master/investment_declaration".$rurl);
       
  }?>

<link rel="stylesheet" href="css/new_mxerp.css">
<div class="body_contain">
<div class="tab_div">
  <div class="acg-top-pad10">
<div id="inshow">
<link rel="stylesheet" href="../css/jquery.ui.all.css">
<link rel="stylesheet" href="../css/jquery.ui.theme.css">

<script src="../js/jquery-1.5.1.js"></script>
<script src="../ui/jquery.ui.datepicker.js"></script>
<script src="../ui/jquery.ui.timepicker.css"></script>
<script src="../ui/jquery.ui.core.js"></script>
<script src="../ui/jquery.ui.timepicker.js"></script>
<script type="text/javascript">
function valid(){
  var fin_year= document.getElementById('fin_year').value;
 if(fin_year==0)
 {
  alert("Please fill Financial Year");
  return false;
 }
}

//var jj=$.noConflict();
// jj(function() {
  
//jj(".datepicker").datepicker({ dateFormat: 'dd/mm/yy' ,changeMonth: true,
  //  changeYear: true,
 //   yearRange: '-80:+20'});
//});
//jj('.timepicker').timepicker();

function sum_rent(rentVal){
  var sum = 0;
  var totRentval=$( "input[id^='rent_']" ).length;
  for(var re=0; re<totRentval;re++){
    var valueRe=document.getElementById("rent_"+re).value;
        if (!isNaN(valueRe) && valueRe != 0) {
                 sum += parseFloat(valueRe);
             }
  }
      $("input[name='rent_total_amount']").val(sum.toFixed(2));
}

function sum_property(propertyVal){
  var sum = 0;
         var totRentval=$( "input[id^='property_']" ).length;
          for(var re=0; re<totRentval;re++){
            var valueRe=document.getElementById("property_"+re).value;
                if (!isNaN(valueRe) && valueRe != 0) {
                         sum += parseFloat(valueRe);
                     }
          }
         $("input[name='property_total_amount']").val(sum.toFixed(2));
}

function sum_medical(medicalVal){
  var sum = 0;
          var totRentval=$( "input[id^='medical_']" ).length;
          for(var re=0; re<totRentval;re++){
            var valueRe=document.getElementById("medical_"+re).value;
                if (!isNaN(valueRe) && valueRe != 0) {
                         sum += parseFloat(valueRe);
                     }
          }
         $("input[name='medical_total_amount']").val(sum.toFixed(2));
}

function sum_edu(eduVal){
  var sum = 0;
         var totRentval=$( "input[id^='edu_']" ).length;
          for(var re=0; re<totRentval;re++){
            var valueRe=document.getElementById("edu_"+re).value;
                if (!isNaN(valueRe) && valueRe != 0) {
                         sum += parseFloat(valueRe);
                     }
          }
         $("input[name='edu_total_amount']").val(sum.toFixed(2));
}
function sum_insurance(insuranceVal){
  var sum = 0;
            var totRentval=$( "input[id^='insurance_']" ).length;
          for(var re=0; re<totRentval;re++){
            var valueRe=document.getElementById("insurance_"+re).value;
                if (!isNaN(valueRe) && valueRe != 0) {
                         sum += parseFloat(valueRe);
                     }
          }
         $("input[name='insurance_total_amount']").val(sum.toFixed(2));
}


</script>
<script src="js/function.js" type="text/javascript"></script>
<script src="js/jquery.carouFredSel-5.5.0-packed.js" type="text/javascript"></script>
<script src="js/functions.js" type="text/javascript"></script>
<script type="text/javascript" src="js/form.min.js"></script> 
<?php 
//session_start();
error_reporting(0);
//include("connection.php");
$emp_id  =  $s->GetFieldValue("www_users","id='".$_SESSION['UserID']."' ","empid");
 $result =  DB_query("select * from empmaster where id = '".$emp_id."' ",$db);
 $data22 = DB_fetch_assoc($result);

 extract($data22);
?>
	<h1>Investment Declaration</h1>
   <form method="post" id="preview_form"  enctype="multipart/form-data">
            <div class="row">
                        <h3>General Details</h3>
                  <table width="100%" border="0" cellspacing="0" cellpadding="3">
                      <tr class="row1">
                        <td width="13%"><strong>Emp. No.</strong></td>
                        <td width="30%"><input type="text" value="<?php echo $emp_code; ?>" readonly/></td>
                        <td width="13%"><strong>Name</strong></td>
                        <td><input type="text"  value="<?php echo $emp_name; ?>" readonly/></td>
                      </tr>
                      <tr class="row1">
                        <td><strong>PAN</strong></td>
                        <td><input type="text"  value="<?php $pan_no; ?>" readonly/></td>
                        <td><strong>Mobile No.</strong></td>
                        <td><input type="text"  value="<?php echo  $s->GetFieldValue("employee_address","emp_id='".$id."' ","per_mobile"); ?>" readonly/></td>
                      </tr>
                      <tr class="row1">
                        <td><strong>Financial Year</strong></td>
                        <td>
                          <select name="fin_year" id="fin_year">
                             <option value="0">Select</option>
                             <?php 
                                $usedfinArray=array();
                                $sql_tdsfin="SELECT fin_year FROM hr_declaration_head WHERE emp_id='".$id."'";
                                $query_tdsfin=DB_query($sql_tdsfin,$db);
                                while($tdsfin_row=DB_fetch_assoc($query_tdsfin)){
                                  $usedfinArray[]=$tdsfin_row['fin_year'];

                                }
                                $sql_finyear="Select id,year(year_start) as year_start,year(year_end) as year_end from company_financial_years";
                                $query_finyear=DB_query($sql_finyear,$db);
                                while($finyear_row=DB_fetch_array($query_finyear))
                                {
                                    if (in_array($finyear_row['id'], $usedfinArray)){
                                       //false
                                    }else{
                             ?>
                             <option value="<?php echo $finyear_row['id']; ?>"><?php echo $finyear_row['year_start'].'-'.$finyear_row['year_end']; ?></option>
                             <?php }} ?>
                          </select>
                        </td>
                      </tr>
                  </table>
            </div>
            <div id="catsel">
               <a href="#" class="nav-btn">Jewellery <strong><i class="fa fa-angle-down" style="float:right; margin-top:5px;"></i></strong></a>
            <ul class="resp-tabs-list hor_1">
                <li><a href="javascript://" id="c1" class="sel" onClick="cat_show('cat_1', 'c1');">Dependents Detail</a></li>
                <li><a href="javascript://" id="c2" onClick="cat_show('cat_2', 'c2');">Rent Details</a></li>
                <li><a href="javascript://" id="c3" onClick="cat_show('cat_3', 'c3');">Property Details</a></li>
                <li><a href="javascript://" id="c4" onClick="cat_show('cat_4', 'c4');">Medical Policy Details</a></li>
                <li><a href="javascript://" id="c5" onClick="cat_show('cat_5', 'c5');">Edu.Investment Details</a></li>
                <li><a href="javascript://" id="c6" onClick="cat_show('cat_6', 'c6');">Insurance Details</a></li>
                <li><a href="javascript://" id="c7" onClick="cat_show('cat_7', 'c7');">Declaration</a></li>
            </ul>
            </div>
           
              
              <input type="hidden" name="emp_id" value="<?php echo $id; ?>">
              <input type="hidden" name="fin_year1" value="<?php echo $_SESSION['YearStart']; ?>-<?php echo $_SESSION['YearEnd1']; ?>">
               <input type="hidden" name="created_by" value="<?php echo $_SESSION['UserID']; ?>">
                <div id="cat_1" class="cat" style="border-top:#808080 2px solid;">  
                        <h3>Details of Dependents</h3>                
                  <table width="100%" border="1" cellspacing="0" cellpadding="3" style="border:#808080 1px solid;">
                      <tr>
                        <th width="40" valign="middle"><strong>S. No.</strong></th>
                        <th valign="middle"><strong>Name</strong></th>
                        <th width="150" valign="middle"><strong>Relation</strong></th>
                        <th width="100" valign="middle"><strong>Age</strong></th>
                        <th width="30%" valign="middle"><strong>Address</strong></th>
                      </tr>
                      <tr>
                        <td colspan="4" valign="top" align="left" style="padding:0;" id="intab">
                        <div id="amc-tab">
                          <table width="100%" border="0" cellspacing="0" cellpadding="3">
                          <?php 
                            for($dp=0;$dp<5;$dp++)
                            {
                          ?>
                            <tr>
                              <td width="40" valign="middle" align="center"><strong><?php echo $dp+1; ?><input type="hidden" name="deserial[]"></strong></td>
                              <td valign="top"><input type="text" name="name[]" /></td>
                              <td width="150" valign="top"><input type="text" name="relation[]" /></td>
                              <td width="100" valign="top"><input type="text" name="age[]" /></td>
                            </tr>
                          <?php } ?>
                          </table>
                        </div>
                        </td>
                        <td valign="top"><textarea style="width:100%; height:146px;" name="address"></textarea></td>
                      </tr> 
                      <tr><td colspan="5" style="text-align:center;"><input type="button" name="next"  class="search" id="c2" onClick="cat_show('cat_2', 'c2');" value="Next"></td></tr>                     
                  </table>
                </div>
                <div id="cat_2" style="display:none; border-top:#808080 2px solid;" class="cat">
                <h3>Rent Details</h3>
                  <table width="100%" border="1" cellspacing="0" cellpadding="3" style="border-top:#808080 1px solid;">
                      <tr>
                        <th width="6%"><strong>S.No.</strong></th>
                        <th width="20%"><strong>Particulars</strong></th>
                        <th width="20%"><strong>Please Fill in</strong></th>
                        <th width="20%"><strong>Amount declared by you in the Declaration form</strong></th>
                        <th><strong>Remarks</strong></th>
                      </tr>
                      <tr>
                        <td rowspan="14" align="center"><strong>1</strong></td>
                        <th><strong>Rent Paid / Payable for:</strong></th>
                        <th><strong>(Metro / Non Metro)</strong></th>
                        <th><strong>Amount Rs.</strong></th>
                        <td rowspan="14" valign="top">
                        <p style="padding:5px; margin:0;">Please enter your Monthly Rent details as per the Rent Receipt / Lease Deed, with necessary details as Tenant Name, Owner name, rented property address, PAN no of owner, payment details, revenue stamp.
<br><br>
<strong>Note:-</strong><br>
If the Employee is paying the rent below Rs.3000/- per month, he/she need not furnish the Rent Receipts (Circular No:8/2007 Dt: 05.Dec.2007).</p></td>
                      </tr>
                      <tr>
                        <td><span style="width:100px;">April</span>
                        <input type="hidden" name="rent_month[]" value="4"/>
                        <!--<select name="rent_year[]" style="width:100px;">
                             <option value="0">Select Financial Year</option>
                             <?php 
                                $usedfinArray=array();
                                $sql_tdsfin="SELECT fin_year FROM hr_declaration_head WHERE emp_id='".$id."'";
                                $query_tdsfin=DB_query($sql_tdsfin,$db);
                                while($tdsfin_row=DB_fetch_assoc($query_tdsfin)){
                                  $usedfinArray[]=$tdsfin_row['fin_year'];
                                }
                                $sql_finyear="Select * from company_financial_years";
                                $query_finyear=DB_query($sql_finyear,$db);
                                while($finyear_row=DB_fetch_assoc($query_finyear))
                                {
                                    if (in_array($finyear_row['id'], $usedfinArray)){
                                       //false
                                    }else{
                                      $finstart=explode("-",$finyear_row['year_start']);
                                      $finend=explode("-",$finyear_row['year_end']);
                             ?>
                             <option value="<?php echo $finyear_row['id']; ?>"><?php echo $finstart[0].'-'.$finend[0]; ?></option>
                             <?php }} ?>
                          </select>-->
                        <input type="hidden" name="rent_year[]" value="<?php echo $_SESSION['YearStart']; ?>"/>
                        </td>
                        <td><select name="rent_metro[]" style="width:100%;">
                          <option selected="" value="">Select</option>
                          <option value="1">Metro</option>
                          <option value="0">NonMetro</option>
                        </select></td>
                        <td><input type="text" name="rent_amount[]" id="rent_0" class="rentsum" onkeyup="sum_rent(this.value)" style="width:100%;" value=""  autocomplete="off"/></td>
                      </tr>
                      <tr>
                        <td>May</td>
                        <input type="hidden" name="rent_month[]" value="5"/>
                        <input type="hidden" name="rent_year[]" value="<?php echo $_SESSION['YearStart']; ?>"/>
                        </td>
                        <td><select name="rent_metro[]" style="width:100%;">
                          <option selected="" value="">Select</option>
                          <option value="1">Metro</option>
                          <option value="0">NonMetro</option>
                        </select></td>
                        <td><input type="text" name="rent_amount[]" id="rent_1" class="rentsum" onkeyup="sum_rent(this.value)" style="width:100%;" value=""  autocomplete="off"/></td>
                      </tr>
                      <tr>
                        <td>June</td>
                        <input type="hidden" name="rent_month[]" value="6"/>
                        <input type="hidden" name="rent_year[]" value="<?php echo $_SESSION['YearStart']; ?>"/>
                        </td>
                        <td><select name="rent_metro[]" style="width:100%;">
                          <option selected="" value="">Select</option>
                          <option value="1">Metro</option>
                          <option value="0">NonMetro</option>
                        </select></td>
                        <td><input type="text" name="rent_amount[]"  autocomplete="off" id="rent_2" class="rentsum" onkeyup="sum_rent(this.value)" style="width:100%;" value=""/></td>
                      </tr>
                      <tr>
                        <td>July</td>
                        <input type="hidden" name="rent_month[]" value="7"/>
                        <input type="hidden" name="rent_year[]" value="<?php echo $_SESSION['YearStart']; ?>"/>
                        </td>
                        <td><select name="rent_metro[]" style="width:100%;">
                          <option selected="" value="">Select</option>
                          <option value="1">Metro</option>
                          <option value="0">NonMetro</option>
                        </select></td>
                        <td><input type="text" name="rent_amount[]" autocomplete="off" id="rent_3" class="rentsum" onkeyup="sum_rent(this.value)" style="width:100%;" value=""/></td>
                      </tr>
                      <tr>
                        <td>August</td>
                        <input type="hidden" name="rent_month[]" value="8"/>
                        <input type="hidden" name="rent_year[]" value="<?php echo $_SESSION['YearStart']; ?>"/>
                        </td>
                        <td><select name="rent_metro[]" style="width:100%;">
                          <option selected="" value="">Select</option>
                          <option value="1">Metro</option>
                          <option value="0">NonMetro</option>
                        </select></td>
                        <td><input type="text" name="rent_amount[]"  autocomplete="off" id="rent_4" class="rentsum" onkeyup="sum_rent(this.value)" style="width:100%;" value=""/></td>
                      </tr>
                      <tr>
                        <td>September</td>
                        <input type="hidden" name="rent_month[]" value="9"/>
                        <input type="hidden" name="rent_year[]" value="<?php echo $_SESSION['YearStart']; ?>"/>
                        </td>
                        <td><select name="rent_metro[]" style="width:100%;">
                          <option selected="" value="">Select</option>
                          <option value="1">Metro</option>
                          <option value="0">NonMetro</option>
                        </select></td>
                        <td><input type="text" name="rent_amount[]"  autocomplete="off" id="rent_5" class="rentsum" onkeyup="sum_rent(this.value)" style="width:100%;" value=""/></td>
                      </tr>
                      <tr>
                        <td>October</td>
                        <input type="hidden" name="rent_month[]" value="10"/>
                        <input type="hidden" name="rent_year[]" value="<?php echo $_SESSION['YearStart']; ?>"/>
                        </td>
                        <td><select name="rent_metro[]" style="width:100%;">
                          <option selected="" value="">Select</option>
                          <option value="1">Metro</option>
                          <option value="0">NonMetro</option>
                        </select></td>
                        <td><input type="text" name="rent_amount[]"  autocomplete="off" id="rent_6" class="rentsum" onkeyup="sum_rent(this.value)" style="width:100%;" value=""/></td>
                      </tr>
                      <tr>
                        <td>November</td>
                        <input type="hidden" name="rent_month[]" value="11"/>
                        <input type="hidden" name="rent_year[]" value="<?php echo $_SESSION['YearStart']; ?>"/>
                        </td>
                        <td><select name="rent_metro[]" style="width:100%;">
                          <option selected="" value="">Select</option>
                          <option value="1">Metro</option>
                          <option value="0">NonMetro</option>
                        </select></td>
                        <td><input type="text" name="rent_amount[]"  autocomplete="off" id="rent_7" class="rentsum" onkeyup="sum_rent(this.value)" style="width:100%;" value=""/></td>
                      </tr>
                      <tr>
                        <td>December</td>
                        <input type="hidden" name="rent_month[]" value="12"/>
                        <input type="hidden" name="rent_year[]" value="<?php echo $_SESSION['YearStart']; ?>"/>
                        </td>
                        <td><select name="rent_metro[]" style="width:100%;">
                          <option selected="" value="">Select</option>
                          <option value="1">Metro</option>
                          <option value="0">NonMetro</option>
                        </select></td>
                        <td><input type="text" name="rent_amount[]"  autocomplete="off" id="rent_8" class="rentsum" onkeyup="sum_rent(this.value)" style="width:100%;" value=""/></td>
                      </tr>
                      <tr>
                        <td>January</td>
                        <input type="hidden" name="rent_month[]" value="1"/>
                        <input type="hidden" name="rent_year[]" value="<?php echo $_SESSION['YearEnd1']; ?>"/>
                        </td>
                        <td><select name="rent_metro[]" style="width:100%;">
                          <option selected="" value="">Select</option>
                          <option value="1">Metro</option>
                          <option value="0">NonMetro</option>
                        </select></td>
                        <td><input type="text" name="rent_amount[]"  autocomplete="off" id="rent_9" class="rentsum" onkeyup="sum_rent(this.value)" style="width:100%;" value=""/></td>
                      </tr>
                      <tr>
                        <td>February</td>
                        <input type="hidden" name="rent_month[]" value="2"/>
                        <input type="hidden" name="rent_year[]" value="<?php echo $_SESSION['YearEnd1']; ?>"/>
                        </td>
                        <td><select name="rent_metro[]" style="width:100%;">
                          <option selected="" value="">Select</option>
                          <option value="1">Metro</option>
                          <option value="0">NonMetro</option>
                        </select></td>
                        <td><input type="text" name="rent_amount[]"  autocomplete="off" id="rent_10" class="rentsum" onkeyup="sum_rent(this.value)" style="width:100%;" value=""/></td>
                      </tr>
                      <tr>
                        <td>March</td>
                        <input type="hidden" name="rent_month[]" value="3"/>
                        <input type="hidden" name="rent_year[]" value="<?php echo $_SESSION['YearEnd1']; ?>"/>
                        </td>
                        <td><select name="rent_metro[]" style="width:100%;">
                          <option selected="" value="">Select</option>
                          <option value="1">Metro</option>
                          <option value="0">NonMetro</option>
                        </select></td>
                        <td><input type="text" name="rent_amount[]"  autocomplete="off" id="rent_11" class="rentsum" onkeyup="sum_rent(this.value)" style="width:100%;" value=""/></td>
                      </tr>
                      <tr>
                        <td><strong>Total</strong></td>
                        <td></td>
                        <td><input type="text" name="rent_total_amount" style="width:100%;" value="" readonly/></td>
                      </tr>
                      <tr><td colspan="5" style="text-align:center;"><input type="button" name="back"  class="search" id="c1" onClick="cat_show('cat_1', 'c1');" value="Back"> <input type="button" name="next" class="search"  id="c3" onClick="cat_show('cat_3', 'c3');" value="Next"></td></tr>

                  </table>
                </div>
                <div id="cat_3" style="display:none; border-top:#808080 2px solid;" class="cat">
                <h3>Property Details</h3>
	                  <table width="100%" border="1" cellspacing="0" cellpadding="3" style="border-top:#808080 1px solid;">
                      <tr>
                        <th width="6%" style="text-align:center;"><strong>S. No.</strong></th>
                        <th width="26%" style="text-align:center;"><strong>Particulars</strong></th>
                        <th width="20%" style="text-align:center;"><strong>Maximum Limits (Rs.)</strong></th>
                        <th width="23%" style="text-align:center;"><strong>Amount Rs.</strong></th>
                        <th style="text-align:center;"><strong>Remarks</strong></th>
                      </tr>
                      <tr>
                        <td rowspan="3" align="center"><strong>2</strong></td>
                        <input type="hidden" name="property_perticuler[]" value="1"/>
                        <td align="center"><p style="padding:0 5px; margin:0;">Interest on Housing Loan u/s 24 <br>
(If the house is self occupied and the loan was taken before April 1999).<br>
Bankers Certificate to be submitted</p></td>
                        <td align="center"><p style="padding:0 5px; margin:0;">Upto Rs. 30000/-<br>
(If Self Occupied)</p></td>
                        <td><input type="text" style="width:100%;" name="property_amount[]"  autocomplete="off" id="property_0" onkeyup="sum_property(this.value)"  value=""/></td>
                        <td valign="top"><p style="padding:0 5px; margin:0;">Please fill attached House Property Declaration form and it is COMPULSORY for claiming the deduction.</p></td>
                      </tr>
                      <tr>
                        <td align="center">
                          <input type="hidden" name="property_perticuler[]" value="2"/>
                        <p style="padding:0 5px; margin:0;">Interest on Housing Loan u/s 24<br>
(If the house is self occupied and the loan was taken on or after April 1999).<br>
Bankers Certificate to be submitted</p></td>
                        <td align="center"><p style="padding:0 5px; margin:0;">Max Limit - Rs. 2,00,000/- <br>
(If Self Occupied)</p></td>
                        <td><input type="text" style="width:100%;" name="property_amount[]"  autocomplete="off" id="property_1" onkeyup="sum_property(this.value)" value=""/></td>
                        <td valign="top"><p style="padding:0 5px; margin:0;">Please fill attached House Property Declaration form and it is COMPULSORY for claiming the deduction.</p></td>
                      </tr>
                      <tr>
                        <td align="center">
                          <input type="hidden" name="property_perticuler[]" value="3"/>
                        <p style="padding:0 5px; margin:0;">Interest on Housing Loan u/s 24<br>
(Let out/ Deemed to be let out)<br>
Bankers Certificate to be submitted<br>
[if the property is LET OUT/DEEMED LET OUT - Actual Rental Income OR Gross Annual Value MUST be specified]</p></td>
                        <td align="center"><p style="padding:0 5px; margin:0;">- No Limit -<br>
(If Let Out)</p></td>
                        <td><input type="text" style="width:100%;" name="property_amount[]"  autocomplete="off" id="property_2" onkeyup="sum_property(this.value)" value=""/></td>
                        <td valign="top"><p style="padding:0 5px; margin:0;">Please fill attached House Property Declaration form and it is COMPULSORY for claiming the deduction.</p></td>
                      </tr>
                      <tr>
                        <td><strong>Total</strong></td>
                        <td></td>
                        <td></td>
                        <td><input type="text" name="property_total_amount" style="width:100%;" value="" readonly/></td>
                        <td></td>
                      </tr>
                       <tr><td colspan="5" style="text-align:center;"><input type="button" name="back"  class="search" id="c2" onClick="cat_show('cat_2', 'c2');" value="Back"> <input type="button" name="next" class="search"  id="c4" onClick="cat_show('cat_4', 'c4');" value="Next"></td></tr>
                  </table>
                  </div>
                <div id="cat_4" style="display:none; border-top:#808080 2px solid;" class="cat">
                <h3>Medical Policy Details</h3>
                  	<table width="100%" border="1" cellspacing="0" cellpadding="3" style="border:#808080 1px solid;">
                      <tr>
                        <th width="6%" style="text-align:center;"><strong>S. No.</strong></th>
                        <th width="26%" style="text-align:center;"><strong>Particulars</strong></th>
                        <th width="20%" style="text-align:center;"><strong>Maximum Limits (Rs.)</strong></th>
                        <th width="23%" style="text-align:center;"><strong>Amount Rs.</strong></th>
                        <th style="text-align:center;"><strong>Remarks</strong></th>
                      </tr>
                      <tr>
                        <td align="center"><strong>3</strong></td>
                        <input type="hidden" name="medical_perticuler[]" value="4"/>
                        <td align="center"><p style="padding:0 5px; margin:0;">Sec. 80CCD (1B)<br>
National Pension Scheme</p></td>
                        <td align="center"><p style="padding:0 5px; margin:0;">Rs. 50000/-<br>
(Proposed in Budget - 2015)</p></td>
                        <td><input type="text" style="width:100%;" name="medical_amount[]"  autocomplete="off" id="medical_0" onkeyup="sum_medical(this.value)" value=""/></td>
                        <td valign="top"><p style="padding:0 5px; margin:0;">Amount contributed to National Pension Scheme by employee.</p></td>
                      </tr>
                      <tr>
                        <td rowspan="2" align="center"><strong>4</strong></td>
                        <input type="hidden" name="medical_perticuler[]" value="5"/>
                        <td rowspan="2" align="center"><p style="padding:0 5px; margin:0;">Sec 80D (Medi Claim Policy &amp; Preventive health check up)
(Overall limit proposed in Budget 2015 - Rs.30000/-)</p></td>
                        <td align="center"><p style="padding:0 5px; margin:0;">Rs. 15,000/- (or) Rs.20,000/- <br>
(Proposed limit in Budget 2015 - Rs. 25000/- (or) Rs.30000/-)</p></td>
                        <td><input type="text" style="width:100%;" name="medical_amount[]"  autocomplete="off" id="medical_1" onkeyup="sum_medical(this.value)" value=""/></td>
                        <td valign="top"><p style="padding:0 5px; margin:0;">Medical Insurance Premium PAID by Employee: <br>
- on the health of employee, spouse, and dependent children (Payment must be made by cheque only).
 [Rs.20,000/- In case employee is a Senior Citizen] (i.e., 60 years or more).<br>
Payment made by an employee  for preventive health check-up of self, spouse, dependent children during the financial year is eligible for maximum deduction of Rs 5000.<br>
<strong>Note:</strong><br>
The amount  paid is within the overall limits ( Rs. 15000/Rs. 20000).PAYMENT HAS TO BE MADE BY CHEQUE AND NOT BY CASH</p></td>
                      </tr>
                      <tr>
                        <input type="hidden" name="medical_perticuler[]" value="6"/>
                        <td align="center"><p style="padding:0 5px; margin:0;">Rs. 15,000/- (or) Rs.20,000/- <br>
(Proposed limit in Budget 2015 - Rs. 25000/- (or) Rs.30000/-)</p></td>
                        <td><input type="text" style="width:100%;" name="medical_amount[]"  autocomplete="off" id="medical_2" onkeyup="sum_medical(this.value)" value=""/></td>
                        <td valign="top"><p style="padding:0 5px; margin:0;">Medical Insurance Premium PAID by Employee:<br>
-  on the health of parents (even not dependent on employee) (Payment must be made by Cheque only).
[Rs.20,000/- In the case  parents are  Senior Citizen]i.e., 60 years or more
payment made by an employee  for preventive health check-up of  parents during the financial year is eligible for maximum deduction of Rs 5000.PAYMENT HAS TO BE MADE BY CHEQUE AND NOT BY CASH<br>
<strong>Note:</strong><br>
The amount  paid is within the overall limits ( Rs. 15000/Rs. 20000).</p></td>
                      </tr>
                      <tr>
                        <td align="center"><strong>5</strong></td>
                        <input type="hidden" name="medical_perticuler[]" value="7"/>
                        <td align="center"><p style="padding:0 5px; margin:0;">Sec 80DD (Maintenance including Medical treatment of dependant person with disability)</p></td>
                        <td align="center"><p style="padding:0 5px; margin:0;">Rs. 50,000/- (Rs.1,00,000/- for Severe disability)<br>
(Propsed limit in budget 2015 - Rs. 75,000/- and Rs. 1,25,000 for severe disability)</p></td>
                        <td><input type="text" style="width:100%;" name="medical_amount[]"  autocomplete="off" id="medical_3" onkeyup="sum_medical(this.value)" value=""/></td>
                        <td valign="top"><p style="padding:0 5px; margin:0;">Here Employee gets  fixed amount of deduction.<br>
 If employee has incurred any  expenditure / deposited in specified policy. <br>
(Form 10-IA obtained from Medical Authority has to be submitted)</p></td>
                      </tr>
                      <tr>
                        <td><strong>Total</strong></td>
                        <td></td>
                        <td></td>
                        <td><input type="text" name="medical_total_amount" style="width:100%;" value="" readonly/></td>
                        <td></td>
                      </tr>
                       <tr><td colspan="5" style="text-align:center;"><input type="button" name="back"  class="search" id="c3" onClick="cat_show('cat_3', 'c3');" value="Back"> <input type="button" name="next" class="search"  id="c5" onClick="cat_show('cat_5', 'c5');" value="Next"></td></tr>
                  </table>
                </div>
                <div id="cat_5" style="display:none; border-top:#808080 2px solid;" class="cat">
                <h3>Education Investment Details</h3>
                  <table width="100%" border="1" cellspacing="0" cellpadding="3" style="border:#808080 1px solid;">
                      <tr>
                        <th width="6%" style="text-align:center;"><strong>S. No.</strong></th>
                        <th width="26%" style="text-align:center;"><strong>Particulars</strong></th>
                        <th width="20%" style="text-align:center;"><strong>Maximum Limits (Rs.)</strong></th>
                        <th width="23%" style="text-align:center;"><strong>Amount Rs.</strong></th>
                        <th style="text-align:center;"><strong>Remarks</strong></th>
                      </tr>
                      <tr>
                        <td align="center"><strong>6</strong></td>
                        <input type="hidden" name="edu_perticuler[]" value="8"/>
                        <td align="center"><p style="padding:0 5px; margin:0;">Sec 80E (Education Loan)<br>
Please mention Initial Year<br>(Year in which Interest payment started)</p></td>
                        <td align="center"><p style="padding:0 5px; margin:0;">No limit<br>
(only Interest Portion)</p></td>
                        <td><input type="text" style="width:100%;" name="edu_amount[]"  autocomplete="off" id="edu_0" onkeyup="sum_edu(this.value)" value=""/></td>
                        <td valign="top"><p style="padding:0 5px; margin:0;">Interest on Loan taken for Higher Education:<br>
Amount paid by employee during the financial year on loan taken for higher education of 
- Employee, spouse or children of employee or students for whom employee is a legal guardian.<br>
<strong>Benefit Period:</strong><br>
Upto 8 years from initial year</p></td>
                      </tr>
                      <tr>
                        <td align="center"><strong>7</strong></td>
                        <input type="hidden" name="edu_perticuler[]" value="9 "/>
                        <td align="center"><p style="padding:0 5px; margin:0;">Donations</p></td>
                        <td align="center"><p style="padding:0 5px; margin:0;">Under Section 80G</p></td>
                        <td><input type="text" style="width:100%;" name="edu_amount[]"  autocomplete="off" id="edu_1" onkeyup="sum_edu(this.value)" value=""/></td>
                        <td valign="top"><p style="padding:0 5px; margin:0;">Receipt should have Name, Pan No of donee and section under which the benefit is available.</p></td>
                      </tr>
                      <tr>
                        <td align="center"><strong>8</strong></td>
                        <input type="hidden" name="edu_perticuler[]" value="10"/>
                        <td align="center"><p style="padding:0 5px; margin:0;">Sec 80U (For person with a disability)</p></td>
                        <td align="center"><p style="padding:0 5px; margin:0;">Rs. 50,000/- (Rs.1,00,000/- for Severe disability)<br>
(Propsed limit in budget 2015 - Rs. 75,000/- and Rs. 1,25,000 for severe disability)</p></td>
                        <td><input type="text" style="width:100%;" name="edu_amount[]"  autocomplete="off" id="edu_2" onkeyup="sum_edu(this.value)" value=""/></td>
                        <td valign="top"><p style="padding:0 5px; margin:0;">Here Employee gets fixed amount of deduction.<br>
(Form 10-IA obtained from Medical Authority has to be submitted)</p></td>
                      </tr>
                      <tr>
                        <td><strong>Total</strong></td>
                        <td></td>
                        <td></td>
                        <td><input type="text" name="edu_total_amount" style="width:100%;" value="" readonly/></td>
                        <td></td>
                      </tr>
                      <tr><td colspan="5" style="text-align:center;"><input type="button" name="back"  class="search" id="c4" onClick="cat_show('cat_4', 'c4');" value="Back"> <input type="button" name="next" class="search"  id="c6" onClick="cat_show('cat_6', 'c6');" value="Next"></td></tr>
                  </table>
                </div>
                <div id="cat_6" style="display:none; border-top:#808080 2px solid;" class="cat">
                <h3>Insurance Details</h3>
                	<table width="100%" border="1" cellspacing="0" cellpadding="3" style="border:#808080 1px solid;">
                      <tr>
                        <th width="6%" style="text-align:center;"><strong>S. No.</strong></th>
                        <th width="26%" style="text-align:center;"><strong>Particulars</strong></th>
                        <th width="20%" style="text-align:center;"><strong>Maximum Limits (Rs.)</strong></th>
                        <th width="23%" style="text-align:center;"><strong>Amount Rs.</strong></th>
                        <th style="text-align:center;"><strong>Remarks</strong></th>
                      </tr>
                      <tr>
                        <td align="center"><strong>9</strong></td>
                        <input type="hidden" name="insurance_perticuler[]"  autocomplete="off" value="11"/>
                        <td align="left"><p style="padding:0 5px; margin:0;">Life Insurance Premium</p></td>
                        <td rowspan="13" align="center"><p style="padding:5px; margin:0;">Maximum amount eligible for Deduction under section 80C &amp; 80CCC Categories is Rs.1,50,000/-</p></td>
                        <td><input type="text" style="width:100%;" name="insurance_amount[]" id="insurance_0" onkeyup="sum_insurance(this.value)" value=""/></td>
                        <td><p style="padding:0 5px; margin:0;">Self , Spouse &amp; Children only</p></td>
                      </tr>
                      <tr>
                        <td align="center"><strong>10</strong></td>
                        <input type="hidden" name="insurance_perticuler[]"  autocomplete="off" value="12"/>
                        <td align="left"><p style="padding:0 5px; margin:0;">Public Provident Fund (PPF)</p></td>
                        <td><input type="text" style="width:100%;" name="insurance_amount[]" id="insurance_1" onkeyup="sum_insurance(this.value)" value=""/></td>
                        <td><p style="padding:0 5px; margin:0;">Self , Spouse &amp; Children only, Submit PPF challan or PPF passbook front page with entries</p></td>
                      </tr>
                      <tr>
                        <td align="center"><strong>11</strong></td>
                        <input type="hidden" name="insurance_perticuler[]"  autocomplete="off" value="13"/>
                        <td align="left"><p style="padding:0 5px; margin:0;">Provident Fund (PF)</p></td>
                        <td><input type="text" style="width:100%;" name="insurance_amount[]" id="insurance_2" onkeyup="sum_insurance(this.value)" value=""/></td>
                        <td><p style="padding:0 5px; margin:0;">Deducted from salary</p></td>
                      </tr>
                      <tr>
                        <td align="center"><strong>12</strong></td>
                        <input type="hidden" name="insurance_perticuler[]"  autocomplete="off" value="14"/>
                        <td align="left"><p style="padding:0 5px; margin:0;">Pension Fund Contribution</p></td>
                        <td><input type="text" style="width:100%;" name="insurance_amount[]" id="insurance_3" onkeyup="sum_insurance(this.value)" value=""/></td>
                        <td><p style="padding:0 5px; margin:0;">Self only</p></td>
                      </tr>
                      <tr>
                        <td align="center"><strong>13</strong></td>
                        <input type="hidden" name="insurance_perticuler[]"  autocomplete="off" value="15"/>
                        <td align="left"><p style="padding:0 5px; margin:0;">National Savings Certificate (NSC)</p></td>
                        <td><input type="text" style="width:100%;" name="insurance_amount[]" id="insurance_4" onkeyup="sum_insurance(this.value)" value=""/></td>
                        <td><p style="padding:0 5px; margin:0;">Self only</p></td>
                      </tr>
                      <tr>
                        <td align="center"><strong>14</strong></td>
                        <input type="hidden" name="insurance_perticuler[]"  autocomplete="off" value="16"/>
                        <td align="left"><p style="padding:0 5px; margin:0;">Interest Accrued on NSC (Reinvested)</p></td>
                        <td><input type="text" style="width:100%;" name="insurance_amount[]" id="insurance_5" onkeyup="sum_insurance(this.value)" value=""/></td>
                        <td><p style="padding:0 5px; margin:0;">Self only</p></td>
                      </tr>
                      <tr>
                        <td align="center"><strong>15</strong></td>
                        <input type="hidden" name="insurance_perticuler[]"  autocomplete="off" value="17"/>
                        <td align="left"><p style="padding:0 5px; margin:0;">Unit Linked Insurance Policy (ULIP)</p></td>
                        <td><input type="text" style="width:100%;" name="insurance_amount[]" id="insurance_6" onkeyup="sum_insurance(this.value)" value=""/></td>
                        <td><p style="padding:0 5px; margin:0;">Self , Spouse &amp; Children only</p></td>
                      </tr>
                      <tr>
                        <td align="center"><strong>16</strong></td>
                        <input type="hidden" name="insurance_perticuler[]"  autocomplete="off" value="18"/>
                        <td align="left"><p style="padding:0 5px; margin:0;">ELSS or a Specified Tax Saver Plan<br>(Lock in period of 3 years)</p></td>
                        <td><input type="text" name="insurance_amount[]" id="insurance_7" onkeyup="sum_insurance(this.value)" style="width:100%;" value=""/></td>
                        <td><p style="padding:0 5px; margin:0;">Self only</p></td>
                      </tr>
                      <tr>
                        <td align="center"><strong>17</strong></td>
                        <input type="hidden" name="insurance_perticuler[]"  autocomplete="off" value="19"/>
                        <td align="left"><p style="padding:0 5px; margin:0;">Payment of Tuition fees for Children<br>(Max 2 Children) for Full Time Education only.</p></td>
                        <td><input type="text" name="insurance_amount[]" id="insurance_8" onkeyup="sum_insurance(this.value)" style="width:100%;" value=""/></td>
                        <td><p style="padding:0 5px; margin:0;">Two children only</p></td>
                      </tr>
                      <tr>
                        <td align="center"><strong>18</strong></td>
                        <input type="hidden" name="insurance_perticuler[]"  autocomplete="off" value="20"/>
                        <td align="left"><p style="padding:0 5px; margin:0;">Principal repayment of Housing Loan</p></td>
                        <td><input type="text" name="insurance_amount[]" id="insurance_9" onkeyup="sum_insurance(this.value)" style="width:100%;" value=""/></td>
                        <td><p style="padding:0 5px; margin:0;">Self &amp; Joint a/c holder</p></td>
                      </tr>
                      <tr>
                        <td align="center"><strong>19</strong></td>
                        <input type="hidden" name="insurance_perticuler[]"  autocomplete="off" value="21"/>
                        <td align="left"><p style="padding:0 5px; margin:0;">Registration charges incurred for Buying House (I year Only)</p></td>
                        <td><input type="text" name="insurance_amount[]" id="insurance_10" onkeyup="sum_insurance(this.value)" style="width:100%;" value=""/></td>
                        <td><p style="padding:0 5px; margin:0;">Self only</p></td>
                      </tr>
                      <tr>
                        <td align="center"><strong>20</strong></td>
                        <input type="hidden" name="insurance_perticuler[]"  autocomplete="off"  autocomplete="off" value="22"/>
                        <td align="left"><p style="padding:0 5px; margin:0;">Scheduled Bank Fixed Deposit for 5 Years &amp; above</p></td>
                        <td><input type="text" name="insurance_amount[]"  autocomplete="off" id="insurance_11" onkeyup="sum_insurance(this.value)" style="width:100%;" value=""/></td>
                        <td rowspan="2"><p style="padding:0 5px; margin:0;">Self only, Stipulated Bank Stamp Required Marked as "for Income Tax purpose only"</p></td>
                      </tr>
                      <tr>
                        <td align="center"><strong>21</strong></td>
                        <input type="hidden" name="insurance_perticuler[]" value="23"/>
                        <td align="left"><p style="padding:0 5px; margin:0;">Term Deposit for  5years &amp; above</p></td>
                        <td><input type="text"  name="insurance_amount[]" insurance_perticuler id="insurance_12" onkeyup="sum_insurance(this.value)" style="width:100%;" value=""/></td>
                      </tr>
                      <tr>
                        <td align="center"></td>
                        <td align="left"><strong>TOTAL</strong></td>
                        <td align="center"></td>
                        <td><input type="text" style="width:100%;" name="insurance_total_amount" value=""/></td>
                        <td valign="top"><p style="padding:0 5px; margin:0;">(@) Enter the total amount in below declaration.</p></td>
                      </tr>
                      <tr><td colspan="5" style="text-align:center;"><input type="button" name="back"  class="search" id="c5" onClick="cat_show('cat_5', 'c5');" value="Back"> <input type="button" name="next" class="search"  id="c7" onClick="cat_show('cat_7', 'c7');" value="Next"></td></tr>
                  </table>
                </div>
                <div id="cat_7" style="display:none; border-top:#808080 2px solid;" class="cat">
                <h3>Declaration</h3>
                  <table width="100%" border="1" cellspacing="0" cellpadding="3" style="border:#808080 1px solid;">
                      <tr>
                        <td align="left" colspan="4" style="border:0;"><p>It is hereby declared and confirmed that in view of above I am entitled to deduction of Rs.<input type="text" value="" style="float:none; border-bottom:#000000 1px solid; border-top:0; border-left:0; border-right:0; width:10%; height:16px; background:#fff;" name="tot_ded" /> (@)  from my income chargeable under the head salary and accordingly it be considered while deducting the tax at source. It is hereby further declared and confirmed that in the event of any shortfall in my depositing or furnishing any of the above stated financial information  and in consequence thereof if any shortfall in deduction of tax at source is arising by M/s Corona Remedies Pvt.Ltd and if M/s Corona Remedies Pvt.Ltd has to suffer any loss of whatsoever nature under provisions of the Income tax Act, 1961 I shall indemnify the said loss to M/s Corona Remedies Pvt.Ltd immediately on I being called upon by M/s Corona Remedies Pvt. Ltd.</p></td>
                      </tr>
                      <tr>
                        <td width="10%" align="center" style="border:0;"><strong>Place</strong></td>
                        <td width="30%" align="left" style="border:0;"><input type="text" style="width:100%;" name="place" value=""/></td>
                        <td width="32%" style="border:0;"></td>
                        <td align="right" style="border:0;">
                        <div id="cat-img">
                          <div class="cat-img"> </div>
                        </div><input type="file" name="signature" width="60%" style="float:right; margin-top:5px;" /></td>
                      </tr>
                      <tr>
                        <td align="center" width="10%" style="border:0;"><strong>Date</strong></td>
                        <td align="left" width="30%" style="border:0;"><input type="text" style="width:100%;" class="datepicker" name="date" value=""/></td>
                        <td style="border:0;"></td>
                        <td align="center" style="border:0; text-align:center;"><strong>Signature</strong></td>
                      </tr>
                      <tr>
                        <td align="left" colspan="4" style="border:0;"><strong>Guidelines to FILL</strong><br>
                        <ol>
                          <li><strong>Metro City -</strong> Mumbai / Delhi / Calcutta / Chennai</li>
                          <li><strong>Non Metro City -</strong> All Other Cities</li>
                          <li>Please fill in and submit the same along with the Supporting documents</li>
                          <li>Provisional Loan Certificate for House from Banker - must be submitted in respect All the properties declared by employee in the above table</li>
                          <li>Any change in the format or deduction matter will be circulated seperately, if required.</li>
                        </ol></td>
                      </tr>
                      <tr>
                        <td style="text-align:center" colspan="4" height="60" valign="middle">
                          <input type="button" name="back"  class="search" id="c6" onClick="cat_show('cat_6', 'c6');" value="Back">
                          <!-- onclick="hpd();" -->
                          <input type="submit" name="submit" onclick="return valid()" value="Submit"  class="search" /></td>
                      </tr>
                  </table>

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

</div>
</div>

