Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include ('fpdf181/fpdf.php');
- include ('konek.php');
- $nonota=$_POST["nonota"];
- $pdf = new FPDF('L','cm','Legal');
- $pdf->AddPage();
- $pdf->SetFont('Helvetica','',14);
- $pdf->SetFontSize(10);
- $pdf->SetFont('Helvetica','B',12);
- $pdf->cell(33.5,2, '',1,0,'C');
- $pdf->Ln();
- $pdf->cell(33.5,1, '',1,0,'C');
- $pdf->Ln();
- $nonota=$_GET['nonota'];
- $query=mysql_query("select detailpenjualan.nonota, penjualan.nama_pelanggan, penjualan.alamat, penjualan.npwp, penjualan.nonota,detailpenjualan.kode,tblbarang.nama,detailpenjualan.diskon,
- detailpenjualan.harga,detailpenjualan.jumlah,detailpenjualan.subtotal
- from detailpenjualan,penjualan,tblbarang
- where penjualan.nonota=detailpenjualan.nonota and tblbarang.kode=detailpenjualan.kode
- and detailpenjualan.nonota='$nota'");
- $nomor=mysql_fetch_array(mysql_query("select * from penjualan where nonota='$nota'"));
- while($data=mysql_fetch_array($query)){ $no++;
- $pdf->cell(1,1, $no.'.',1,0,'C');
- $pdf->cell(4.5,1, $data['nonota'],1, 'C');
- $pdf->cell(4.5,1, $data['kode'],1, 'C');
- $pdf->cell(5,1, $data['nama'],1, 'C');
- $pdf->cell(6,1, $data['harga'],1, 'C');
- $pdf->cell(5,1, $data['jumlah'],1, 'C');
- $pdf->cell(6,1, $data['diskon'],1, 'C');
- $pdf->Ln();
- }
- $pdf->Ln();$no=0;
- $pdf->Ln();
- $pdf->SetFont('Helvetica','',12);
- $pdf->cell(0.5,0.5, 'Pimpinan');$pdf->cell(7);
- $pdf->cell(0.5,0.5, '');$pdf->cell(7);
- $pdf->cell(0.5,0.5, '');$pdf->cell(4);$pdf->Ln(1.5);$pdf->Ln(1.5);
- $pdf->cell(0.5,0.5, nama_pimpinan);$pdf->cell(7);
- $pdf->SetFont('Helvetica','BU',12);
- $pdf->Output();
- exit;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement