Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- error_reporting(0);
- if (empty($_SESSION['username']) AND empty($_SESSION['passuser'])){
- include("login.php");
- }
- else
- {
- function FormatNoTrans($num) {
- $num = $num;
- switch (strlen($num)) {
- case 1 : $NoTrans = "0000".$num; break;
- case 2 : $NoTrans = "000".$num; break;
- case 3 : $NoTrans = "00".$num; break;
- case 4 : $NoTrans = "0".$num; break;
- default: $NoTrans = $num;
- }
- return $NoTrans;
- }
- include("koneksi.php");
- include_once "terbilang.php";
- $get = "SELECT
- b.TglMohon, b.denda_kp, b.denda_sk, b.total, b.retrib_kp, b.retrib_sk, b.thn_lewat_kp,
- b.thn_lewat_sk, b.bulan_lewat_sk, b.bulan_lewat_kp, b.persen_kp, b.persen_sk, b.kode_trayek,
- b.id_sk, b.id_kp, b.denda_kp,b.denda_sk, c.Pemilik, c.Alamat
- FROM
- tbl_data_nota b, tbl_data_pkb c
- WHERE
- b.id=$_GET[id] AND c.id=b.id_pkb";
- $exe= mysql_query($get);
- $jml= mysql_num_rows($exe);
- $show = mysql_fetch_array($exe);
- if ($show['id_sk']!=0){$sk=" SK ";}
- if ($show['id_kp']!=0){$kp=" KP ";}
- if ($show['denda_sk']!=0){$dendask=" SK ";}
- if ($show['denda_kp']!=0){$dendakp=" KP ";}
- if ($show['thn_lewat_kp']!=0) {$thn_lewat_kp=" KP ";}
- if ($show['thn_lewat_sk']!=0) {$thn_lewat_sk=" SK ";}
- $no_sk=FormatNoTrans($show[no_sk]);
- $no_kp=FormatNoTrans($show[id]);
- $dsk = $show['retrib_sk']*$show['persen_sk']/(100);
- $totaldsk = $dsk;
- $dkp = $show['retrib_kp']*$show['persen_kp']/(100);
- $totaldkp = $dkp;
- $sk = $show['retrib_sk']*$show['thn_lewat_sk'];
- $totalsk = $sk;
- $kp = $show['retrib_kp']*$show['thn_lewat_kp'];
- $totalkp = $kp;
- $total1 = $totalsk+$show['denda_sk'];
- $total2 = $totalkp+$show['denda_kp'];
- $total3 = $totalkp+$totalsk;
- $total4 = $show['denda_sk']+$show['denda_kp'];
- $total5 = $total1+$total2;
- $terbilang = toTerbilang($totalsk+$totalkp+$totaldsk+$totaldkp);
- include 'fpdf/fpdf.php';
- $pdf = new FPDF('L','cm','Legal');
- $pdf->AddPage();
- $pdf->SetFont('Arial','',10);
- $pdf->Cell('12', 1, '', 0, 0);
- $pdf->Cell('12', 1, '', 0, 0);
- $pdf->Cell('12', 1, '', 0, 1);
- $pdf->Cell('12', 2, '', 0, 0);
- $pdf->Cell('12', 2, " ".substr(tgl_indojam($show['TglMohon']), 3), 0, 0);
- $pdf->Cell('12', 2, '', 0, 1);
- $pdf->Cell('12', 1.5, " ".$show['Pemilik'], 0, 0);
- $pdf->Cell('12', 1.5, " ".$show['Alamat'], 0, 0);
- $pdf->Cell('12', 1.5, '', 0, 1);
- $pdf->Cell('1', 0.8, '', 0, 0);
- $pdf->Cell('5', 0.8, '', 0, 0);
- $pdf->Cell('3', 0.8, '', 0, 0);
- $pdf->Cell('6', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('5', 0.8, '', 0, 1);
- $pdf->Cell('1', 1.2, '', 0, 0);
- $pdf->Cell('5', 1.2, '', 0, 0);
- $pdf->Cell('3', 1.2, '', 0, 0);
- $pdf->Cell('6', 1.2, '', 0, 0);
- $pdf->Cell('4', 1.2, '', 0, 0);
- $pdf->Cell('4', 1.2, '', 0, 0);
- $pdf->Cell('4', 1.2, '', 0, 0);
- $pdf->Cell('4', 1.2, '', 0, 0);
- $pdf->Cell('5', 1.2, '', 0, 1);
- $pdf->Cell('1', 0.8, ' 1', 0, 0);
- $pdf->Cell('5', 0.8, ' IJIN TRAYEK LOKAL', 0, 0);
- $pdf->Cell('3', 0.8, ' 4.02.03.11.04', 0, 0);
- $pdf->Cell('6', 0.8, ' Perda No.10 Tahun 2012', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('5', 0.8, '', 0, 1);
- $pdf->Cell('1', 0.8, '', 0, 0);
- $pdf->Cell('5', 0.8, '', 0, 0);
- $pdf->Cell('3', 0.8, '', 0, 0);
- $pdf->Cell('6', 0.8, ' PERPANJANGAN KP', 0, 0);
- $pdf->Cell('4', 0.8, ' 1 Kendaraan', 0, 0);
- $pdf->Cell('4', 0.8, " ".$show['retrib_kp']." x " .$show['thn_lewat_kp']." Thn ", 0, 0);
- $pdf->Cell('4', 0.8, " ".$totalkp, 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('5', 0.8, " ".$totalkp, 0, 1);
- $pdf->Cell('1', 0.8, '', 0, 0);
- $pdf->Cell('5', 0.8, '', 0, 0);
- $pdf->Cell('3', 0.8, '', 0, 0);
- $pdf->Cell('6', 0.8, ' PERPANJANGAN SK', 0, 0);
- $pdf->Cell('4', 0.8, ' 1 Kendaraan', 0, 0);
- $pdf->Cell('4', 0.8, " ".$show['retrib_sk']." x " .$show['thn_lewat_sk']." Thn ", 0, 0);
- $pdf->Cell('4', 0.8, " ".$totalsk, 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('5', 0.8, " ".$totalsk, 0, 1);
- $pdf->Cell('1', 0.8, '', 0, 0);
- $pdf->Cell('5', 0.8, '', 0, 0);
- $pdf->Cell('3', 0.8, '', 0, 0);
- $pdf->Cell('6', 0.8, ' DENDA SK', 0, 0);
- $pdf->Cell('4', 0.8, " ".$show['bulan_lewat_sk']." Bulan ", 0, 0);
- $pdf->Cell('4', 0.8, " ".$show['retrib_sk']." x ".$show['persen_sk']." %", 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, " ".$totaldsk, 0, 0);
- $pdf->Cell('5', 0.8, " ".$totaldsk, 0, 1);
- $pdf->Cell('1', 0.8, '', 0, 0);
- $pdf->Cell('5', 0.8, '', 0, 0);
- $pdf->Cell('3', 0.8, '', 0, 0);
- $pdf->Cell('6', 0.8, ' DENDA KP', 0, 0);
- $pdf->Cell('4', 0.8, " ".$show['bulan_lewat_kp']." Bulan ", 0, 0);
- $pdf->Cell('4', 0.8, " ".$show['retrib_kp']." x ".$show['persen_kp']." %", 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, " ".$totaldkp, 0, 0);
- $pdf->Cell('5', 0.8, " ".$totaldkp, 0, 1);
- $pdf->Cell('1', 0.8, '', 0, 0);
- $pdf->Cell('5', 0.8, '', 0, 0);
- $pdf->Cell('3', 0.8, '', 0, 0);
- $pdf->Cell('6', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('5', 0.8, '', 0, 1);
- $pdf->Cell('1', 2, '', 0, 0);
- $pdf->Cell('5', 2, '', 0, 0);
- $pdf->Cell('3', 2, '', 0, 0);
- $pdf->Cell('6', 2, '', 0, 0);
- $pdf->Cell('4', 2, '', 0, 0);
- $pdf->Cell('4', 2, '', 0, 0);
- $pdf->Cell('4', 2, '', 0, 0);
- $pdf->Cell('4', 2, '', 0, 0);
- $pdf->Cell('5', 2, '', 0, 1);
- $pdf->Cell('1', 1.5, '', 0, 0);
- $pdf->Cell('5', 1.5, '', 0, 0);
- $pdf->Cell('3', 1.5, '', 0, 0);
- $pdf->Cell('6', 1.5, '', 0, 0);
- $pdf->Cell('4', 1.5, '', 0, 0);
- $pdf->Cell('4', 1.5, '', 0, 0);
- $pdf->Cell('4', 1.5, '', 0, 0);
- $pdf->Cell('4', 1.5, '', 0, 0);
- $pdf->Cell('5', 1.5, '', 0, 1);
- $pdf->Cell('1', 0.8, '', 0, 0);
- $pdf->Cell('5', 0.8, '', 0, 0);
- $pdf->Cell('3', 0.8, '', 0, 0);
- $pdf->Cell('6', 0.8, '', 0, 0);
- $pdf->Cell('5.5', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, ' ', 0, 0);
- $pdf->Cell('3', 0.8, "".$totalkp+$totalsk, 0, 0);
- $pdf->Cell('4', 0.8, "".$totaldkp+$totaldsk, 0, 0);
- $pdf->Cell('5', 0.8, ''.$totalsk+$totalkp+$totaldsk+$totaldkp, 0, 1);
- $pdf->Cell('1', 0.8, '', 0, 0);
- $pdf->Cell('5', 0.8, '', 0, 0);
- $pdf->Cell('3', 0.8, '', 0, 0);
- $pdf->Cell('6', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('5', 0.8, '', 0, 1);
- $pdf->Cell('1', 0.8, '', 0, 0);
- $pdf->Cell('5', 0.8, '', 0, 0);
- $pdf->Cell('30', 0.8, " ".$terbilang." RUPIAH " , 0, 1);
- $pdf->Cell('1', 0.8, '', 0, 0);
- $pdf->Cell('5', 0.8, '', 0, 0);
- $pdf->Cell('3', 0.8, '', 0, 0);
- $pdf->Cell('6', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('5', 0.8, '', 0, 1);
- $pdf->Cell('1', 0.8, '', 0, 0);
- $pdf->Cell('5', 0.8, '', 0, 0);
- $pdf->Cell('3', 0.8, '', 0, 0);
- $pdf->Cell('6', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, '', 0, 0);
- $pdf->Cell('4', 0.8, 'LILIS LISNAWATI', 0, 0);
- $pdf->Cell('5', 0.8, '', 0, 1);
- $pdf->Cell('1', 0.5, '', 0, 0);
- $pdf->Cell('5', 0.5, '', 0, 0);
- $pdf->Cell('3', 0.5, '', 0, 0);
- $pdf->Cell('6', 0.5, '', 0, 0);
- $pdf->Cell('4', 0.5, '', 0, 0);
- $pdf->Cell('4', 0.5, '', 0, 0);
- $pdf->Cell('4', 0.5, '', 0, 0);
- $pdf->Cell('4', 0.5, '', 0, 0);
- $pdf->Cell('5', 0.5, '', 0, 1);
- $pdf->Cell('1', 0.5, '', 0, 0);
- $pdf->Cell('5', 0.5, 'H.MARDANI, SE, M.Si', 0, 0);
- $pdf->Cell('3', 0.5, '', 0, 0);
- $pdf->Cell('6', 0.5, '', 0, 0);
- $pdf->Cell('4', 0.5, '', 0, 0);
- $pdf->Cell('4', 0.5, '', 0, 0);
- $pdf->Cell('4', 0.5, '', 0, 0);
- $pdf->Cell('4', 0.5, '', 0, 0);
- $pdf->Cell('5', 0.5, '', 0, 1);
- $pdf->Cell('1', 0.5, '', 0, 0);
- $pdf->Cell('5', 0.5, ' 19621101198409 1003', 0, 0);
- $pdf->Cell('3', 0.5, '', 0, 0);
- $pdf->Cell('6', 0.5, '', 0, 0);
- $pdf->Cell('4', 0.5, '', 0, 0);
- $pdf->Cell('4', 0.5, '', 0, 0);
- $pdf->Cell('4', 0.5, '', 0, 0);
- $pdf->Cell('4', 0.5, '', 0, 0);
- $pdf->Cell('5', 0.5, '', 0, 1);
- $pdf->Output();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement