Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $this->fpdf->FPDF('P','cm','A4');
- $this->fpdf->SetMargins(1,1,1);
- $this->fpdf->AliasNbPages();
- $this->fpdf->AddPage();
- $this->fpdf->Ln();
- /* Logo */
- $this->fpdf->SetFont('Arial','I',8);
- $this->fpdf->Image('assets/img/logo2.gif',1,1,1.5);
- /* Logo */
- $this->fpdf->setFont('Times','U',20);
- $this->fpdf->Text(6.5,1.5,'KARTU STOK INVENTORY');
- /* Fungsi Line untuk membuat garis */
- $this->fpdf->ln(2);
- $i=0;
- foreach ($detail_export_pdf as $row)
- {
- $i++;
- $this->fpdf->setFont('Times','B',10);
- $this->fpdf->Cell(2.5,1,'Kode Barang',0,0,'L');
- $this->fpdf->Cell(0.5,1,':',0,0,'L');
- $this->fpdf->Cell(3,1,$row->kode_brg,0,1,'L');
- $this->fpdf->Cell(2.5,1,'Nama Barang',0,0,'L');
- $this->fpdf->Cell(0.5,1,':',0,0,'L');
- $this->fpdf->Cell(3,1,$row->nama_brg,0,1,'L');
- $this->fpdf->ln(0.5);
- $this->fpdf->setFont('Times','B',10);
- $this->fpdf->Cell(1,1,'NO',1,0,'C');
- $this->fpdf->Cell(2.5,1,'Tanggal',1,0,'C');
- $this->fpdf->Cell(5,1,'Keterangan',1,0,'C');
- $this->fpdf->Cell(4,1,'PIC',1,0,'C');
- $this->fpdf->Cell(2,1,'Masuk',1,0,'C');
- $this->fpdf->Cell(2,1,'Keluar',1,0,'C');
- $this->fpdf->Cell(2,1,'Sisa',1,0,'C');
- $this->fpdf->Ln(1);
- $this->fpdf->setFont('Times','',10);
- $this->fpdf->Cell(1,0.7,$i,1,0,'C');
- $this->fpdf->Cell(2.5,0.7,$row->tgl,1,0,'C');
- $this->fpdf->Cell(5,0.7,$row->keterangan,1,0,'C');
- $this->fpdf->Cell(4,0.7,$row->pic,1,0,'C');
- $this->fpdf->Cell(2,0.7,$row->jml_masuk,1,0,'C');
- $this->fpdf->Cell(2,0.7,$row->jml_keluar,1,0,'C');
- $this->fpdf->Cell(2,0.7,$row->sisa_stock,1,0,'C');
- // Page footer
- $this->fpdf->SetY(-3);
- $this->fpdf->SetFont('Arial','I',8);
- // Page number
- $this->fpdf->Cell(0,0,'Page '.$this->fpdf->PageNo().'/{nb}',0,0,'C');
- }
- $this->fpdf->Output("Laporan-Data-Kartu-Stok-Inventory.pdf","I");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement