43 lines
2.1 KiB
PHP
43 lines
2.1 KiB
PHP
<?= $this->extend('layout/management_layout') ?>
|
|
<?= $this->section('content') ?>
|
|
<div class="container-fluid">
|
|
<div class="wrapper">
|
|
<div class="content"></div>
|
|
<h1>Payroll Management</h1>
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Employee Name</th>
|
|
<th>Position</th>
|
|
<th>Salary</th>
|
|
<th>Pay Date</th>
|
|
<th>Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
// Example data - in a real scenario, this will be fetched from the database
|
|
$payrolls = [
|
|
['name' => 'John Doe', 'position' => 'Teacher', 'salary' => '$3000', 'pay_date' => '2024-07-01', 'status' => 'Paid'],
|
|
['name' => 'Jane Smith', 'position' => 'administrator Assistant', 'salary' => '$2500', 'pay_date' => '2024-07-01', 'status' => 'Paid'],
|
|
['name' => 'Sam Brown', 'position' => 'Principal', 'salary' => '$5000', 'pay_date' => '2024-07-01', 'status' => 'Pending'],
|
|
// Add more payroll records as needed
|
|
];
|
|
|
|
foreach ($payrolls as $payroll) {
|
|
$dateDisp = !empty($payroll['pay_date']) ? local_date($payroll['pay_date'], 'm-d-Y') : '';
|
|
echo "<tr>
|
|
<td>{$payroll['name']}</td>
|
|
<td>{$payroll['position']}</td>
|
|
<td>{$payroll['salary']}</td>
|
|
<td>" . esc($dateDisp) . "</td>
|
|
<td>{$payroll['status']}</td>
|
|
</tr>";
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<?= $this->endSection() ?>
|