public static function EmployeeOvertime() { $statement = TransactionVouchers::PayrollCategoryReport($_GET['sid'], $_GET['month'], 'Overtime'); $employee = Employee::GetEmployee($_GET['sid']); echo ' <div class="logo"> <h5 style="margin-bottom:-15px;margin-top:0px;font-size:14px;">Date: ' . date('d/m/Y') . '</h5> <h4>OVERTIME: ' . $employee->name . '</h4> <h5 style="margin-top:-10px">Month: ' . $_GET['month'] . '</h5>'; echo '</div> <table class="table table-bordered table-striped" style="text-align:center;margin-left:0;margin-right:0;width:760px;font-size:12px;"> <thead class="title"> <tr> <td>DATE</td> <td>HOURS</td> <td>RATE</td> <td>AMOUNT</td> <td>DESCRIPTION</td> </tr> </thead> <tbody>'; $tot = 0.0; foreach ($statement as $item) { $tot += $item['amount']; echo '<tr> <td style="width:90px">' . $item['datetime'] . '</td> <td style="width: 100px">' . $item['qty'] . '</td> <td style="width: 100px"><script>document.writeln((' . $item['rate'] . ').formatMoney(2, \'.\', \',\'));</script></td> <td style="width: 100px"><script>document.writeln((' . $item['amount'] . ').formatMoney(2, \'.\', \',\'));</script></td> <td style="max-width: 220px;">' . $item['description'] . '</td> </tr>'; } echo '</tbody> </table> <div class="logo"> <p style="margin: 5px 0 0 5px">Total Advances: <b>Ksh. <script>document.writeln((' . $tot . ').formatMoney(2, \'.\', \',\'));</script></b></p> </div>'; }
public function getEmployee($id) { if ($this->validateAdmin()) { echo json_encode(Employee::GetEmployee($id)); } else { echo 0; } }
function __construct($id, $uname, $role, $category, $pid, $access) { $this->id = $id; $this->username = $uname; $this->access = $access; $this->role = Role::GetRole(intval($role)); if ($category == "Employee") { $this->record = Employee::GetEmployee($pid); } if ($category == "Vendor") { $this->record = SystemVendor::GetVendor(); } }
function __construct($id, $voucherId, $claimantId, $description, $ledgerId, $claimed, $adjusted) { $this->id = $id; $this->claimant = Employee::GetEmployee($claimantId); $this->voucherId = $voucherId; $this->description = $description; $this->ledger = Ledger::GetLedger($ledgerId); $this->claimed = $claimed; $this->adjusted = $adjusted; }
public static function GetUncleared($empid) { $results = []; try { $sql = 'SELECT * FROM payslips WHERE party_id = ' . $empid . ' AND status != 2'; $entries = DatabaseHandler::GetAll($sql); foreach ($entries as $entry) { $slip = new PaySlip(Employee::GetEmployee($entry['party_id']), $entry['month'], $entry['paid']); $slip->populate($entry['id']); $results[] = $slip; } return $results; } catch (Exception $e) { return false; } }