<style>
h4 {color:#000;
text-decoration:underline;
font-size:18px;
}
#appoin{width:1200px; height:auto; margin:0 auto; text-align:justify; font-size:12px;}
#appoin ol{margin:10px 0;}
#appoin ol li{margin:3px 0; text-align:left;}
</style>


<link rel="stylesheet" href="css/new_mxerp.css">
<script src="js/function-ajax.js" language="javascript"></script>
<script src="empcal.js" language="javascript"></script>
<form name="search" action="" method="post">
<div class="body_contain">
<div class="tab_div">
 
<?php 
	if($_REQUEST['action']=='offer' && $_REQUEST['id']!='')
	{
		$jobtype=array("p"=>"Permanent","c"=>"Temporary");
		//echo $_REQUEST['id'];
		$query=DB_query("select a.*,b.* from hr_applcnt_rgstn a inner join hr_applcnt_rgstn_offer b on a.id=b.hr_applcnt_rgstn_id where a.id='".$_REQUEST['id']."'",$db);
		
		$row=DB_fetch_array($query);
		extract($row);
		//echo $hr_job_created;
		$site=$s->GetFieldValue("hr_job_created","id='".$hr_job_created_id."'","branch");
		 $type=$s->GetFieldValue("hr_job_created","id='".$hr_job_created_id."'","job_type");

		
	}
?>
<?php
if($_REQUEST['save'])
{

//**************************mail functin ***********************************************************
 

//**********************mail function********************************************************
	$sql="select appointment_no from hr_applcnt_rgstn_appointment order by appointment_no desc limit 1";

	 
	//$qyprefix=DB_query("Select prefix from locations Where loccode ='".$_REQUEST['requested_site']."'",$db);
	//$row_prefix=DB_fetch_array($qyprefix);
	//$projectprefix=$row_prefix['prefix'];
	$result = DB_query($sql,$db);
	$numrows = DB_num_rows($result);

	if($numrows>0)
	
	{
		
		$IsuuNo=DB_fetch_array($result);
		$Explo=explode("/",$IsuuNo['appointment_no']);
		$maxval=$Explo[1];
		
		//$strFinal = $maxval+1;
		// $strBothFinal = "GS1".'/'.'APMNT'.'/'.str_pad($strFinal,6,"0",STR_PAD_LEFT);
		 $strFinal = $maxval+1;
		 $strBothFinal = "APMNT".'/'.str_pad($strFinal,6,"0",STR_PAD_LEFT);
	}
	else
	{
		
	// $strBothFinal= "GS1".'/'.'APMNT'.'/'.'000001';
	  $strBothFinal= "APMNT".'/'.'000001';
	}
	$offerid=$s->GetFieldValue("hr_applcnt_rgstn_offer","hr_applcnt_rgstn_id='".$_REQUEST['id']."'","id") ;
	$dataArr1['hr_applcnt_rgstn_id']=$_REQUEST['id'];
	$dataArr1['hr_applcnt_rgstn_offer_id']=$offerid;
	$dataArr1['subject']=$_REQUEST['subject'];
	$dataArr1['location']=$_REQUEST['location'];
	$dataArr1['notice_prd']=$_REQUEST['notice'];
	$dataArr1['joining_date']=ConvertSQLDate($_REQUEST['join_date']);
	$dataArr1['reporting']=$_REQUEST['report'];

    $dataArr1['appointment_no']=$strBothFinal;
    $dataArr1['appointment_date']=ConvertSQLDate($_REQUEST['offer_date']);   
   	//$dataArr1['med_claim']=$_REQUEST['mediclaim'];

   	$dataArr1['gross_salary']=$_REQUEST['allow_tot'];
   	$dataArr1['net_salary']=$_REQUEST['net_sal1'];
   	$dataArr1['deduction']=$_REQUEST['deduct_tot'];
   	$dataArr1['monthly_ctc']=$_REQUEST['monthelyctc'];
   	$dataArr1['yearly_ctc']=$_REQUEST['allow_tot_yearly'];
   	$dataArr1['basic']=$_REQUEST['basic_salary'];
   	 $dataArr1['sal_effect']=ConvertSQLDate($_REQUEST['eff_sal_date']);
   	
    $dataArr1['created_by']=$_SESSION['UserID'];    
    $dataArr1['created_date']=date('Y-m-d H:i:s');

    if($_REQUEST['govt'])
		$govtnom='Y';
		else
		$govtnom='N';
		$dataArr1['govt_nom_pf']=$govtnom;
    $s->RecordInsert('hr_applcnt_rgstn_appointment',$dataArr1);

    $Lastemp_id = DB_Last_Insert_ID($db,'hr_applcnt_rgstn_appointment','id');

    $dataArr12['status']='appoint';
    $dataArr12['conf_int_app_details_seq']=0;
    //$dataArr1['conf_int_app_details_id']=$_REQUEST['id'];
    $dataArr12['awd_application_id']=$_REQUEST['id'];
    $dataArr12['created_by']=$_SESSION['UserID'];    
    $dataArr12['datetime']=date('Y-m-d H:i:s');
    $s->RecordInsert('hr_applcnt_rgstn_log_status',$dataArr12);
    $qt=DB_query("update hr_applcnt_rgstn set status='appoint' where id='".$_REQUEST['id']."'",$db);


   
 //			****************************************  annuxure 
for($k=1;$k<$_REQUEST['ctr'];$k++)
			{
				$dataEmpSal['hr_applcnt_rgstn_appointment_id']=$Lastemp_id;
				$dataEmpSal['allowance_deduction']=$_REQUEST['allid'][$k];
				$dataEmpSal['percentage']=$_REQUEST['aperc'][$k];
				$dataEmpSal['percentage_value']=$_REQUEST['allow'][$k];
				$dataEmpSal['all_ded_prefix']=$_REQUEST['prefix1'];
				$s->RecordInsert('hr_applcnt_rgstn_annex',$dataEmpSal);
			}
			
			$dataEmpSpeSal['hr_applcnt_rgstn_appointment_id']=$Lastemp_id;
			$dataEmpSpeSal['allowance_deduction']='100';
			$dataEmpSpeSal['percentage']='0.00';
			$dataEmpSpeSal['percentage_value']=$_REQUEST['special_allow'];			
			$dataEmpSpeSal['all_ded_prefix']='A';
			$s->RecordInsert('hr_applcnt_rgstn_annex',$dataEmpSpeSal);
			
			
			$dataEmpSpeSal['hr_applcnt_rgstn_appointment_id']=$Lastemp_id;
			$dataEmpSpeSal['allowance_deduction']='101';
			$dataEmpSpeSal['percentage']=$_REQUEST['ltaper'];
			$dataEmpSpeSal['percentage_value']=$_REQUEST['lta'];
			$dataEmpSpeSal['non_taxable_amt']=$_REQUEST['lta_nontaxable'];
			$dataEmpSpeSal['all_ded_prefix']='A';
			$s->RecordInsert('hr_applcnt_rgstn_annex',$dataEmpSpeSal);
			
			$dataEmpSpeSal['hr_applcnt_rgstn_appointment_id']=$Lastemp_id;
			$dataEmpSpeSal['allowance_deduction']='102';
			$dataEmpSpeSal['percentage']=$_REQUEST['medicalper'];
			$dataEmpSpeSal['percentage_value']=$_REQUEST['medicalamount'];
			$dataEmpSpeSal['non_taxable_amt']=$_REQUEST['medicalamountent'];
			$dataEmpSpeSal['all_ded_prefix']='A';
			$s->RecordInsert('hr_applcnt_rgstn_annex',$dataEmpSpeSal);

			$dataEmpSpeSal['hr_applcnt_rgstn_appointment_id']=$Lastemp_id;
			$dataEmpSpeSal['allowance_deduction']='104';
			$dataEmpSpeSal['percentage']=$_REQUEST['supperannuation_per'];
			$dataEmpSpeSal['percentage_value']=$_REQUEST['supperannuation_amt'];
			$dataEmpSpeSal['non_taxable_amt']=$_REQUEST['supperannuation_nontaxableamt'];
			$dataEmpSpeSal['all_ded_prefix']='A';
			$s->RecordInsert('hr_applcnt_rgstn_annex',$dataEmpSpeSal);

			$dataEmpSpeSal['hr_applcnt_rgstn_appointment_id']=$Lastemp_id;
			$dataEmpSpeSal['allowance_deduction']='105';
			$dataEmpSpeSal['percentage']=$_REQUEST['medicalpolicyamt'];
			$dataEmpSpeSal['percentage_value']=$_REQUEST['medicalpolicyper'];
			$dataEmpSpeSal['non_taxable_amt']=$_REQUEST['medicalpolicyamountent'];
			$dataEmpSpeSal['all_ded_prefix']='A';
			$s->RecordInsert('hr_applcnt_rgstn_annex',$dataEmpSpeSal);

			$dataEmpSpeSal['hr_applcnt_rgstn_appointment_id']=$Lastemp_id;
			$dataEmpSpeSal['allowance_deduction']='106';
			$dataEmpSpeSal['percentage']=$_REQUEST['gratuity_per'];
			$dataEmpSpeSal['percentage_value']=$_REQUEST['gratuity_amt'];
			$dataEmpSpeSal['non_taxable_amt']=$_REQUEST['gratuity_nontaxableamt'];
			$dataEmpSpeSal['all_ded_prefix']='A';
			$s->RecordInsert('hr_applcnt_rgstn_annex',$dataEmpSpeSal);


			
//////////////////////////////////////////........ESI(Employer)..../////////////////////////////			
			$dataEmpSpeSal['hr_applcnt_rgstn_appointment_id']=$Lastemp_id;
			$dataEmpSpeSal['allowance_deduction']='103';
			$dataEmpSpeSal['percentage']=$_REQUEST['ESI_employer'];
			$dataEmpSpeSal['percentage_value']=$_REQUEST['ESI_employer_value'];
			$dataEmpSpeSal['all_ded_prefix']='A';
			$s->RecordInsert('hr_applcnt_rgstn_annex',$dataEmpSpeSal);

			$dataEmpSpeSal['hr_applcnt_rgstn_appointment_id']=$Lastemp_id;
			$dataEmpSpeSal['allowance_deduction']='107';
			$dataEmpSpeSal['percentage']=$_REQUEST['pf_ac1'];
			$dataEmpSpeSal['percentage_value']=$_REQUEST['pf_ac1_amt'];
			$dataEmpSpeSal['all_ded_prefix']='A';
			$s->RecordInsert('hr_applcnt_rgstn_annex',$dataEmpSpeSal);

			$dataEmpSpeSal['hr_applcnt_rgstn_appointment_id']=$Lastemp_id;
			$dataEmpSpeSal['allowance_deduction']='108';
			$dataEmpSpeSal['percentage']=$_REQUEST['pf_ac10_per'];
			$dataEmpSpeSal['percentage_value']=$_REQUEST['pf_ac10_amt'];
			$dataEmpSpeSal['all_ded_prefix']='A';
			$s->RecordInsert('hr_applcnt_rgstn_annex',$dataEmpSpeSal);

			$dataEmpSpeSal['hr_applcnt_rgstn_appointment_id']=$Lastemp_id;
			$dataEmpSpeSal['allowance_deduction']='109';
			$dataEmpSpeSal['percentage']=$_REQUEST['pf_ac2_per'];
			$dataEmpSpeSal['percentage_value']=$_REQUEST['pf_ac2_amt'];
			$dataEmpSpeSal['all_ded_prefix']='A';
			$s->RecordInsert('hr_applcnt_rgstn_annex',$dataEmpSpeSal);

			$dataEmpSpeSal['hr_applcnt_rgstn_appointment_id']=$Lastemp_id;
			$dataEmpSpeSal['allowance_deduction']='110';
			$dataEmpSpeSal['percentage']=$_REQUEST['pf_ac21_per'];
			$dataEmpSpeSal['percentage_value']=$_REQUEST['pf_ac21_amt'];
			$dataEmpSpeSal['all_ded_prefix']='A';
			$s->RecordInsert('hr_applcnt_rgstn_annex',$dataEmpSpeSal);

            $dataEmpSpeSal['hr_applcnt_rgstn_appointment_id']=$Lastemp_id;
			$dataEmpSpeSal['allowance_deduction']='111';
			$dataEmpSpeSal['percentage']=$_REQUEST['pf_ac22_per'];
			$dataEmpSpeSal['percentage_value']=$_REQUEST['pf_ac22_amt'];
			$dataEmpSpeSal['all_ded_prefix']='A';
			$s->RecordInsert('hr_applcnt_rgstn_annex',$dataEmpSpeSal);
			
			for($K=1;$K<$_REQUEST['dctr'];$K++)
			{
				$dataEmpSalDed['hr_applcnt_rgstn_appointment_id']=$Lastemp_id; 
				$dataEmpSalDed['allowance_deduction']=$_REQUEST['dedid'][$K];
				$dataEmpSalDed['percentage']=$_REQUEST['dperc'][$K]; 
				$dataEmpSalDed['percentage_value']=$_REQUEST['deduction'][$K]; 
				$dataEmpSalDed['all_ded_prefix']=$_REQUEST['prefix2'];
				$s->RecordInsert('hr_applcnt_rgstn_annex',$dataEmpSalDed);
			}
  //****************************************  annuxure 



  $s->pageLocation("index.php?route=HRModule/Master/appointment"."&modid=".$_REQUEST['modid']."&frmid=".$_REQUEST['frmid']);
}

?>
<?php
if($_REQUEST['calcel'])
{
 $s->pageLocation("index.php?route=HRModule/Master/proposed_offer"."&modid=".$_REQUEST['modid']."&frmid=".$_REQUEST['frmid']); 
}
?>
<h1>Appointment Letter</h1>
<h4 style="text-align:center">STRICTLY PRIVATE & CONFIDENTIAL</h4>


<input type="hidden" name="grade" id="grade" value="4" style="width:98%;">
<input type="hidden" id="emp_site" value="<?php echo $site; ?>">
<input type="hidden" id="employment_type" value="<?php echo $jobtype[$type]; ?>">
<form name="letter" action="" method="post">
<div id="appoin">
<p align="left">
<strong>December 1, 2015</strong><br /><br />

To,<br />
Mr. xyz<br />
S/O Mr. ABC,<br />
Vill - Mahwa,Post Pedakhir Jamalpur,<br />
Distt Mirzapur , Uttar Pradesh – 231302.<br />
</p>
<h4 style="text-align:center">APPOINTMENT LETTER</h4>
<p align="left">
<strong>Dear Mr. xyz,</strong><br />
<br />

This has reference to your application and the subsequent discussions you had with us. You have been appointed at the position of <input value="" style="float:none; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0);  border-bottom:#000000 1px solid; border-top:0; border-left:0; border-right:0; width:10%; height:16px; background:#fff;" name="name" type="text"> with effect from <input value="" style="float:none; border-bottom:#000000 1px solid; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0); border-top:0; border-left:0; border-right:0; width:10%; height:16px; background:#fff;" name="name" type="text">on the following terms and conditions:
</p>
<ol style="text-align:left">
<li>
You will be based at <input value="" style="float:none; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0); border-bottom:#000000 1px solid; border-top:0; border-left:0; border-right:0; width:10%; height:20px; background:#fff;" name="name" type="text"> Location.</li>

<li>Your appointment is subject to your being medically fit at all times.</li>
</ol>

<ol>
<li><strong>Compensation and Benefits:</strong> You will receive compensation as mentioned in Annexture A.</li>
 
<li><strong>Posting &amp; Transfer:</strong> Your place of work, in the first instant, is as indicated above. However, you can be transferred temporarily or permanently for duty anywhere in India, depending upon the needs of the organization. Your service may be transferred to any office of the Company or its associate organizations in India or abroad depending upon the exigencies of work.  You will be governed by the transfer rules prevailing in the company at any given point of time. </li>

<li><strong>Probation:</strong> You will be on probation for a period of 3 months, from your date of joining, after which your performance will be appraised. You will be confirmed in your appointment in writing on successful completion of the said probationary period. It may get extended by further period of 3 months if your performance is not found satisfactory. If no confirmation is made in writing at the end of the probationary period, it will be deemed to have been extended until the company confirms you in writing. During the probation period your services are liable to be terminated by giving 1 month notice and in the case of your leaving the organization you need to serve 1 month notice period.</li>
<li><strong>Notice period:</strong> After confirmation, either party, by stating their intention to do so, in writing may terminate this employment at any time, provided that at least 1 month notice is given by the company and in your case 1 month notice. </li>

<li>However, in the event of your being guilty of misconduct or inattention or negligence in the discharge of your duties or in the conduct of the Company’s business, or such misdemeanor which is likely to affect, or affects the reputation of the Company’s working or of any breach of the terms and conditions herein, the Company reserves its right to terminate your services at any given point of time, with immediate effect, without any compensation or notice.</li>

<li>You will treat matters pertaining to the Company's business interests with utmost confidentiality and such confidentiality has to be maintained during your employment with the Company and thereafter.  </li>

<li>During your services with the company, you will be governed by the rules and regulations in respect to conduct & discipline and other matters as may be framed by the company from time to time.</li>

<li>You will undertake, that while in the employment of the Company, and for a period of 12 months after separation from the Company, for any reason whatsoever, you will:
<ul type="i">
<li> Keep confidential and not disclose to any unauthorized persons
<ul type="a">

<li>All Company information, business and financial interests, </li>
<li> Company intelligence, consisting of sensitive research, either acquired or in the process of being carried out.</li> 
<li> Technical capability and  Commercial intelligence disclosed to you and/ or acquired by you in the course of your employment. </li>
</ul></li>

<li> Not employ, use and/ or engage the confidential information for any purposes other than the business of the Company and only during the course of your employment with the Company.
III. Solicit or endeavor to entice any employee or person involved, directly or indirectly, from any of the Company's operations.
</li>
</ul>
</li>
<li> You are employed in the Company full time. You will not be employed by any other Company or offer your services with or without pay to any physical person, legal entity or public authority or to be occupied in your own business without the prior written permission of the Company.</li>
<li> Amendments to the above terms and conditions, if any will be made in writing.</li>

<li>Please sign and return the duplicate copy of this letter of appointment (initialing each page) as a token of your having accepted the above terms and conditions.</li>

</ol>
<p align="left"><strong>Wish you all the very best in your new assignment. </strong></p>

<table width="100%" cellpadding="3"  cellspacing="0">
<tr>
<td style="text-align:left"> 
Thanking You.<br />

Yours faithfully<br />

<br />
For and on behalf of<br /> 
<strong>Blue Bird Solar Pvt. Ltd.</strong>
<br /><br />
<strong>Shankarshan Sudarshan</strong><br />
(AM - HR)
</td>
<td style="text-align:right">
Signature & Date</td>
</tr>
</table>
<p align="right">
Signature:<br />
Name: Mr.  xyz
</p>

<p align="left"><input type="checkbox" name="Accepted & Agreed" />Accepted & Agreed</p>

<h4 style="text-align:center">Annexure A</h4>

<table width="50%" cellpadding="3" cellspacing="0" border="1" align="center">
<tr>
<td colspan="2" height="30" style="text-align:center"><strong>Salary Break Up</strong></td>
</tr>
<tr>
<td width="50%">Basic</td>
<td >50% of Gross</td>
</tr>
<tr>
<td >HRA</td>
<td >50 % of basic in metro and 40 % of basic in other cities</td>
</tr>
<tr>
<td>Conveyance allowance</td>
<td >800</td>
</tr>
<tr>
<td >Medical Allowance</td>
<td >1250</td>
</tr>
<tr>
<th >Special Allowance</th>
<th >Balance Amount of Gross</th>
</tr>
<tr>
<td >PF Employee contribution</td>
<td >12% of basic</td>
</tr>
<tr>
<td >ESI (IF APPLICABLE)</td>
<td >1.75% of gross</td>
</tr>
<tr>
<td >Net Salary</td>
<td >&nbsp;</td>
</tr>
<tr>
<td >CTC  Monthly</td>
<td >&nbsp;</td>
</tr>
<tr>
<td >CTC Annually</td>
<td >&nbsp;</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >&nbsp;</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >&nbsp;</td>
</tr>
</table>
<p align="left"><span style="color:#F00">*</span> Please Note: TDS will be deducted as applicable</p>

</div>

</form>




