?
Current Path : /home1/savoy/public_html/savoyglobal.net/horeitia/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/horeitia/application/views/Reports/test.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $salary_id = $this->mastermodel->get_employee_current_salary_id($report->emp_non_id); $trade_change = $this->mastermodel->get_data('trade_change',$report->emp_non_id,'employee_id'); $visa_details = $this->mastermodel->get_data('visa_processing',$report->emp_non_id,'employee_id'); $salary_details = $this->administrationmodel->get_employee_salary_info($report->emp_non_id); $html='<html><head><body>'; $html.='<link href="../../assets/css/tablesort.css" rel="stylesheet" type="text/css">'; $html.='<link href="../../assets/css/tablesortnew.css" rel="stylesheet" type="text/css">'; $religion_name=$this->mastermodel->getSingleFieldValue('religion','religion_name','religion_id',$report->emp_non_personal_religion_id); $emp_non_main=$this->mastermodel->get_data_srow('employee_non_main',$report->emp_non_id,'emp_non_id'); $html.='<table class="sortnew"> <tr> <th colspan="2" style="text-align: center">Joining Information</th> </tr> <tr> <td>Full name</td><td>'.$emp_non_main->emp_non_full_name.'</td> </tr> <tr> <td>Employee No</td><td>'.$emp_non_main->emp_non_no.'</td> </tr> <tr> <td>Date of Joining</td><td>'.$this->mastermodel->convertdatenormalformat($emp_non_main->emp_non_date_joining).'</td> </tr> <tr> <td>Nationality</td><td>'.$this->mastermodel->getSingleFieldValue('nationality','nationality_name','nationality_id',$emp_non_main->emp_non_nationality_id).'</td> </tr> <tr> <td>Sponsor</td> <td>'.$this->mastermodel->getSingleFieldValue('sponsor','sponsor_name','sponsor_id',$emp_non_main->emp_non_sponsor_id).'</td> </tr> <tr> <td>Recruitment Agency</td> <td>'.$this->mastermodel->getSingleFieldValue('agency','agency_name','agency_id',$emp_non_main->emp_non_agency_id).'</td> </tr> <tr> <td>Agreement (for business Visa)</td> <td>'.$emp_non_main->agreement_name.'</td> </tr> <tr> <td>Attestation (for RP along with No)</td> <td>'.$emp_non_main->attestment_name.'</td> </tr> </table>'; $html .= '<table class="sortnew"> <tr> <th colspan="2" style="text-align: center">Personal Information</th> </tr> <tr> <td>Father\'s Name</td><td>'.$report->emp_non_personal_father_name.'</td> </tr> <tr> <td>Religion</td><td>'.$religion_name.'</td> </tr> <tr> <td>Permanent Address</td><td>'.$report->emp_non_personal_permanent_address.'</td> </tr> <tr> <td>Contact Nos</td><td>'.$report->emp_non_personal_contact_no.'</td> </tr> <tr> <td>NOK Name</td><td>'.$report->emp_non_personal_nok_name.'</td> </tr> <tr> <td>NOK Contact No</td><td>'.$report->emp_non_personal_nok_contact_no.'</td> </tr> <tr> <td>First Vacation Due Date</td><td>'.$this->mastermodel->convertdatenormalformat($report->emp_non_personal_vacation_date).'</td> </tr> <tr> <td>Other trade Knowledge</td><td>'.$report->emp_non_personal_other_trade.'</td> </tr> </table>'; $html .= ' <table class="sort"> <caption>Visa Processing Details</caption> <tr> <th align="center">Visa Type</th> <th align="center">Issue Date</th> <th align="center">Expiry Date</th> <th align="center">Employee No</th> </tr>'; $i=1; foreach($visa_details as $visa) { $html.='<tr> <td> '.$this->mastermodel->getSingleFieldValue('visa_type','visa_type_name','visa_type_id',$visa['visa_type_id']).' </td> <td> '.$this->mastermodel->convertdatenormalformat($visa['visa_issue_date']).' </td> <td> '.$this->mastermodel->convertdatenormalformat($visa['visa_expiry_date']).' </td> <td> '.$visa['employee_no'].' </td> </tr>'; $i++; } $html.='</table>'; $html .='<table class="sort"> <caption>Trade Details</caption> <tr> <th align="center">Trade</th> <th align="center">Alloted Date</th> <th align="center">Remarks</th> </tr>'; $i=1; foreach($trade_change as $trade) { $html.='<tr> <td> '.$this->mastermodel->getSingleFieldValue('trade','trade_name','trade_id',$trade['trade_id']).' </td> <td> '.$this->mastermodel->convertdatenormalformat($trade['trade_change_date']).' </td> <td> '.$trade['remarks'].' </td> </tr>'; $i++; } $html.='</table>'; $camp_list = $this->onboardingmodel->get_joined_info('camp_allotment',$report->emp_non_id,'employee_id','camp','camp_id','camp_allotment_date'); $html.='<table class="sortnew"> <caption>Camp Allotment Details</caption> <tr> <th>Camp Name</th> <th>Alloted Date</th> </tr>'; foreach($camp_list as $camp) { $html.='<tr> <td>'.$camp['camp_name'].'</td> <td>'.$this->mastermodel->convertdatenormalformat($camp['camp_allotment_date']).'</td> </tr>'; } $html.='</table>'; $site_list = $this->onboardingmodel->get_joined_info('site_allotment',$report->emp_non_id,'employee_id','site','site_id','site_allotment_date'); $html.='<table class="sortnew"> <caption>Site Allotment Details</caption> <tr> <th>Site Name</th> <th>Alloted Date</th> </tr>'; foreach($site_list as $site) { $html.='<tr> <td>'.$site['site_name'].'</td> <td>'.$this->mastermodel->convertdatenormalformat($site['site_allotment_date']).'</td> </tr>'; } $html.='</table>'; $item_list = $this->onboardingmodel->get_joined_info('item_allotment',$report->emp_non_id,'employee_id','general_item','item_id','item_allotment_date'); $html.='<table class="sortnew"> <caption>Items Allotment Details</caption> <tr> <th>Items Name</th> <th>Alloted Date</th> <th>Replacement Date</th> </tr>'; foreach($item_list as $tool) { $html.='<tr> <td>'.$tool['item_name'].'</td> <td>'.$this->mastermodel->convertdatenormalformat($tool['item_allotment_date']).'</td> <td>'.$this->mastermodel->convertdatenormalformat($tool['item_allotment_expiry']).'</td> </tr>'; } $html.='</table>'; $tool_list = $this->onboardingmodel->get_joined_info('tool_allotment',$report->emp_non_id,'employee_id','tool_list','tool_id','tool_allotment_date'); $html.='<table class="sortnew"> <caption>Tool Allotment Details</caption> <tr> <th>Tool Name</th> <th>Alloted Date</th> <th>Replacement Date</th> </tr>'; foreach($tool_list as $tool) { if($tool['returned']==1) { $html.='<tr> <td>'.$tool['tool_name'].'</td> <td>'.$this->mastermodel->convertdatenormalformat($tool['tool_allotment_date']).'</td> <td>'.$this->mastermodel->convertdatenormalformat($tool['tool_allotment_expiry']).'</td> </tr>'; } } $html.='</table>'; $html.='<table class="sort"> <caption>Employee Salary Details</caption> <tr> <th align="center">WEF Date</th> <th align="center">Basic Salary</th> <th align="center" colspan="2">Allowances</th> <th align="center" colspan="2">Deductions</th> </tr>'; foreach($salary_details as $salary) { $html.='<tr> <td>'.$this->mastermodel->convertdatenormalformat($salary['salary_increment_date']).'</td> <td>'.$salary['salary_increment'].'</td>'; $allowance = explode('~', $salary['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>'.$allowance_name.'</td><td>'.$allowance_amount.'</td>'; $deduction= explode('~', $salary['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.='<td>'.$deduction_name.'</td><td>'.$deduction_amount.'</td> </tr>'; } $html.='</table> <br/>'; if($report->photo_doc != "") { $html.='<img src="'.base_url().'assets/uploads/'.$report->photo_doc.'"/>'; } $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, 'Employee Report','true'); ?>