ria/app/Views/employee_pdf_view.php

81 lines
3.2 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Employee Details</title>
<style>
body { font-family: Arial, sans-serif; font-size: 12px; }
.container { width: 100%; margin: 20px auto; }
table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }
th { background-color: #f2f2f2; }
.header { font-size: 18px; font-weight: bold; text-align: center; margin-bottom: 20px; }
</style>
</head>
<body>
<div class="container">
<div class="header">Employee Details</div>
<!-- Employee Personal Details -->
<table>
<tr>
<th>Employee ID</th> <td><?= $EmpDetails[0]->EmpID ?? '-' ?></td>
<th>Name</th> <td><?= $EmpDetails[0]->FirstName . ' ' . ($EmpDetails[0]->LastName ?? '') ?></td>
</tr>
<tr>
<th>Gender</th> <td><?= $EmpDetails[0]->Gender ?? '-' ?></td>
<th>Date of Birth</th> <td><?= date('d-m-Y', strtotime($EmpDetails[0]->DateofBirth ?? '')) ?></td>
</tr>
<tr>
<th>Contact Number</th> <td><?= $EmpDetails[0]->ContactNumber ?? '-' ?></td>
<th>Email</th> <td><?= $EmpDetails[0]->EmailId ?? '-' ?></td>
</tr>
<tr>
<th>Department</th> <td><?= $EmpDetails[0]->DepartmentName ?? '-' ?></td>
<th>Designation</th> <td><?= $EmpDetails[0]->Designation ?? '-' ?></td>
</tr>
<tr>
<th>Date of Joining</th> <td><?= date('d-m-Y', strtotime($EmpDetails[0]->DateofJoining ?? '')) ?></td>
<th>Marital Status</th> <td><?= $EmpDetails[0]->MartialStatus ?? '-' ?></td>
</tr>
<tr>
<th>Blood Group</th> <td><?= $EmpDetails[0]->BloodGroup ?? '-' ?></td>
<th>Father's Name</th> <td><?= $EmpDetails[0]->FatherName ?? '-' ?></td>
</tr>
<tr>
<th>Aadhar No</th> <td><?= $EmpDetails[0]->AadharNo ?? '-' ?></td>
<th>PAN No</th> <td><?= $EmpDetails[0]->PANNo ?? '-' ?></td>
</tr>
<tr>
<th>Present Address</th> <td colspan="3"><?= $EmpDetails[0]->PresentAddress ?? '-' ?></td>
</tr>
<tr>
<th>Permanent Address</th> <td colspan="3"><?= $EmpDetails[0]->PermanentAddress ?? '-' ?></td>
</tr>
</table>
<!-- Employee Salary Details -->
<div class="header">Salary Details</div>
<table>
<tr>
<th>Basic Pay</th> <td><?= number_format($empPay->Basic_Pay ?? 0, 2) ?></td>
<th>HRA Amount</th> <td><?= number_format($empPay->HRA_Amount ?? 0, 2) ?></td>
</tr>
<tr>
<th>HRA Rate</th> <td><?= number_format($empPay->HRA_Rate ?? 0, 2) ?>%</td>
<th>PF Rate</th> <td><?= number_format($empPay->PF_Rate ?? 0, 2) ?>%</td>
</tr>
<tr>
<th>ESI Rate</th> <td><?= number_format($empPay->ESI_Rate ?? 0, 2) ?>%</td>
<th>Total Salary</th> <td><strong><?= number_format($empPay->TotalSalary ?? 0, 2) ?></strong></td>
</tr>
</table>
</div>
</body>
</html>