本文整理汇总了PHP中Employee::get_employees方法的典型用法代码示例。如果您正苦于以下问题:PHP Employee::get_employees方法的具体用法?PHP Employee::get_employees怎么用?PHP Employee::get_employees使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Employee
的用法示例。
在下文中一共展示了Employee::get_employees方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Employee
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(10, 3, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(0);
// set auto page breaks
$pdf->SetAutoPageBreak(false);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->setFontSubsetting(true);
$pdf->SetFont('', 'B', 10, '', true);
$obj = new Employee();
$company = $obj->get_company();
$pdf->SetTitle("{$company->name} - P9A");
$year = (int) $_GET['y'];
$employees = $obj->get_employees();
foreach ($employees as $emp) {
$id = $emp->id;
$basic = $emp->basic_pay;
$pdf->AddPage();
$year = (int) $_GET['y'];
$pdf->Image("../assets/img/kra2.png", 100);
$pdf->Ln(26);
$pdf->Cell(10, 5, "P9A");
$pdf->Cell(150, 5, "TAX DEDUCTION CARD YEAR {$year}", 0, 1, "R");
$pdf->SetFont('', '', 10);
$pdf->Cell(170, 5, 'Employer\'s Name: ' . $company->name);
$pdf->Cell(50, 5, 'Employer\'s PIN:');
for ($i = 0; $i < 11; ++$i) {
$pdf->Cell(5, 5, $company->kra_pin[$i], 1, 0, "C");
}
示例2: Employee
*
* Package Name: Makmesh Payroll (Kenya)
* File Name: home.php
*
*/
if (!isset($_SESSION['login'])) {
echo <<<MENDE
<script>
self.location = 'login.php';
</script>
MENDE;
}
$obj = new Employee();
$members = $obj->get_employees();
if (isset($_GET['id'])) {
$id = (int) $_GET['id'];
$meso = $obj->exclude($id);
$_SESSION['title'] = 'Employee Leave.';
$_SESSION['message'] = $meso;
echo <<<MENDE
<script>
\$(function () {
self.location = './';
});
</script>
MENDE;
}
示例3: array
$pdf->Cell(5, 5, $company->kra_pin[$i], 1, 0, "C");
}
$pdf->SetFont('', 'B');
$pdf->Ln();
$pdf->Cell(0, 10, "EMPLOYER'S NAME: {$company->name}", 0, 1);
$headers = array("EMPLOYEE'S PIN", 'EMPLOYEE\'S NAME', 'TOTAL EMOLUMENTS KSHS.', "PAYE DEDUCTED KSHS.");
$width = array(35, 55, 50, 35);
$pdf->SetFont("", 'B', 10);
$i = 0;
foreach ($headers as $head) {
$pdf->MultiCell($width[$i], 10, $head, 1, "L", false, 0);
++$i;
}
$pdf->Ln();
$pdf->SetFont('');
$items = $obj->get_employees();
$pdf->setColor('fill', 220, 220, 220);
$h = 6;
$te = $tt = 0;
foreach ($items as $item) {
$ge = $obj->get_emoluments($year, $item->id);
$emo = $tax = "";
if ($ge) {
$emo = number_format($ge->gross, 2);
$tax = number_format($ge->tax, 2);
}
$pdf->MultiCell($width[0], $h, $item->pin, 1, "L", false, 0);
$pdf->MultiCell($width[1], $h, "{$item->fname} {$item->mname} {$item->lname}", 1, "L", false, 0);
$pdf->MultiCell($width[2], $h, $emo, 1, "R", false, 0);
$pdf->MultiCell($width[3], $h, $tax, 1, "R");
}
示例4: foreach
<div class="col-lg-12">
<div class="modal fade" id="uiModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="H3">Add Allowance</h4>
</div>
<div class="modal-body">
<div class="form-group">
<label>Employee</label>
<select name="employee_id" class="form-control">
<?php
$deduction = $obj->get_employees();
foreach ($deduction as $row) {
echo "<option value='{$row->id}'>{$row->fname} {$row->mname} {$row->lname}</option>";
}
?>
</select>
</div>
<div class="form-group">
<label>Allowance</label>
<select name="allowance" class="form-control">
<?php
$allowance = $obj->allowance_list();
foreach ($allowance as $row) {
echo "<option value='{$row->name}'>{$row->name}</option>";
}