<?php 
	session_start();
	
	 
	function getMonth($id)
	{
		
		if($id == '1')
			$id = "January";
		elseif($id == '2')
			$id = "February";
		elseif($id == '3')
			$id = "March";
		elseif($id == '4')
			$id = "April";
		elseif($id == '5')
			$id = "May";
		elseif($id == '6')
			$id = "June";
		elseif($id == '7')
			$id = "July";
		elseif($id == '8')
			$id = "August";
		elseif($id == '9')
			$id = "September";
		elseif($id == '10')
			$id = "October";
		elseif($id == '11')
			$id = "November";
		elseif($id == '12')
			$id = "December";
		
		return $id;
	}
	
	
	include('../pertial_page/pertial_function.php');
	
	include('../config/database_connection.php');
 							  
	$connecttion = getSQlConection();

    $query = " exec usp_select_employee_pay_slip_preview  '$_REQUEST[element_id]', '$_REQUEST[query]', '$_REQUEST[sub_element_id]' ";
	
	$result  = mssql_query($query);
	closeSQLConnection($connecttion);
	
 
	$row = mssql_fetch_array($result);
	
	$month = getMonth($row['Sal_Month']);	
	
	
	$inwordamount = '';

	try
	{
		 $inwordamount = convert_number($row['Net_Payable']);
	}
	catch(Exception $e)
	{
		$inwordamount = $e->getMessage();
	}
 
  
	$display = "<div  class='pageBreakHide' id='pageBreakTag0' ></div>";
	$display .= "<div class='show' id='page0' align='left'> ";
	$display .= "<div   class='page_body' align='left'> ";
	$display .= "<table style='width: 100%;font-family: Calibri; font-size:15px;' >";
 
	
        	$display .= "
			<tr>
				<td style='width:2.2in;' >&nbsp;</td>
				<td style='height:.5in;' >&nbsp;</td>
				<td style='width:2.2in;' >&nbsp;</td>
			</tr>
			
			<tr>
			<td>
            	&nbsp;
            </td>
            <td style='border-bottom:1px solid #000;border-style:double;' >
 
			   		<table style='width: 100%;' >
 
			   			<tr>
							<td align='center' valign='canter' style='font-family: Baker-Signet-B-T; font-size:20px;' >
								Cross World Group
							</td>
						</tr>
						<tr>
							<td align='center' valign='canter' style='font-family: Baker-Signet-B-T; font-size:15px;' >
								HR & Admin Department
							</td>
						</tr>
 	
						<tr>
							<td align='center' valign='canter' style='font-family: Baker-Signet-B-T; font-size:15px;border-bottom:1px solid #000;' >
								Salary Slip for the month Of $month $row[Sal_Year]
							</td>
			   
			   			</tr>
						
						<tr>
				<td align='center' valign='canter' style='font-family: Baker-Signet-B-T; font-size:15px;' >
				
				<table style='width: 100%;' >
			   			<tr>
							<td align='left' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;font-weight:bold' >PIN :</td>
						<td align='right' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;font-weight:bold' >$row[Emp_Id]</td>
						</tr>
						<tr>
							<td align='left' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >Name :</td>
						<td align='right' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;font-weight:bold' >$row[Emp_Name]</td>
						</tr>
						<tr>
							<td align='left' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >Company :</td>
						<td align='right' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >$row[Comp_Name]</td>
						</tr>
						<tr>
							<td align='left' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >Department :</td>
						<td align='right' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >$row[Dept_Name]</td>
						</tr>
						<tr>
							<td align='left' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >Designation :</td>
						<td align='right' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >$row[Desig_Name]</td>
						</tr>
						<tr>
							<td align='left' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >Date Of Jining :</td>
						<td align='right' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >$row[Join_Date]</td>
						</tr>
						</table>
							 
							 
							 
							</td>
			   			</tr>
						
						<tr>
							<td align='center' valign='canter' style='font-family: Baker-Signet-B-T; font-size:15px;border-bottom:1px solid #000;' > 
							 
							</td>
			   
			   			</tr>
						
						
						
												<tr>
				<td align='center' valign='canter' style='font-family: Baker-Signet-B-T; font-size:15px;' >
				
				<table style='width: 100%;' >
			   			<tr>
							<td align='left' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;font-weight:bold' >Break Of Payment :</td>
						<td align='right' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;font-weight:bold' >Amount</td>
						</tr>
						<tr>
							<td align='left' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >Basic :</td>
						<td align='right' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >".number_format($row['Basic_Salary'], 2)."</td>
						</tr>
						<tr>
							<td align='left' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >House Rent :</td>
						<td align='right' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >".number_format($row['House_Rent'], 2)."</td>
						</tr>
						<tr>
							<td align='left' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >Medical Allowance :</td>
						<td align='right' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >".number_format($row['Med_Allow'], 2)." </td>
						</tr>
						
												<tr>
							<td align='left' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >Convenyance Allowance :</td>
						<td align='right' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >".number_format($row['Conv_Allow'], 2)." </td>
						</tr>
						 
						</table>
							 
							 
							 
							</td>
			   			</tr>
						
						
												<tr>
							<td align='center' valign='canter' style='font-family: Baker-Signet-B-T; font-size:15px;border-bottom:1px solid #000;' > 
							 
							</td>
			   
			   			</tr>
						
					 
						
												<tr>
				<td align='center' valign='canter' style='font-family: Baker-Signet-B-T; font-size:15px;' >
				
				<table style='width: 100%;' >
			   			<tr>
							<td align='left' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;font-weight:bold' >Total Payable :</td>
						<td align='right' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;font-weight:bold' >".number_format($row['Total_Salary'], 2)."</td>
						</tr>
						 
						<tr>
							<td align='left' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >Excess Mobile :</td>
						<td align='right' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >".number_format($row['Ext_M_Bill'], 2)."</td>
						</tr>
						<tr>
							<td align='left' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >ITax :</td>
						<td align='right' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' >".number_format($row['TAX_Deduct'], 2)."</td>
						 
						</table>
							 
							 
							 
							</td>
			   			</tr>
						
						<tr>
							<td align='center' valign='canter' style='font-family: Baker-Signet-B-T; font-size:15px;border-bottom:1px solid #000;' > 
							 
							</td>
			   
			   			</tr>
						
												
					<tr>
				<td align='center' valign='canter' style='font-family: Baker-Signet-B-T; font-size:15px;' >
				
				<table style='width: 100%;' >
			   			<tr>
							<td align='left' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;font-weight:bold' >Total deduction :</td>
						<td align='right' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;font-weight:bold' >".number_format($row['Ttal_Deduct'], 2)."</td>
						</tr>
						 
						</table>
							 
							 
							 
							</td>
			   			</tr>
						
						<tr>
							<td align='center' valign='canter' style='font-family: Baker-Signet-B-T; font-size:15px;border-bottom:1px solid #000;' > 
							 
							</td>
			   
			   			</tr>
						
						<tr>
				<td align='center' valign='canter' style='font-family: Baker-Signet-B-T; font-size:15px;' >
				
				<table style='width: 100%;' >
			   			<tr>
							<td align='left' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;font-weight:bold' >Net Payable :</td>
						<td align='right' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;font-weight:bold' >".number_format($row['Net_Payable'], 2)."</td>
						</tr>
						 
						</table>
							 
							 
							 
							</td>
			   			</tr>
						
						<tr>
							<td align='center' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' > &nbsp;
							 
							</td>
			   
			   			</tr>
						
						<tr>
							<td align='left' valign='canter' style='font-family: Baker-Signet-B-T; font-size:12px;' > (Taka :  $inwordamount only.) <br />This is a software generated report therefore no signature required.
							</td>
			   
			   			</tr>
						
						
						
			   		</table>
			 
 
            </td>
			<td>
            &nbsp;
            </td>
        </tr> 
		 
	</div>";
		
	$display .= "</div><input type='hidden' value='page0' id='current_page' />";
	$display .= "<input type='hidden' value='1' id='page_counter' />";
	
	
	echo $display;
?>

 



 
 
 

 



 
 
 

 