?
Current Path : /home1/savoy/public_html/savoyglobal.net/eduplus2/application/views/hr/ |
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/eduplus2/application/views/hr/payslip_pdf.php |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); $html=''; $center_info = $this->mastermodel->search_nursery(); foreach ($center_info['results']->result_array() as $row) { $nursery_name = $row['nursery_name']; $nursery_address = $row['address']; $nursery_phone = $row['contact_no']; $nursery_email = $row['email']; $nursery_website = $row['website']; $nursery_logo = $row['logo']; } $html.= '<html> <table width="100%"> <tr> <td> <img src="'.base_url().'assets/logo/'.$nursery_logo.'" > </td> </tr> </table> <table width="100%"> <tr> <td style="text-align:left;">'.$nursery_name.', '.$nursery_address.'<br/>Tel: '.$nursery_phone.' ,Email: '.$nursery_email.', Website: '.$nursery_website.'</td> </tr> </table> <br/><br/><br/> <table width="100%" cellspacing="-1"> <tr> <td style="text-align:left;"><font><b>SALARY PAY-SLIP</b></font></td> <td style="text-align:right;"><b>' . $this->mastermodel->convertdatenormalformat($salpay->pay_date) . '</b></td> </tr> </table><br/><br/> <table width="100%" cellspacing="-1" > <tr> <td style="text-align:left;width:30%;"><b>Employee Name </b></td> <td style="width:25px">:</td> <td style="text-align:left;">' . $salpay->employee_name . '</td> </tr> <tr> <td style="text-align:left;width:30%;"><b>Employee No</b></td> <td style="width:25px">:</td> <td style="text-align:left;">' . $salpay->employee_no . '</td> </tr> <tr> <td style="text-align:left;width:30%;"><b>Designation </b></td> <td style="width:25px">:</td> <td style="text-align:left;">' . $salpay->designation_name . '</td> </tr> <tr> <td style="text-align:left;width:30%;"><b>Basic Salary </b></td> <td style="width:25px">:</td> <td style="text-align:left;">' . number_format($salpay->basic_salary) . '</td> </tr> </table><br/> <table width="100%" cellspacing="-1" > <tr> <td> <table border="1px" name="table3" cellspacing="-1" cellpadding="5px" width="100%"> <caption style="text-align:center;">ALLOWANCE / DEDUCTION DETAILS</caption> <tr border="1px"> <th align="center">Title</th> <th align="center">Mode</th> <th align="center">Amount/Percentage</th> <th align="center">Sub Total</th> <th align="center">Type</th> </tr>'; $i = 1; $tot_allowance = 0; $tot_deduct = 0; $dept = $this->mastermodel->get_data('allowdeduc', '1', 'allowdeduc_type'); $basicsalary = $salpay->basic_salary; foreach ($dept as $dep) { $amount_allowdeduc = $this->mastermodel->get_data_dual_srow('employee_salary_slip_allowdeduc', $dep['allowdeduc_id'], 'allowdeduc_id', $salpay->employee_salary_slip_id, 'employee_salary_slip_id'); if ($dep['allowdeduc_mode'] == 1) $mode = "Direct Amount"; else $mode = "Percentage"; if (!empty($amount_allowdeduc)) $allowdeduc_amount = $amount_allowdeduc->amount; else $allowdeduc_amount = 0; if ($dep['allowdeduc_mode'] == 0) $allototal = ($allowdeduc_amount / 100 ) * $basicsalary; else $allototal = $allowdeduc_amount; $tot_allowance+= $allototal; if($allowdeduc_amount>0) { $html.=' <tr> <td>' . $dep['allowdeduc_name'] . '</td> <td>' . $mode . '</td>'; $html.='<td align="right">' . $allowdeduc_amount; if ($dep['allowdeduc_mode'] == 0) $html.='%'; $html.=' </td> <td align="right">' . $allototal . '</td> <td>Allowance</td> </tr>'; $i++; } } $dept = $this->mastermodel->get_data('allowdeduc', '0', 'allowdeduc_type'); foreach ($dept as $dep) { $amount_allowdeduc = $this->mastermodel->get_data_dual_srow('employee_salary_slip_allowdeduc', $dep['allowdeduc_id'], 'allowdeduc_id', $salpay->employee_salary_slip_id, 'employee_salary_slip_id'); if ($dep['allowdeduc_mode'] == 1) $mode = "Direct Amount"; else $mode = "Percentage"; if (!empty($amount_allowdeduc)) $allowdeduc_amount = $amount_allowdeduc->amount; else $allowdeduc_amount = 0; if ($dep['allowdeduc_mode'] == 0) $dedtotal = ($allowdeduc_amount / 100) * $basicsalary; else $dedtotal = $allowdeduc_amount; $tot_deduct += $dedtotal; if($allowdeduc_amount>0) { $html.='<tr> <td>' . $dep['allowdeduc_name'] . '</td> <td> ' . $mode . ' </td> <td align="right" >' . $allowdeduc_amount; if ($dep['allowdeduc_mode'] == 0) $html.='%'; $html.='</td>'; $html.=' <td align="right">' . $dedtotal . '</td> <td>Deduction</td> </tr>'; $i++; } } $html.='</table> </td></tr><br/><br/><br/>'; $gross_salary = $basicsalary + $tot_allowance; $net_salary = $gross_salary - $tot_deduct; $html.=' <tr><td> <table border="1px" cellspacing="-1" cellpadding="5px" width="100%"> <caption>SALARY DETAILS</caption><br/><br/> <tr> <th>Allowance</th> <th>Deduction</th> </tr> <tr> <td align="right" >' . $tot_allowance . '</td> <td align="right" >' . $tot_deduct . '</td> </tr> <tr> <th>Gross Salary</th> <th>Net Salary</th> </tr> <tr> <td align="right" >' . $gross_salary . '</td> <td align="right" >' . $net_salary . '</td> </tr> </table></td></tr><br/><br/><br/>'; $html .='<tr><td><table width="100%"> <tr> <td colspan="2" style="text-align:right;"></td> </tr> <tr> <td style="text-align:left;"></td> <td></td> </tr> <tr> <td style="text-align:left;"></td>'; $html .='<td style="text-align:right"><strong>Authorized Signatory</strong></td>'; $html .='</tr> </table>'; //echo $html; pdf_create($html, $salpay->employee_no . " - Payslip"); ?>