sigitsuryono25

detail-data

Mar 31st, 2020
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.28 KB | None | 0 0
  1. <div class="container p-4">
  2. <div class="mb-4 text-right">
  3. <a href="javascript:void(0)" id="printPageButton" onclick='return printDiv("printableArea")' class="btn btn-sm btn-primary shadow-sm">
  4. <i class="fas fa-download fa-sm text-white-50"></i>
  5. Cetak Laporan
  6. </a>
  7. </div>
  8. <div class="printableArea">
  9. <h1 class="h3 mb-0 text-gray-800 mb-3">Data Anggaran<br>
  10. <small>
  11. Bulan <?php echo $this->anggaran->getBulanById($_GET['select-bulan'])->row()->nama_bulan ?>
  12. <?php echo $_GET['tahun'] ?>
  13. </small>
  14. </h1>
  15. <div class="row">
  16. <?php
  17. $pos = $this->anggaran->getPos($_GET['select-kategori'])->result();
  18. foreach ($pos as $p) {
  19. $data = $this->db->query("SELECT * FROM tbl_anggaran "
  20. . "INNER JOIN tbl_detail_anggaran "
  21. . "ON tbl_anggaran.id_anggaran=tbl_detail_anggaran.id_anggaran "
  22. . "INNER JOIN tbl_pos "
  23. . "ON tbl_detail_anggaran.id_pos=tbl_pos.id_pos "
  24. . "INNER JOIN tbl_kategori "
  25. . "ON tbl_pos.id_kategori=tbl_kategori.id_kategori "
  26. . "WHERE tbl_anggaran.tahun='" . $_GET['tahun'] . "' "
  27. . "AND tbl_anggaran.id_klien='" . $_GET['id-klien'] . "' "
  28. . "AND tbl_pos.id_kategori='" . $_GET['select-kategori'] . "' "
  29. . "AND tbl_pos.id_pos='$p->id_pos' "
  30. . "AND id_bulan='" . $_GET['select-bulan'] . "'");
  31. if ($data->num_rows() > 0) {
  32. ?>
  33. <div class="col-xl-12 col-lg-12">
  34. <div class="card mb-4">
  35. <div class="card-body">
  36. <div class="form-group">
  37. <label><?php echo $p->nama_pos ?></label>
  38. <div class="table-responsive">
  39. <table class="table table-bordered" id="detail-anggaran">
  40. <thead>
  41. <tr>
  42. <th>#</th>
  43. <th>Uraian</th>
  44. <th>Volume</th>
  45. <th>Satuan</th>
  46. <th>Harga Satuan</th>
  47. <th>Pengeluaran</th>
  48. </tr>
  49. </thead>
  50. <tbody>
  51. <?php foreach ($data->result() as $key => $value) {
  52. ?>
  53. <tr>
  54. <td><?php echo $key + 1 ?></td>
  55. <td>
  56. <input type="text" value="<?php echo $value->uraian ?>" name="uraian[]" class="form-control-plaintext" readonly/>
  57. </td>
  58. <td>
  59. <input type="number" name="volume[]" value="<?php echo $value->volume ?>" class="form-control-plaintext" readonly/>
  60. </td>
  61. <td>
  62. <input type="text" name="satuan[]" value="<?php echo $value->satuan ?>" class="form-control-plaintext text-capitalize" readonly/>
  63. </td>
  64. <td>
  65. <input type="number" name="harga-satuan[]" value="<?php echo $this->etc->rps($value->harga_satuan) ?>" class="form-control-plaintext" readonly/>
  66. </td>
  67. <td>
  68. <input type="number" name="pengeluaran[]" value="<?php echo $this->etc->rps($value->harga_satuan*$value->volume) ?>"class="form-control-plaintext" readonly/>
  69. </td>
  70. </tr>
  71. <?php
  72. }
  73. ?>
  74. </tbody>
  75. </table>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. <?php
  82. }
  83. }
  84. ?>
  85. </div>
  86. </div>
  87. </div>
Advertisement
Add Comment
Please, Sign In to add comment