Example #1
0
    public function Footer()
    {
        $this->SetY(-15);
        $this->SetFont('helvetica', 'I', 8);
        $this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
    }
}
$pdf = new MYPDF('P', 'mm', 'A4', true, 'UTF-8', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(15, 10, 15);
$pdf->setPrintHeader(false);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->AddPage();
foreach (tampilData($stmt) as $grid) {
    $pdf->SetFont('helvetica', 'B', 9);
    $pdf->setXY(15, $pdf->getY(), true);
    $pdf->Cell(0, 0, 'SLIP KOMISI SALES', 0, 2, 'C', 0, '', '');
    $pdf->SetFont('helvetica', '', 7);
    $pdf->setXY(15, $pdf->getY(), true);
    $pdf->Cell(0, 0, 'PT. LUXINDO RAYA', 0, 2, 'C', 0, '', '');
    $pdf->SetFont('helvetica', 'B', 7);
    $pdf->setXY(15, $pdf->getY(), true);
    $pdf->MultiCell(15, 7, "NIS", 0, 'L', false, 0, '', '', false, 0, false, false, 7, 'M');
    $pdf->MultiCell(5, 7, ":", 0, 'L', false, 0, '', '', false, 0, false, false, '', 'M');
    $pdf->MultiCell(100, 7, $grid['nis'], 0, 'L', false, 0, '', '', false, 0, false, false, '', 'M');
    $pdf->MultiCell(18, 7, "Periode", 0, 'L', false, 0, '', '', false, 0, false, false, '', 'M');
    $pdf->MultiCell(5, 7, ":", 0, 'L', false, 0, '', '', false, 0, false, false, '', 'M');
    $pdf->MultiCell(45, 7, $begin . " s.d " . $end, 0, 'L', false, 1, '', '', false, 0, false, false, '', 'M');
    $pdf->setXY(15, $pdf->getY() - 2, true);
    $pdf->MultiCell(15, 7, "Nama", 0, 'L', false, 0, '', '', false, 0, false, false, 7, 'T');
    $pdf->MultiCell(5, 7, ":", 0, 'L', false, 0, '', '', false, 0, false, false, '', 'M');
$tbl .= "<td width=\"50\" align=\"center\"><b>" . gettext("mark") . "</b></td>";
$tbl .= "<td width=\"75\" align=\"center\"><b>" . gettext("points") . "</b></td>";
$tbl .= "<td width=\"60\" align=\"center\"><b>" . gettext("# no bonus") . "</b></td>";
$tbl .= "<td width=\"60\" align=\"center\"><b>" . gettext("# bonus") . "</b></td>";
$tbl .= "</tr>";
$tbl .= "</thead>";
foreach ($summary as $s) {
    $tbl .= "<tr align=\"center\">";
    $tbl .= "<td width=\"50\" align=\"center\">" . $s["mark"] . "</td>";
    $tbl .= "<td width=\"75\" align=\"center\">" . $s["from"] . " - " . $s["to"] . "</td>";
    $tbl .= "<td width=\"60\" align=\"center\">" . $s["countNoBonus"] . "</td>";
    $tbl .= "<td width=\"60\" align=\"center\">" . $s["countBonus"] . "</td>";
    $tbl .= "</tr>";
}
$tbl .= "</table>";
$pdf->setXY(60, 65);
$pdf->writeHTML($tbl, true, false, false, false, '');
// ----------------------------------------------------------------
$chart = new VerticalBarChart(800, 400);
$datasetNoBonus = new XYDataSet();
$datasetNoBonus->addPoint(new Point("1,0", $summary["10"]["countNoBonus"]));
$datasetNoBonus->addPoint(new Point("1,3", $summary["13"]["countNoBonus"]));
$datasetNoBonus->addPoint(new Point("1,7", $summary["17"]["countNoBonus"]));
$datasetNoBonus->addPoint(new Point("2,0", $summary["20"]["countNoBonus"]));
$datasetNoBonus->addPoint(new Point("2,3", $summary["23"]["countNoBonus"]));
$datasetNoBonus->addPoint(new Point("2,7", $summary["27"]["countNoBonus"]));
$datasetNoBonus->addPoint(new Point("3,0", $summary["30"]["countNoBonus"]));
$datasetNoBonus->addPoint(new Point("3,3", $summary["33"]["countNoBonus"]));
$datasetNoBonus->addPoint(new Point("3,7", $summary["37"]["countNoBonus"]));
$datasetNoBonus->addPoint(new Point("4,0", $summary["40"]["countNoBonus"]));
$datasetNoBonus->addPoint(new Point("5,0", $summary["50"]["countNoBonus"]));
Example #3
0
        $this->SetY(-15);
        $this->SetFont('helvetica', 'I', 8);
        $this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
    }
}
$pdf = new MYPDF('L', 'mm', 'A4', true, 'UTF-8', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(30, 70, 20);
$pdf->setPrintHeader(false);
$pdf->SetAutoPageBreak(TRUE, 15);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->AddPage();
$image_file = K_PATH_IMAGES . 'luxindo.jpg';
$pdf->Image($image_file, 5, 0, 40, '', 'JPG', '', 'M', false, 300, '', false, false, 0, false, false, false);
$pdf->SetFont('helvetica', 'B', 17);
$pdf->setXY(45, 18, true);
$pdf->Cell(0, 13, 'PT. Luxindo Raya', 0, 2, 'L', 0, '', '', 'D', 'B');
$pdf->SetFont('helvetica', 'B', 10);
$pdf->setXY(45, 18, true);
$pdf->Cell(0, 0, 'LAPORAN PENJUALAN', 0, 2, 'L', 0, '', '');
$pdf->SetFont('helvetica', '', 9);
$pdf->Cell(0, 0, 'Cabang ' . $dataCabang['kode'] . ' - ' . $dataCabang['nama_cabang'], 0, 1, 'L', 0, '');
$pdf->Line(14, 30, 280, 30);
$pdf->SetFont('helvetica', '', 7);
$pdf->setXY(15, 40);
$pdf->Cell(0, 0, 'Periode ' . $begin . ' - ' . $end, 0, 2, 'L', 0, '', '');
$pdf->SetFont('helvetica', 'B', 7);
$pdf->setXY(15, 45);
$pdf->MultiCell(10, 7, "No", 'TB', 'C', false, 0, '', '', false, 0, false, false, 7, 'M');
$pdf->MultiCell(15, 7, "No SO", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(20, 7, "Tgl SO", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
Example #4
0
        $this->SetY(-15);
        $this->SetFont('helvetica', 'I', 8);
        $this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
    }
}
$pdf = new MYPDF('P', 'mm', 'A4', true, 'UTF-8', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(30, 70, 20);
$pdf->setPrintHeader(false);
$pdf->SetAutoPageBreak(TRUE, 15);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->AddPage();
$image_file = K_PATH_IMAGES . 'luxindo.jpg';
$pdf->Image($image_file, 5, 0, 40, '', 'JPG', '', 'M', false, 300, '', false, false, 0, false, false, false);
$pdf->SetFont('helvetica', 'B', 17);
$pdf->setXY(45, 18, true);
$pdf->Cell(0, 13, 'PT. Luxindo Raya', 0, 2, 'L', 0, '', '', 'D', 'B');
$pdf->SetFont('helvetica', 'B', 10);
$pdf->setXY(45, 18, true);
$pdf->Cell(0, 0, 'LAPORAN KOMISI SALES', 0, 2, 'L', 0, '', '');
$pdf->SetFont('helvetica', '', 9);
$pdf->Cell(0, 0, 'Cabang ' . $dataCabang['kode'] . ' - ' . $dataCabang['nama_cabang'], 0, 1, 'L', 0, '');
$pdf->Line(14, 30, 195, 30);
$pdf->SetFont('helvetica', '', 7);
$pdf->setXY(15, 40);
$pdf->Cell(0, 0, 'Periode ' . $begin . ' - ' . $end, 0, 2, 'L', 0, '', '');
$pdf->SetFont('helvetica', 'B', 7);
$pdf->setXY(15, 45);
$pdf->MultiCell(10, 7, "No", 'TB', 'C', false, 0, '', '', false, 0, false, false, 7, 'M');
$pdf->MultiCell(30, 7, "NIS", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(60, 7, "Nama Sales", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');