<div class="row">
    <!-- begin col-8 -->
    <div class="col-sm-12">
        <!-- begin panel -->
        <div class="panel panel-grey">
            <div class="panel-heading">
                <div class="panel-heading-btn">
                    <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-grey" data-click="panel-expand"><i class="fa fa-expand"></i></a>
                    <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-grey" data-click="panel-remove"><i class="fa fa-times"></i></a>
                </div>
                <div class="row">
                  <?php if(in_array($idGroup, array('1','6'))) { ?>
                  <div class="col-sm-2">
                    <a href="<?php echo site_url('inventaris/bahan_habis_pakai/create_edit'); ?>" class="btn btn-primary">Tambah Data</a>
                    <hr>
                  </div>
                <?php } else{?>
                  <div class="col-sm-2">
                    <button class="btn btn-grey"></button>
                    <hr>
                  </div>
                <?php } ?>
                  <div class="col-sm-3">
                    <form>
                      <!-- <input class="form-control"> -->
                    </form>
                  </div>
                </div>
            </div>
            <div class="panel panel-body">
                <div class="table-responsive">
                    <table class="table table-hover table-bordered table-striped">
                        <thead>
                            <tr>
                                <th rowspan="2" class="text-center">No.</th>
                                <th rowspan="2" class="text-center">Aksi</th>
                                <th rowspan="2" class="text-center">Nama Barang</th>
                                <th rowspan="2" class="text-center">Merek</th>
                                <th rowspan="2" class="text-center">Spesifikasi</th>
                                <th colspan="2" class="text-center">Stok</th>
                                <th colspan="2" class="text-center">Pengambilan</th>
                                <th colspan="2" class="text-center">Sisa</th>
                            </tr>
                            <tr>
                              <th>Jumlah</th>
                              <th>satuan</th>
                              <th>Jumlah</th>
                              <th>satuan</th>
                              <th>Jumlah</th>
                              <th>satuan</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $i=1; foreach($data as $r) { ?>
                            <tr class="<?php //echo $bctr; ?>">
                                <td class='text-center'><?php echo $this->uri->segment(4) + $i++ ?></td>
                                <td>
                                    <?php echo aksi_button('start') ?>
                                        <li>
                                            <a href="<?php echo site_url('inventaris/bahan_habis_pakai/create_edit/'.$r['id_bahan']) ?>">Edit</a>
                                        </li>
                                        <li>
                                            <a href="<?php echo site_url('inventaris/bahan_habis_pakai/hapus/'.$r['id_bahan']) ?>">Hapus</a>
                                        </li>
                                    <?php echo aksi_button('end') ?>
                                </td>
                                <td><?php echo $r['nama_barang'] ?></td>
                                <td><?php echo $r['merk'] ?></td>
                                <td><?php echo $r['spesifikasi'] ?></td>
                                <td><?php echo $r['jumlah_stok'] ?></td>
                                <td><?php echo $r['satuan_barang'] ?></td>
                                <td><?php echo $this->model->total_pengambilan($r['id_bahan']) ?></td>
                                <td><?php echo $r['satuan_barang'] ?></td>
                                <td><?php echo $r['sisa_stok'] ?></td>
                                <td><?php echo $r['satuan_barang'] ?></td>

                            </tr>
                            <?php } ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
