Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- Class Laporanpajak extends CI_Controller{
- function __construct() {
- parent::__construct();
- $this->load->library('pdf');
- }
- function index(){
- $pdf = new FPDF('L','cm','Legal', 'C');
- $pdf->AddPage();
- $pdf->SetFont('Helvetica','',14, 'C');
- $pdf->SetFont('Arial','B',12, 'C');
- $pdf->cell(33.5,2, 'LAPORAN',1,0,'C');
- $pdf->Ln();
- $pdf->SetFont('Arial','B',10, 'C');
- $pdf->Cell(6,1,'Tanggal',1,0, 'C');
- $pdf->Cell(7,1,'Nomor ',1,0, 'C');
- $pdf->Cell(7,1,'Nama ',1,0, 'C');
- $pdf->Cell(7,1,'Pendapatan ',1,1, 'C');
- $pdf->SetFont('Arial','',10, 'C');
- $pajak = $this->db->get('pajak')->result();
- $no=0;
- foreach ($pajak as $row){
- $pdf->Cell(6,1,$row->tanggal,1,0, 'C');
- $pdf->Cell(7,1,$row->nomor,1,0, 'C');
- $pdf->Cell(7,1,$row->nama,1,0, 'C');
- $pdf->Cell(7,1,'Rp.'.$row->pendapatan,1,1, 'C');
- }
- $pdf->cell(20,0.8, 'Total',1,0,'C');
- $pdf->cell(7,0.8, 'Rp.'.$row->pendapatan,1,0, 'C');
- $pdf->Ln();$no=0;
- $pdf->Ln();
- $pdf->SetFont('Helvetica','',12);
- $pdf->cell(0.5,0.5, 'Bidang Akutansi Dan Pelap. Keuangan');$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, "Drs.");$pdf->cell(7);
- $pdf->Output();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement