
<div class="row" id="portlet-content">
    <div class="col-md-12">
        <div class="portlet light" style="position:relative">
            <div class="portlet-title">
                <div class="caption">
                    <i class="fa fa-laptop"></i>Detail Stok 
                </div>
                <div class="actions">
                 <a class="btn blue btn-sm" href="<?=site_url()?>/front_office/ugd_dir/ugd/laboratorium_penyesuaian_stok">
                  <i class="fa fa-plus"></i> Penyesuaian Stok
                </a>   
                </div>
            </div>



            <div class="portlet-body" id="page-content" style="display:nonee">
                <div class="table-responsive">
                    <table id="<?=$controller?>_table" class="table table-bordered table-striped table-hover" style="width:100%">
                        <thead>
                            <tr>
                                <th class="text-left">Nama Item</th>
                                <th class="text-left">Stok</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php 
                            $q = $this->M_general->get_bhp_stok_lab();
                            
                            foreach ($q->result() as $key ) { 
                            $ttl = $this->M_general->get_stok_bhp_lab($key->id_bhp);
                            if($ttl != '0'){ ?>
                            <tr>
                                <td><?=$key->nama_item?></td>
                                <td><a href="<?=site_url()?>/front_office/ugd_dir/ugd/laboratorium_stok_detail/<?=$key->id_bhp?>" target="_Blank" style="color:blue; text-decoration: underline;"><?=$ttl;?></a></td>
                            </tr>
                            <?php }}?>
                            
                        </tbody>
                    </table>
                </div>

               
            </div>
           
        </div>
    </div>
</div>





<script>
  $(document).ready( function () {
    var table=$('#<?=$controller?>_table').DataTable({
      "order": [[ 0, 'desc' ]],
      "processing": false,
      "serverSide": false,
      "searching": true,
      "language": {
            "url": "<?=base_url('media/assets/global/plugins/datatables/media/js')?>/indonesian.json"
       },
      "columnDefs": [
        {"targets": [0],"bSortable": false}
      ],
    
      "fnInitComplete": function(oSettings, json) {
        $('.dataTables_processing').css('display','none');
        $( "#loading-content" ).fadeOut( "fast", function() {
          $( "#tombol-action" ).fadeIn("fast");
          $( "#page-content" ).fadeIn("fast");
        });
      }
    });

  });

  $('.hapusdata').click(function(){
    if(confirm("Apakah kamu yakin menghapus entry ini?")){
      return true;
    }
    else{
      return false;
    }
  });
</script>


<script>
  $(document).ready(function () {
    $('.datepickers').datepicker({
      format: 'dd-mm-yyyy' 
    });
  });
</script>
