Gusraiii

index

Apr 1st, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.65 KB | None | 0 0
  1. <div class="container-fluid">
  2. <ol class="breadcrumb">
  3. <li class="breadcrumb-item">
  4. <a href="#">Barang</a>
  5. </li>
  6. <li class="breadcrumb-item active">Data Barang</li>
  7. </ol>
  8. <div class="card mb-3">
  9. <div class="card-header">
  10. <i class="fa fa-list"></i>Barang
  11. <?php echo anchor('Barang/tambah','Tambah Barang',array('class'=>'btn btn-primary')) ?>
  12. </div>
  13. <div class="card-body table-responsive">
  14. <div class="table-responsive">
  15. <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
  16. <thead>
  17. <tr>
  18. <th>No</th>
  19. <th>Nama Barang</th>
  20. <th>Harga Beli</th>
  21. <th>Harga Jual</th>
  22. <th>Stok</th>
  23. <th>Diskon</th>
  24. <th>Keterangan</th>
  25. <th>Aksi</th>
  26. </tr>
  27. </thead>
  28. <tfoot>
  29. <tr>
  30. <th>No</th>
  31. <th>Nama Barang</th>
  32. <th>Harga Beli</th>
  33. <th>Harga Jual</th>
  34. <th>Stok</th>
  35. <th>Diskon</th>
  36. <th>Keterangan</th>
  37. <th>Aksi</th>
  38. </tr>
  39. </tfoot>
  40. <tbody>
  41. <?php $no=1 ?>
  42. <?php foreach ($barang as $item) : ?>
  43. <?php $harga_beli=str_replace('.','',$item->harga_beli) ?>
  44. <?php $harga_jual=str_replace('.','',$item->harga_jual) ?>
  45. <tr>
  46. <td><?php echo $no ?></td>
  47. <td><?php echo $item->nama_barang ?></td>
  48. <td><?php echo "Rp.".number_format($harga_beli).",-" ?></td>
  49. <td><?php echo "Rp.".number_format($harga_jual).",-" ?></td>
  50. <td><?php echo $item->stok ?></td>
  51. <td><?php echo $item->diskon ?></td>
  52. <td><?php echo $item->keterangan ?></td>
  53. <td>
  54. <a href="<?php echo site_url('Barang/edit/'.$item->kd_barang) ?>" class="btn btn-sm btn-outline-secondary"
  55. style="padding-bottom: 0px; padding-top: 0px;">
  56. Edit
  57. <span class="btn-label btn-label-right"><i class="fa fa-edit"></i></span>
  58. </a>
  59. <?php echo form_open('Barang/hapus/'.$item->kd_barang) ?>
  60. <button type="submit" class="btn btn-sm btn-outline-danger" style="padding-bottom: 0px; padding-top: 0px;"
  61. onclick="return confirm('Anda Yakin Ingin Menghapus?');">
  62. Delete
  63. <span class="btn-label btn-label-right"><i class="fa fa-trash"></i></span>
  64. </button>
  65. <?php echo form_close() ?>
  66. </td>
  67. </tr>
  68. <?php $no++ ?>
  69. <?php endforeach; ?>
  70. </tbody>
  71. </table>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
Add Comment
Please, Sign In to add comment