<?php foreach($kontak as $kontak) :   endforeach; ?>
<?php foreach($admin_login as $user) :   endforeach; ?> 
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1 class="m-0 text-dark"> 
            		 <?php echo $title1; ?>
            </h1>
          </div><!-- /.col -->
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="#">Home</a></li>
              <li class="breadcrumb-item active"><?php echo $title1; ?></li>
            </ol>
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    <!-- /.content-header -->
	    
          
    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
      	  <div class="card">
              <div class="card-header">
								 Detail id Faktur : <?php echo $id_faktur= $this->uri->segment(3); ?>

              </div>
              <!-- /.card-header -->
              <div class="card-body">
              	 <table class="table">
 									<thead>
 										<tr>
 											<th>No</th>
	 										<th>Nama Barang</th>
	 									 
	 										<th style="text-align: center;">Jumlah</th>
	 										<th>Expired Barang</th>
                    <!--   <th>Stok Awal</th>
                      <th>Stok Akhir</th>
                      <th>Selisih </th>
                      <th>Cheking </th> -->
                     
	 									<!-- 	<th>Aksi</th> -->
	 										 
 										</tr>
	 										
 									</thead>
 									<tbody>
 										<?php $no=1; foreach($detail_faktur as $tampil) :   

 										$id_barang= $tampil->id_barang;
 										$this->db->where('id',$id_barang);
 										$query = $this->db->get('tb_barang');
 										$cek = $query->row();

 										$nama_barang = $cek->nama_barang;
 									 

				              				 

												?>

 										<tr>
 											<td><?php echo $no; ?></td>
 											<td><?php echo $nama_barang; ?></td>
 										 
 											<td style="text-align: center;"><?php echo $jumlah_masuk= $tampil->jumlah; ?></td>
 											<td><?php echo  $tampil->expired; ?></td> 
                      <!-- <td><?php echo  $stok_awal=$tampil->stok_awal; ?></td> 
                      <td> --><!-- <?php
                      $id_barang= $tampil->id_barang;
                      $id_kantor= $tampil->id_kantor;
                      $this->db->where('id_barang',$id_barang);
                      $this->db->where('id_kantor',$id_kantor);
                      $query2 = $this->db->get('tb_stok');
                      $cek2 = $query2->row();

                     echo $stok_akhir = $cek2->stok_aplikasi;
 
                     


                       ?> --><!-- <?php echo  $stok_akhir=$tampil->stok_akhir; ?></td>
                       <td><?php echo $selisih= $stok_akhir-$stok_awal; ?>
                         
                       </td> 
                       <td>
                        <?php   if($selisih == $jumlah_masuk  && $stok_awal!='') { echo "OK"; }else{ echo "RECHEK";  }?>
                       </td>
 -->
 											 <!--  <td> 
                          <?php   if($selisih == $jumlah_masuk && $stok_awal!='' ) {
                            ?>
                             <i class="fa fa-check" aria-hidden="true"></i> 
                            <?php
                           }else{ ?>  

                            <a href="<?php echo base_url('kantor/code_restok_faktur_satu'); ?>/<?php echo $tampil->id;  ?>" onclick="return confirm('Apakah Anda Yakin Restok Faktur, ? Klik Oke jika Lanjut')" type="button" alt="restok" ><i class="fa fa-undo"></i></a> 
                           <?php }?>
                          </td>  -->
 										</tr>
 										<?php $no++; endforeach; ?>
 									</tbody>
 								</table>
              </div>
              <!-- /.card-body -->
            </div>
      </div><!-- /.container-fluid -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
 