예제 #1
0
}
switch ($mode) {
    case 'pdf':
        /** Report Prep **/
        $colPdf = explode(',', $cols2e);
        $title = $_SESSION['lang']['pabrik'] . " " . $kodeorg;
        $length = explode(",", "10,10,10,10,10,10,10,10");
        $colPdf[6] = "CPO (Kg)";
        $colPdf[7] = "Kernel (Kg)";
        $pdf = new zPdfMaster('L', 'pt', 'A4');
        $pdf->setAttr1($title, $align, $length, $colPdf);
        $width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
        $height = 12;
        $pdf->AddPage();
        $pdf->SetFillColor(255, 255, 255);
        $pdf->SetFont('Arial', '', 9);
        # Content
        $pdf->SetFont('Arial', '', 9);
        $j = 0;
        foreach ($data as $key => $row) {
            $i = 0;
            $j += 1;
            // nomor baris
            $pdf->Cell($length[$i] / 100 * $width, $height, $j, 1, 0, $align[$i], 1);
            foreach ($row as $head => $cont) {
                if ($i == 0) {
                    // tanggal
                    $tanggal = $cont;
                    $qwe = date('D', strtotime($tanggal));
                    if ($qwe == 'Sun') {
                        $pdf->SetFillColor(255, 192, 192);
        echo "Error : Atribut not Defined";
        exit;
        break;
}
$titleDetail = array($_SESSION['lang']['prestasi'], $_SESSION['lang']['absensi'], $_SESSION['lang']['material']);
/** Output Format **/
switch ($proses) {
    case 'pdf':
        $pdf = new zPdfMaster('P', 'pt', 'A4');
        $pdf->_noThead = true;
        $pdf->setAttr1($title, $align, $length, array());
        $width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
        $height = 12;
        $pdf->AddPage();
        $pdf->SetFillColor(255, 255, 255);
        $pdf->SetFont('Arial', 'B', 9);
        $pdf->Ln();
        $pdf->Cell($width, $height, $_SESSION['lang']['notransaksi'] . " : " . $param['notransaksi'], 0, 1, 'L', 1);
        //'tanggal,kodekegiatan,a.kodeorg,hasilkerja,jumlahhk,upahkerja,upahpremi,umr';
        $sPres = "select distinct sum(a.insentif) as upahpremi, sum(a.umr) as umr,sum(a.jhk) as jumlahhk,kodekegiatan,\r\n                tanggal,b.kodeorg,b.hasilkerja from " . $dbname . ".kebun_kehadiran a left join " . $dbname . ".kebun_prestasi b on a.notransaksi=b.notransaksi\r\n                left join " . $dbname . ".kebun_aktifitas c on a.notransaksi=c.notransaksi where a.notransaksi='" . $param['notransaksi'] . "' group by a.notransaksi";
        $pdf->Ln();
        $pdf->SetFont('Arial', 'B', 8);
        $pdf->Cell($width, $height, $titleDetail[0], 0, 1, 'L', 1);
        $pdf->SetFillColor(220, 220, 220);
        $pdf->SetFont('Arial', 'B', 8);
        $pdf->Cell(10 / 100 * $width, $height, $_SESSION['lang']['tanggal'], 1, 0, 'C', 1);
        $pdf->Cell(25 / 100 * $width, $height, $_SESSION['lang']['kodekegiatan'], 1, 0, 'C', 1);
        $pdf->Cell(13 / 100 * $width, $height, $_SESSION['lang']['kodeorg'], 1, 0, 'C', 1);
        $pdf->Cell(10 / 100 * $width, $height, $_SESSION['lang']['hasilkerjad'], 1, 0, 'C', 1);
        $pdf->Cell(6 / 100 * $width, $height, $_SESSION['lang']['satuan'], 1, 0, 'C', 1);
        $pdf->Cell(15 / 100 * $width, $height, $_SESSION['lang']['upahpremi'], 1, 0, 'C', 1);
예제 #3
0
        }
        break;
    default:
}
# Mode
switch ($mode) {
    case 'pdf':
        /** Report Prep **/
        $colsNew = 'noakun,namaakun,keterangan,debet,kredit,nodok';
        $colPdf = explode(',', $colsNew);
        $title = $_SESSION['lang']['nojurnal'] . ": " . $nojurnal;
        $title .= " " . $_SESSION['lang']['noreferensi'] . ": " . $noref;
        $align = explode(",", "L,L,L,R,R,L");
        $length = explode(",", "7,25,38,8,8,13");
        $pdf = new zPdfMaster('L', 'pt', 'A4');
        $pdf->SetFont('Arial', '', 8);
        $pdf->setAttr1($title, $align, $length, $colPdf);
        $width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
        $height = 12;
        $pdf->AddPage();
        $pdf->SetFillColor(255, 255, 255);
        foreach ($data as $row) {
            $i = 0;
            $awalY = $pdf->GetY();
            $awalX = $pdf->GetX();
            $currentX = $pdf->GetX();
            $pdf->SetY($awalY);
            $pdf->SetX($currentX);
            $pdf->MultiCell($length[0] / 100 * $width, $height, $row['noakun'], '0', $align[0]);
            $pdf->SetY($awalY);
            $pdf->SetX($currentX + $length[0] / 100 * $width);
예제 #4
0
 case 'pdf':
     /** Report Prep **/
     # Options
     $optJab = makeOption($dbname, 'sdm_5jabatan', 'kodejabatan,namajabatan', "kodejabatan='" . $_SESSION['empl']['kodejabatan'] . "'");
     $colPdf = array('nourut', 'tanggal', 'keterangan', 'kasmasuk', 'penerimaan', 'kaskeluar', 'pengeluaran');
     $title = $_SESSION['lang']['kasharian'];
     $length = explode(",", "5,12,35,10,14,10,14");
     $pdf = new zPdfMaster('P', 'pt', 'A4');
     $pdf->setAttr1($title, $align, $length, $colPdf);
     $pdf->_finReport = true;
     $width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
     $height = 12;
     $pdf->AddPage();
     $pdf->SetFillColor(255, 255, 255);
     # Saldo Awal
     $pdf->SetFont('Arial', 'B', 9);
     $pdf->Cell($length[0] / 100 * $width, $height, '', 'TLR', 0, 'C', 1);
     $pdf->Cell($length[1] / 100 * $width, $height, '', 'TLR', 0, 'C', 1);
     $pdf->Cell($length[2] / 100 * $width, $height, 'Saldo Awal ' . $periode1, 'TLR', 0, 'C', 1);
     $pdf->Cell($length[3] / 100 * $width, $height, '', 'TLR', 0, 'R', 1);
     $pdf->Cell($length[4] / 100 * $width, $height, $saldoAwal, 'TLR', 0, 'R', 1);
     $pdf->Cell($length[5] / 100 * $width, $height, '', 'TLR', 0, 'R', 1);
     $pdf->Cell($length[6] / 100 * $width, $height, '', 'TLR', 0, 'R', 1);
     $pdf->Ln();
     # Content
     $pdf->SetFont('Arial', '', 9);
     // foreach($dataShow as $key=>$row) {
     // $i=0;
     foreach ($dataShow as $head => $cont) {
         $nourut += 1;
         $height = 12;