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);
        $pdf->Cell(15 / 100 * $width, $height, $_SESSION['lang']['umr'], 1, 1, 'C', 1);
예제 #2
0
                         // detail
                         $pdf->SetFillColor(255, 255, 255);
                     } else {
                         // lori & tbs
                         $pdf->SetFillColor(255, 255, 255);
                         $jumlah = number_format($cont, 0);
                         if ($jumlah == 0) {
                             $jumlah = "";
                         }
                         $pdf->Cell($length[$i] / 100 * $width, $height, $jumlah, 1, 0, $align[$i], 1);
                     }
                 }
             }
             $i++;
         }
         $pdf->Ln();
     }
     $pdf->Output();
     break;
 default:
     # Redefine Align
     $alignPrev = array();
     foreach ($align as $key => $row) {
         switch ($row) {
             case 'L':
                 $alignPrev[$key] = 'left';
                 break;
             case 'R':
                 $alignPrev[$key] = 'right';
                 break;
             case 'C':
예제 #3
0
 $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;
     $awalY = $pdf->GetY();
     $pdf->SetY($awalY);
     $pdf->SetX(1000);
     $pdf->MultiCell($length[2] / 100 * $width, $height, $cont['keterangan'], 0, 'L');
     $akhirYKeterangan = $pdf->GetY();
     $pdf->SetY($awalY);
     $pdf->SetX(1000);
     $pdf->MultiCell($length[3] / 100 * $width, $height, $cont['km'], 0, 'C');