Advertisement
Guest User

export_pdf_stock_taking.php

a guest
Jun 29th, 2015
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. <?php
  2. $this->fpdf->FPDF('P','cm','A4');
  3. $this->fpdf->SetMargins(1,1,1);
  4. $this->fpdf->AliasNbPages();
  5. $this->fpdf->AddPage();
  6. $this->fpdf->Ln();
  7.  
  8.  
  9. /* Logo */
  10. $this->fpdf->SetFont('Arial','I',8);
  11. $this->fpdf->Image('assets/img/logo2.gif',1,1,1.5);
  12. /* Logo */
  13.  
  14. $this->fpdf->setFont('Times','U',20);
  15. $this->fpdf->Text(6.5,1.5,'KARTU STOK INVENTORY');
  16. /* Fungsi Line untuk membuat garis */
  17. $this->fpdf->ln(2);
  18.  
  19. $i=0;
  20. foreach ($detail_export_pdf as $row)
  21. {
  22. $i++;
  23. $this->fpdf->setFont('Times','B',10);
  24. $this->fpdf->Cell(2.5,1,'Kode Barang',0,0,'L');
  25. $this->fpdf->Cell(0.5,1,':',0,0,'L');
  26. $this->fpdf->Cell(3,1,$row->kode_brg,0,1,'L');
  27. $this->fpdf->Cell(2.5,1,'Nama Barang',0,0,'L');
  28. $this->fpdf->Cell(0.5,1,':',0,0,'L');
  29. $this->fpdf->Cell(3,1,$row->nama_brg,0,1,'L');
  30. $this->fpdf->ln(0.5);
  31.  
  32. $this->fpdf->setFont('Times','B',10);
  33. $this->fpdf->Cell(1,1,'NO',1,0,'C');
  34. $this->fpdf->Cell(2.5,1,'Tanggal',1,0,'C');
  35. $this->fpdf->Cell(5,1,'Keterangan',1,0,'C');
  36. $this->fpdf->Cell(4,1,'PIC',1,0,'C');
  37. $this->fpdf->Cell(2,1,'Masuk',1,0,'C');
  38. $this->fpdf->Cell(2,1,'Keluar',1,0,'C');
  39. $this->fpdf->Cell(2,1,'Sisa',1,0,'C');
  40.  
  41. $this->fpdf->Ln(1);
  42. $this->fpdf->setFont('Times','',10);
  43. $this->fpdf->Cell(1,0.7,$i,1,0,'C');
  44. $this->fpdf->Cell(2.5,0.7,$row->tgl,1,0,'C');
  45. $this->fpdf->Cell(5,0.7,$row->keterangan,1,0,'C');
  46. $this->fpdf->Cell(4,0.7,$row->pic,1,0,'C');
  47. $this->fpdf->Cell(2,0.7,$row->jml_masuk,1,0,'C');
  48. $this->fpdf->Cell(2,0.7,$row->jml_keluar,1,0,'C');
  49. $this->fpdf->Cell(2,0.7,$row->sisa_stock,1,0,'C');
  50.  
  51. // Page footer
  52. $this->fpdf->SetY(-3);
  53. $this->fpdf->SetFont('Arial','I',8);
  54. // Page number
  55. $this->fpdf->Cell(0,0,'Page '.$this->fpdf->PageNo().'/{nb}',0,0,'C');
  56.  
  57. }
  58.  
  59. $this->fpdf->Output("Laporan-Data-Kartu-Stok-Inventory.pdf","I");
  60. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement