コード例 #1
0
ファイル: p9a.php プロジェクト: Kelvinco/payroll
$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
0
ファイル: home.php プロジェクト: Kelvinco/payroll
 *
 * 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
0
ファイル: p10a.php プロジェクト: Kelvinco/payroll
    $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
0
ファイル: _allowance.php プロジェクト: Kelvinco/payroll
        <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">&times;</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>";
    }