<div class="acg-top-pad10">
<div id="inshow">
<script src="eportal/js/function.js" type="text/javascript"></script>
<script src="eportal/js/jquery.carouFredSel-5.5.0-packed.js" type="text/javascript"></script>
<script src="eportal/js/functions.js" type="text/javascript"></script>
<?php 
//session_name('CAKEPHP'); session_start();
//error_reporting(0);
include("eportal/leftsidebar.php");
$modid=$_REQUEST['modid'];
$frmid=$_REQUEST['frmid'];

$rurl="&modid=".$modid."&frmid=".$frmid."";
$target="index.php?route=eportal/premium-calculation".$rurl;

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="eportal/sign_image/".$new_name;
          $file_copy=copy($tmp_name,$path);
      }
      $data_main['emp_id']              =$_REQUEST['emp_id']; 
      $data_main['date_possession']            =FormatDateForSQL($_REQUEST['date_possession']);
      $data_main['assessee_name']            =$_REQUEST['assessee_name'];   
      $data_main['date_declaration']        =date("Y-m-d");
      $data_main['place']            =$_REQUEST['place'];  
      $data_main['signature']              =$new_name;
      $data_main['fin_year']            =$_REQUEST['fin_year']; 
      $data_main['created_by']            =$_REQUEST['created_by'];
      $data_main['created_date']          =date("Y-m-d H:i:s"); 
//echo "<pre>";print_r($data);
  $s->RecordInsert('hr_property_declaration', $data_main);
    $headdec_id=DB_Last_Insert_ID($db,'hr_property_declaration',$ErrMsg);
      if($headdec_id!=""){
          $noofdepends=count($_REQUEST['address']);
            for($dep=0;$dep<$noofdepends;$dep++)
            {
                $data_dep['property_declaration_id'] =$headdec_id; 
                $data_dep['address']      =$_REQUEST['address'][$dep];
                $data_dep['owners_and_ratio']      =$_REQUEST['owners_and_ratio'][$dep]; 
                $data_dep['category']      =$_REQUEST['category'][$dep];
                $data_dep['gross_rent']      =$_REQUEST['gross_rent'][$dep];
                $data_dep['municipal_tax']      =$_REQUEST['municipal_tax'][$dep]; 
                $data_dep['loan_amt']      =$_REQUEST['loan_amt'][$dep];
                $data_dep['loan_provider']      =$_REQUEST['loan_provider'][$dep]; 
                $data_dep['interest_paid']      =$_REQUEST['interest_paid'][$dep]; 
                $data_dep['principal_paid']      =$_REQUEST['principal_paid'][$dep];
                $s->RecordInsert('hr_property_dclrtn_details', $data_dep);
            }
  }
  $s->pageLocation( $target); 
}
$emp_id  =  $s->getFieldValue("www_users","id='".$_SESSION['UserID']."' ","empid");
?>
<form method="post" id="housepr_form"  enctype="multipart/form-data">
<input type="hidden" name="fin_year" value="<?php echo $_SESSION['fin_year']; ?>"/>
<input type="hidden" name="emp_id" value="<?php echo $emp_id; ?>"/>
<input type="hidden" name="created_by" value="<?php echo $_SESSION['UserID']; ?>">
	<h2>House Property Declaration</h2>
            <div class="row">
                  <table width="98%" border="0" cellspacing="0" cellpadding="3">
                      <tr>
                        <td width="80%" style="border-top:#c1c1c1 1px solid;"><strong>a) Date of actual possession of property claimed as self-occupied</strong><br>
                            [Mandatory to furnish 'Possession Certificate' issued by builder/municipal authorities etc., if possession is taken after March'15]</td>
                        <td style="border-top:#c1c1c1 1px solid;"><input type="text" style="width:100%;" name="date_possession" placeholder="Date" /></td>
                      </tr>
                  </table>
            </div>
           <div class="cat">                 
                  <table width="98%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <th colspan="10" align="center"><strong>b) Information towards the House Properties held by employee</strong></th>
                      </tr>
                      <tr>
                        <th width="10%" valign="middle" style="text-align:center;"><strong>House Property</strong></th>
                        <th width="10%" valign="middle" style="text-align:center;"><strong>Address</strong></th>
                        <th width="10%" valign="middle" style="text-align:center;"><strong>Owners Name and Ratio of Ownership</strong></th>
                        <th width="10%" valign="middle" style="text-align:center;"><strong>Category (Self occupied/let out/deemed let out)</strong></th>
                        <th width="10%" valign="middle" style="text-align:center;"><strong>Gross Annual Rent/Value*</strong></th>
                        <th width="10%" valign="middle" style="text-align:center;"><strong>Muncipal Taxes paid by employee</strong></th>
                        <th width="10%" valign="middle" style="text-align:center;"><strong>Amount of Loan taken</strong></th>
                        <th width="10%" valign="middle" style="text-align:center;"><strong>Name and Address of lender (Loan Provider)</strong></th>
                        <th width="10%" valign="middle" style="text-align:center;"><strong>Interest portion paid in the Financial Year</strong></th>
                        <th valign="middle" style="text-align:center;"><strong>Principal portion paid in the Financial Year</strong></th>
                      </tr>
                    <?php 
                          for($hp=0;$hp<3;$hp++){
                    ?>
                      <tr>
                        <td valign="middle" align="center"><strong><?php echo $hp+1; ?></strong></td>
                        <td valign="top"><input type="text" name="address[]" style="width:100%;" /></td>
                        <td valign="top"><input type="text" name="owners_and_ratio[]" style="width:100%;" /></td>
                        <td valign="top"><input type="text" name="category[]" style="width:100%;" /></td>
                        <td valign="top"><input type="text" name="gross_rent[]" style="width:100%;" /></td>
                        <td valign="top"><input type="text" name="municipal_tax[]" style="width:100%;" /></td>
                        <td valign="top"><input type="text" name="loan_amt[]" style="width:100%;" /></td>
                        <td valign="top"><input type="text" name="loan_provider[]" style="width:100%;" /></td>
                        <td valign="top"><input type="text" name="interest_paid[]" style="width:100%;" /></td>
                        <td valign="top"><input type="text" name="principal_paid[]" style="width:100%;" /></td>
                      </tr> 
                      <?php } ?>                
                  </table>
                </div>
                <div class="cat">
                  <table width="98%" border="0" cellspacing="0" cellpadding="3">
                      <tr>
                        <td align="left" colspan="2" style="border-top:#c1c1c1 1px solid;"><p><strong>Note : 1.</strong> Provisional Interest certificate from bank is COMPULSORY to attach OTHERWISE NO BENEFIT GIVEN FOR INTEREST OR PRINCIPAL REPLAYEMNT.</p></td>
                      </tr>
                      <tr>
                        <td align="left" colspan="2"><p><strong>Note : 2.</strong> Gross Annual Value = HIGHER OF (i) Municipal value or fair rent w.e. is higher subject to maximum of standard rent (ii) Rent actually received or receivable</p></td>
                      </tr>
                      <tr>
                        <td align="left" colspan="2"><p>I, <input type="text" name="assessee_name" value="" style="float:none; border-bottom:#000000 1px solid; border-top:0; border-left:0; border-right:0; width:30%; background:#fff;" /> (Name of the assessee) , do declare that what is stated above is true. It is hereby further declared and confirmed that in the event of any misstatement in 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 align="left" width="50%" valign="bottom"><input type="text" name="place" style="width:50%;" value=""/></td>
                        <td align="right"><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="left" valign="bottom"><strong>Place</strong></td>
                        <td align="right"><strong>(Signature of Employee)</strong></td>
                      </tr>
                      <tr>
                        <td align="center" colspan="2" height="60" valign="middle"><input type="submit" name="submit" value="Submit" /></td>
                      </tr>
                  </table>
                </div>
            </form>
	</div>
</div>