<?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.' '.$nama_kantor ?> 
            		  

            </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">
                 

              </div>
              <!-- /.card-header -->
              <div class="card-body">
              	<table id="example1" class="table table-bordered table-striped">
              		<thead>
              			<tr>
              				<th>No</th>
              				<th>Kode Barang</th>
              				<th>Nama Barang</th>
              				<th>Harga Jual</th>
              				<th>Stok </th>
              				<th>Rak </th>
              				
              			 
              				 
              				
              			</tr>
              		</thead>
              		<tbody>
              			<?php $no=1; foreach($barang 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;
											$id_rak = $row->id_rak;
              				$harga_jual_ecer = $row->harga_jual_ecer;

              				//rak
              				$sql_menuu = "SELECT * FROM tb_rak WHERE  id_rak = '$id_rak' ";
			              				$main_menuu = $this->db->query($sql_menuu)->result();
			              				foreach ($main_menuu as $mainkk) {
			              			 		$nama_rak= $mainkk->nama_rak;
			              			 	}

												?>


              				<tr>
												<td><?php echo $no; ?></td>
              					<td><?php echo $barcode_ecer; ?></td>
              					<td><?php echo $nama_barang; ?></td>
              					<td><?php echo nominal($harga_jual_ecer); ?></td>

              					<td><?php echo $rows->stok_aplikasi; ?></td>
              					<td><?php echo $nama_rak; ?></td>
              				 
              					 
 
              				</tr>
              			<?php $no++; endforeach; ?>

              		</tbody>

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

   