<?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">
              Data Barang Expired

              </div>
              <!-- /.card-header -->
              <div class="card-body">
              	<table id="example1" class="table table-bordered table-striped">
              		<thead>
              			<tr>
              				<th>No</th>
											<th>Nama Barang</th>
											<th>Kantor </th>
											<th>Expired</th>              			 
              				<th colspan="3">Aksi</th>
              				
              			</tr>
              		</thead>
              		<tbody>
              			<?php $no=1; foreach($barang_expired as $rows) : 

											$id_barang= $rows->id_barang;
											$this->db->where('id',$id_barang);
											$query = $this->db->get('tb_barang');
											$row = $query->row();
											$barcode_ecer = $row->barcode_ecer;
											$nama_barang = $row->nama_barang;
										 
						          //rak
										 
										?>  
              				<tr>
              					<td><?php echo $no; ?></td>
              					<td><?php echo $nama_barang; ?></td>
              					<td>
              						<?php 
              						$id_kantor = $rows->id_kantor; 
              						$sql_menu = "SELECT * FROM tb_kantor WHERE  id_kantor = '$id_kantor' ";
              						$main_menu = $this->db->query($sql_menu)->result();
              						foreach ($main_menu as $maink) {
              							echo  $maink->nama_kantor;

              						}
              						?>
              					<td><?php echo $rows->expired_date;  ?></td>
              					<form action="<?php echo base_url('barang/code_hapus_expired');?>" method="POST">
              					<td>
                        <input type="hidden" name="id" value="<?php echo $rows->id; ?>">
                        <input type="hidden" name="id_barang" value="<?php echo $rows->id_barang; ?>">
                        <input type="hidden" name="id_kantor" value="<?php echo $rows->id_kantor; ?>">
              				 		<select name="pilihan" class="form-control">
              				 			<option value="hapus_info">hapus_info</option>
              				 			<option value="retur">retur</option>
              				 			<option value="buang">buang</option>
              				 		</select>
              				 	</td>
              					<td>
              					 
              						<input type="number" name="jumlah" style="width: 100px;" placeholder="Masukkan jumlah" class="form-control"  required="">
												</td>
													
												<td>
													<button  type="submit"  class="btn btn-primary">Aksi </button>
												</td>
												</form>
              				</tr>
              			<?php $no++; endforeach; ?>

              		</tbody>

              	</table>
              </div>
              <!-- /.card-body -->
            </div>
      </div><!-- /.container-fluid -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->

   