<?php

		$PayOn = '';
		$EmpID = '';
        $FirstName = '';
        $LastName = '';
       	$DateofBirth = '';
		$DateofJoining = '';
		$Designation = '';
		$Departmentcode = '';
		$PANNo = '';
		$BankAccountNo = '';
		$IFSCCode ='';
		$BankBranchName = '';
		$PFnumber = '';
		$ESInumber = '';
         $TotalNoofDays = '';
        $NoOfWorkingdays ='';
		$ActualSalary = '';
		$PerDaySalary = '';
		$WorkedSalary = '';
		$BasicAndDA = '';
		$HRA = '';
		$OTWages = '';
		$OTPerHours ='';
		$OTSalary = '';
		$GrosssSalary = '';
		$ESI = '';
		$PF = '';
		$ESIAndPF = '';
		$SalaryAsPerPF = '';
		$FoodAllowance ='';
		$Incentive = '';
		$TotalSalary = '';
		$Advance = '';
		$BalanceAdvance = '';
		$LessAdvance = '';
		$DeptName = '';
		$LossofPay = '0.00';
		$RecCount = '';

if(!empty($Count))
{
	$RecCount = $Count;
}	

//echo $RecCount;
if(!empty($PayDetails))
{
    foreach ($PayDetails as $Pay)
    {
		$Paydt = $Pay->PayOn;
		$dt = '01-'.$Paydt;
		$PayOn = date('M-Y',strtotime($dt));
		
		$EmpID = $Pay->EmpID;
        $FirstName = $Pay->FName;
        $LastName = $Pay->Lname;
		
       	$DoB = $Pay->Dob;
		$DoJ = $Pay->DOJ;
		
		$from = new DateTime($DoB);
		$dt =  new DateTime($DoJ);
		$DateofBirth =  $from ->format('d-m-y');
		$DateofJoining = $dt ->format('d-m-y');
		
		$Designation = $Pay->Designation;
		$PANNo =$Pay->Pan;
		$BankAccountNo = $Pay->BankAccountNumber;
		$IFSCCode =$Pay->IFSCCode;
		$BankBranchName = $Pay->BankName;
		$PFnumber = $Pay->PFNumber;
		$ESInumber = $Pay->ESINumber;
         $TotalNoofDays = $Pay->TotalNoofDays;
        $NoOfWorkingdays =$Pay->NoofDaysWorked;
		$ActualSalary = $Pay->ActualSalary;
		$PerDaySalary = $Pay->PerDaySalary;
		$WorkedSalary = $Pay->WorkedSalary;
		$BasicAndDA = $Pay->BasicPlusDA;
		$HRA = $Pay->HRA;
		$OTWage = $Pay->OTWages;
		if($OTWage == '')
		{
	       $OTWages = '0.00';
		}
		else
		{
			$OTWages = $OTWage;
		}
		$OTPerHours =$Pay->OTperHours;
		$OTSal = $Pay->OTSalary;
		if($OTSal == '')
		{
	       $OTSalary = '0.00';
		}
		else
		{
			$OTSalary = $OTSal;
		}
		$GrosssSalary = $Pay->ESIGrossSalary;
		$ESI = $Pay->EmployeeESI;
		$PF = $Pay->PF;
		$ESIAndPF = $Pay->TotalDeduction;
		$SalaryAsPerPF = $Pay->SalaryAsPerPF;
		$Food =$Pay->FoodAllowance;
		if($Food == '')
		{
	       $FoodAllowance = '0.00';
		}
		else
		{
			$FoodAllowance = 	$Food;
		}
		$IncenAmt = $Pay->Incentive;
		if($IncenAmt == '')
		{
	       $Incentive = '0.00';
		}
		else
		{
			$Incentive = $IncenAmt;
		}
		$TotalSalary = $Pay->TotalSalary;
		$Adv = $Pay->Advance;
		if($Adv == '')
		{
	       $Advance = '0.00';
		}
		else
		{
			$Advance = $Adv;
		}
		$BalanceAdv = $Pay->BalanceAdvance;
		if($BalanceAdv == '')
		{
	       $BalanceAdvance = '0.00';
		}
		else
		{
			$BalanceAdvance = $BalanceAdv;
		}
		$LessAdv = $Pay->LessAdvance;
		if($LessAdv == '')
		{
	       $LessAdvance = '0.00';
		}
		else
		{
			$LessAdvance = $LessAdv;
		}
		$DeptName = $Pay->DeptName;
		
    }
}

if($RecCount > 0) 
{
?>

<div style= "page-break-before:always;"></div >
<?php
 }
 ?>
 

<table  style="border-collapse: collapse;"  cellpadding="0" cellspacing="0" border="1">
<tbody>
<tr>
<td>
			 <img  width="80" height="80"  src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRI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8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg==">
			 </td>
			 <td colspan="8">
				<h3>Siddharth Industries</h3>  Survey No: 168/1C3,Pennalur Pet Road,Goonipalyam village, <br/>Uthukottai Taluk,Tiruvallur Dist, Chennai,Tamilnadu,Pin code : 602026.<br/>PaySlip for the month - <?php echo $PayOn ?>
			</td>
</tr>
<tr>
<td colspan="6">
<table>
<tbody>
<tr >
<td width="160px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Name :</td>
<td width="250px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo $FirstName ?></td>
<td  width="160px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Employee ID :</td>
<td width="250px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo $EmpID ?></td>
</tr>
<tr>
<td  style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Desigination :</td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;" > <?php echo $Designation ?></td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Department :</td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo $DeptName ?></td>
</tr>
<tr>
<td  style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Date Of Joining :</td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"> <?php echo $DateofJoining  ?></td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Days Worked :</td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo $NoOfWorkingdays    ?></td>
</tr>
<tr>
<td  style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Date Of Birth :</td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo $DateofBirth   ?></td>
<td  style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">No Of Working Days:</td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"> <?php echo $TotalNoofDays  ?></td>
</tr>
<tr>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">PF Account Number :</td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;" ><?php echo  $PFnumber   ?></td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Balance Advance :</td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;" ><?php echo $BalanceAdvance  ?></td>
</tr>
<tr>
<td   style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Bank Name :</td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo  $BankBranchName   ?></td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">OT in Hours:</td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo $OTWages  ?></td>
</tr>
<tr>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Bank IFSC :</td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo $IFSCCode  ?></td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">ESI Account Number :</td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"> <?php echo $ESInumber   ?></td>
</tr>
<tr>
<td  width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Bank Account Number :</td>
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"> <?php echo $BankAccountNo  ?></td>
<td width="50px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Loss Of Pay :</td>
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo $LossofPay  ?></td>
</tr>
<tr>
<td  width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">PAN Number  :</td>
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"> QWERS3423E</td>
<td width="50px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">UAN Number : </td>
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">101033275864 </td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr><th>Earnings</th><th>Amount</th><th>Deductions</th><th>Amount</th></tr>
<tr>
<td  width="50px;">Basic Plus DA</td>
<td style="text-align: right;" ><?php echo $BasicAndDA   ?></td>
<td width="50px;">Provident Fund</td>
<td style="text-align: right;" ><?php echo $PF  ?></td>
</tr>
<tr>
<td>House Rent Allowance</td>
<td style="text-align: right;"><?php echo $HRA ?></td>
<td>Employee State Insurance</td>
<td style="text-align: right;"><?php echo $ESI  ?></td>
</tr>
<tr>
<td>Food Allowance</td>
<td style="text-align: right;"><?php echo $FoodAllowance ?></td>
<td>Advance</td>
<td style="text-align: right;"><?php echo $Advance  ?></td>
</tr>
<tr>
<td>Incentive</td>
<td style="text-align: right;"><?php echo $Incentive ?></td>
<td></td>
<td style="text-align: right;">&nbsp;</td>
</tr>
<tr>
<td>OT Salary</td>
<td style="text-align: right;"><?php echo $OTSalary ?></td>
<td>&nbsp;</td>
<td style="text-align: right;">&nbsp;</td>
</tr>
<tr><th nowrap>Total Earning (Rounded) (TE)</th>
<td style="text-align: right;"><?php echo $TotalSalary   ?></td>
<th nowrap>Total Deduction (Rounded)(TD)</th>
<td style="text-align: right;"><?php echo $ESIAndPF  ?></td>
</tr>
<tr><th style="text-align: right;" colspan="3">Net Pay (Rounded) :&nbsp;</th>
<td style="text-align: right;" colspan="1"><?php echo $LessAdvance ?></td>
</tr>
<tr><th style="text-align: center;" colspan="4">This is a computer generated document. This document does not require signature.</th></tr>
</tbody>
</table>