?
Current Path : /home1/savoy/public_html/savoyglobal.net/hr/application/views/Reports/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/hr/application/views/Reports/pdf_report_settlement.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $html='<html><head><body>'; $html.='<table width="100%"> <tr><td colspan="2"></td><td align="right"><img src="'.base_url().'assets/images/logo.gif" style="float:right"/></td> <tr><td colspan="3" style="font-size:16px;" align="center"><b><u>Settlement Report</u></b></td></tr> <tr><td colspan="3">Printout Date : '.date('d-m-Y').', '.date('h:i:s a').'</td></tr> </table><br><br>'; $html.='<hr>'; $html.='<table cellspacing="0" style="width:100%;text-align:center" border="0" cellpadding="0"> <thead> <tr bgcolor="#7FCEFF"><th style="text-align:center" bgcolor="#7FCEFF">Sl No</th> <th style="text-align:left" bgcolor="#7FCEFF">Old Employee No</th> <th style="text-align:center" bgcolor="#7FCEFF">Employee No</th> <th style="text-align:center" bgcolor="#7FCEFF">Employee Name</th> <th style="text-align:center" bgcolor="#7FCEFF">Passport No</th> <th style="text-align:center" bgcolor="#7FCEFF">Camp</th> <th style="text-align:center" bgcolor="#7FCEFF">Trade</th> <th style="text-align:center" bgcolor="#7FCEFF">Settlement Date</th> <th style="text-align:center" bgcolor="#7FCEFF">Basic Salary</th> <th style="text-align:center" bgcolor="#7FCEFF">Allowance Type | Allowance Amount</th> <th style="text-align:center" bgcolor="#7FCEFF">Deduction Type | Deduction Amount</th> <th style="text-align:center" bgcolor="#7FCEFF">Final Amount</th> </tr></thead><tbody>'; $i=1; $j=1; foreach($report as $rep) { $atdate=date("d-m-Y"); $empname=$rep['emp_non_full_name']; $empno=$this->mastermodel->correctempno($rep['emp_non_no']); $camp=$this->reportmodel->findemployeecamp($rep['emp_non_id'],$atdate); if(!empty ($camp)) { $campname=$camp->camp_name; $campid=$camp->camp_id; } else { $campname=""; $campid=""; } $trade=$this->reportmodel->findemployeetrade($rep['emp_non_id'],$atdate); if(!empty ($trade)) { $tradename=$trade->trade_name; } else { $tradename=""; } if(!empty($postdata['camp_name'])) { if($postdata['camp_name']==$campid) { $html.='<tr style="color:#555555"> <td style="text-align:left">'.$j.'</td> <td>'.$rep['emp_non_no_old'].'</td> <td style="text-align:left">'.$empno.'</td> <td style="text-align:left">'.$empname.'</td> <td>'.$rep['emp_non_passport_no'].'</td> <td style="text-align:left">'.$campname.'</td> <td style="text-align:left">'.$tradename.'</td> <td style="text-align:left">'.$this->mastermodel->convertdatenormalformat($rep['date']).'</td> <td style="text-align:left">'.$rep['basic_salary'].'</td>'; $allowance = explode('~', $rep['allowance']); $allowance_name= ''; $allowance_amount= ''; for($i=0;$i<sizeof($allowance);$i++) { if($i%2==0) $allowance_name .= $allowance[$i]."<br/>"; if($i%2==1) $allowance_amount .= $allowance[$i]."<br/>"; } $html.='<td style="text-align:left"><table width="100%">'; $html.='<tr> <td width="55%">'.$allowance_name.'</td> <td width="45%">'.$allowance_amount.'</td> </tr>'; $html.='</table></td><td><table width="100%">'; $deduction = explode('~', $rep['deduction']); $deduction_name= ''; $deduction_amount= ''; for($i=0;$i<sizeof($deduction);$i++) { if($i%2==0) $deduction_name .= $deduction[$i]."<br/>"; if($i%2==1) $deduction_amount .= $deduction[$i]."<br/>"; } $html.='<tr> <td width="55%">'.$deduction_name.'</td> <td width="45%">'.$deduction_amount.'</td> </tr>'; $html.='</table></td></tr>'; $j++; } } else { $html.='<tr style="color:#555555"> <td style="text-align:left">'.$j.'</td> <td>'.$rep['emp_non_no_old'].'</td> <td style="text-align:left">'.$empno.'</td> <td style="text-align:left">'.$empname.'</td> <td style="text-align:left">'.$campname.'</td> <td style="text-align:left">'.$tradename.'</td> <td style="text-align:left">'.$this->mastermodel->convertdatenormalformat($rep['date']).'</td> <td style="text-align:left">'.$rep['basic_salary'].'</td>'; $allowance = explode('~', $rep['allowance']); $allowance_name= ''; $allowance_amount= ''; for($i=0;$i<sizeof($allowance);$i++) { if($i%2==0) $allowance_name .= $allowance[$i]."<br/>"; if($i%2==1) $allowance_amount .= $allowance[$i]."<br/>"; } $html.='<td style="text-align:left"><table width="100%">'; $html.='<tr> <td width="55%">'.$allowance_name.'</td> <td width="45%">'.$allowance_amount.'</td> </tr>'; $html.='</table></td><td><table width="100%">'; $deduction = explode('~', $rep['deduction']); $deduction_name= ''; $deduction_amount= ''; for($i=0;$i<sizeof($deduction);$i++) { if($i%2==0) $deduction_name .= $deduction[$i]."<br/>"; if($i%2==1) $deduction_amount .= $deduction[$i]."<br/>"; } $html.='<tr> <td width="55%">'.$deduction_name.'</td> <td width="45%">'.$deduction_amount.'</td> </tr>'; $html.='</table></td></tr>'; $j++; } } $html.='</tbody></table>'; $html.='<hr>'; $html.='<script type="text/php"> if ( isset($pdf) ) { $font = Font_Metrics::get_font("verdana", "normal"); $pdf->page_text(75, 570, "Horeitia Global WLL | T. 44674442 | F. 44673111 | info@horeitiaglobal.com | www.horeitiaglobal.net | Po Box 31450, Doha, Qatar Page {PAGE_NUM} of {PAGE_COUNT}", $font, 10, array(0,0,0)); } </script>'; $html.='</body></html>'; pdf_create($html, 'Settlement Report','true'); ?>