예제 #1
0
        $pdf->SetX($margin + $w1[0] + $w1[1] + $w1[2] + $w1[3] + $w1[4] * 4 + $w1[5] * 2);
        $pdf->Cell($w1[5], $ln, $arrTerima[$i], 'LR', 1, 'R');
    }
    if ($pdf->GetY() >= 180) {
        $pdf->Line($margin, $pdf->GetY(), $margin + $w1[0] + $w1[1] + $w1[2] + $w1[3] + $w1[4] * 4 + $w1[5] * 3, $pdf->GetY());
        $pdf->AddPage();
        $pdf->Line($margin, $pdf->GetY(), $margin + $w1[0] + $w1[1] + $w1[2] + $w1[3] + $w1[4] * 4 + $w1[5] * 3, $pdf->GetY());
    } else {
        $pdf->Line($margin, $pdf->GetY(), $margin + $w1[0] + $w1[1] + $w1[2] + $w1[3] + $w1[4] * 4 + $w1[5] * 3, $pdf->GetY());
    }
}
$pdf->Line($margin, $pdf->GetY(), $margin + $w1[0] + $w1[1] + $w1[2] + $w1[3] + $w1[4] + $w1[5] * 2, $pdf->GetY());
$pdf->SetFont($font, 'B', $size);
$pdf->SetX($margin);
$pdf->Cell($w1[0] + $w1[1], $ln * 2, 'Jumlah', 'LR', 0, 'C');
$pdf->Cell($w1[2], $ln * 2, jmlpeg_bulan($th, $kdbulan, $kdsatker), 'LR', 0, 'C');
$pdf->SetX($margin + $w1[0] + $w1[1] + $w1[2]);
$pdf->SetX($margin + $w1[0] + $w1[1] + $w1[2] + $w1[3]);
$pdf->Cell($w1[5], $ln * 2, number_format($total_tunker, "0", ",", "."), 'LR', 0, 'R');
$pdf->SetX($margin + $w1[0] + $w1[1] + $w1[2] + $w1[3] + $w1[5]);
$pdf->Cell($w1[4], $ln * 2, number_format($total_pajak, "0", ",", "."), 'LR', 0, 'R');
$pdf->SetX($margin + $w1[0] + $w1[1] + $w1[2] + $w1[3] + $w1[4] + $w1[5]);
$pdf->Cell($w1[5], $ln * 2, number_format($total_tunker + $total_pajak, "0", ",", "."), 'LR', 0, 'R');
$pdf->SetX($margin + $w1[0] + $w1[1] + $w1[2] + $w1[3] + $w1[4] + $w1[5] * 2);
$pdf->Cell($w1[4], $ln * 2, number_format($total_pajak, "0", ",", "."), 'LR', 0, 'R');
$pdf->SetX($margin + $w1[0] + $w1[1] + $w1[2] + $w1[3] + $w1[4] * 2 + $w1[5] * 2);
$pdf->Cell($w1[4], $ln * 2, number_format($total_tunker - $total_terima, "0", ",", "."), 'LR', 0, 'R');
$pdf->SetX($margin + $w1[0] + $w1[1] + $w1[2] + $w1[3] + $w1[4] * 3 + $w1[5] * 2);
$pdf->Cell($w1[4], $ln * 2, number_format($total_tunker - $total_terima + $total_pajak, "0", ",", "."), 'LR', 0, 'R');
$pdf->SetX($margin + $w1[0] + $w1[1] + $w1[2] + $w1[3] + $w1[4] * 4 + $w1[5] * 2);
$pdf->Cell($w1[5], $ln * 2, number_format($total_terima, "0", ",", "."), 'LR', 1, 'R');
예제 #2
0
 } else {
     $kdbulan = $j;
 }
 $oList = mysql_query("SELECT sum(tunker) as jml_tunker, sum(pajak_tunker) as jml_pajak, sum(nil_terima) as jml_terima FROM mst_tk WHERE tahun = '{$th}' and bulan = '{$kdbulan}' and kdsatker = '{$kdsatker}' GROUP BY bulan");
 $row = mysql_fetch_array($oList);
 $max = 0;
 $no += 1;
 $total_tunker += $row['jml_tunker'];
 $total_pajak += $row['jml_pajak'];
 $total_terima += $row['jml_terima'];
 if (jmlpeg_bulan($th, $kdbulan, $kdsatker) > $jml_peg) {
     $jml_peg = jmlpeg_bulan($th, $kdbulan, $kdsatker);
 }
 $arrNo = $pdf->SplitToArray($w1[0], $ln, $no . '.');
 $arrBulan = $pdf->SplitToArray($w1[1], $ln, strtoupper(nama_bulan($j)));
 $arrPenerima = $pdf->SplitToArray($w1[2], $ln, jmlpeg_bulan($th, $kdbulan, $kdsatker));
 $arrJmlTunker = $pdf->SplitToArray($w1[3], $ln, number_format($row['jml_tunker'], "0", ",", "."));
 $arrJmlPajak = $pdf->SplitToArray($w1[4], $ln, number_format($row['jml_pajak'], "0", ",", "."));
 $arrJumlah = $pdf->SplitToArray($w1[5], $ln, number_format($row['jml_tunker'] + $row['jml_pajak'], "0", ",", "."));
 $arrJmlPajak = $pdf->SplitToArray($w1[6], $ln, number_format($row['jml_pajak'], "0", ",", "."));
 $arrJmlTerima = $pdf->SplitToArray($w1[9], $ln, number_format($row['jml_terima'], "0", ",", "."));
 $arrJmlKurang = $pdf->SplitToArray($w1[7], $ln, number_format($row['jml_tunker'] - $row['jml_terima'], "0", ",", "."));
 $arrJmlPotong = $pdf->SplitToArray($w1[8], $ln, number_format($row['jml_tunker'] - $row['jml_terima'] + $row['jml_pajak'], "0", ",", "."));
 if ($max < count($arrBulan)) {
     $max = count($arrBulan);
 }
 for ($i = 0; $i < $max; $i++) {
     $pdf->SetX($margin);
     $pdf->Cell($w1[0], $ln, $arrNo[$i], 'LR', 0, 'C');
     $pdf->SetX($margin + $w1[0]);
     $pdf->Cell($w1[1], $ln, $arrBulan[$i], 'LR', 0, 'L');
예제 #3
0
    }
    $oList = mysql_query("SELECT kdsatker, sum(tunker) as jml_tunker, sum(pajak_tunker) as jml_pajak, sum(nil_terima) as jml_terima FROM {$table} WHERE tahun = '{$th}' and kdsatker = '{$kdsatker}' and bulan = '{$kdbulan}' GROUP BY bulan ");
    $List = mysql_fetch_array($oList);
    $col[0][] = $i;
    $col[1][] = jmlpeg_bulan($th, $kdbulan, $List['kdsatker']);
    $col[4][] = $List['jml_tunker'];
    $col[5][] = $List['jml_pajak'];
    $col[6][] = $List['jml_terima'];
    $col[7][] = $List['jml_tunker'] - $List['jml_terima'];
    $col[8][] = $List['jml_tunker'] - $List['jml_terima'] + $List['jml_pajak'];
    $total_tk += $List['jml_tunker'];
    $total_pj += $List['jml_pajak'];
    $total_trm += $List['jml_terima'];
    $total += jmlpeg_bulan($th, $kdbulan, $List['kdsatker']);
    if (jmlpeg_bulan($th, $kdbulan, $List['kdsatker']) > $jml_peg) {
        $jml_peg = jmlpeg_bulan($th, $kdbulan, $List['kdsatker']);
    }
}
// start export
header("Content-type: application/octet-stream");
$filename = "rapel_penerimaan_" . $kdsatker . "_" . $kdbulan1 . "_" . $kdbulan2 . ".xls";
header("Content-Disposition: attachment; filename=\"{$filename}\"");
header("Pragma: no-cache");
header("Expires: 0");
print "<b>";
print "<b>";
print "REKAPITULASI PENERIMAAN TUNJANGAN KINERJA PEGAWAI<br>";
$b1 = (int) $kdbulan1;
$b2 = (int) $kdbulan2;
print "BULAN " . strtoupper(nama_bulan($b1)) . " S/D " . strtoupper(nama_bulan($b2)) . " {$th}<br>";
print "SATUAN KERJA : " . strtoupper(nm_satker($kdsatker)) . "<br><br>";