<!DOCTYPE html>
<html>
<?php foreach($kontak as $kontak) :   endforeach; ?>
<?php 
            $username = $this->session->userdata("username");  
            $this->db->where('username',$username);
            $query = $this->db->get('tb_admin');
            $row = $query->row();
           
            $id_kantor = $row->id_kantor;

             ?>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Data Barang</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- Bootstrap 4 -->

  <!-- Font Awesome -->
  <link rel="stylesheet" href="<?php echo base_url();?>assets/plugins/fontawesome-free/css/all.min.css">
   
  <!-- Theme style -->
  <link rel="stylesheet" href="<?php echo base_url();?>assets/dist/css/adminlte.min.css">

   
</head>
<body>
<div class="wrapper">
  <!-- Main content -->
  <section class="invoice">
  	<h2>DATA BARANG TOKO : <?php echo  strtoupper($kontak->nama_toko) ;?> </h2>
  	<h2>NAMA RAK BARANG : <?php echo  strtoupper($nama_rak_tampil) ;?> </h2>
  	<hr>
  	<table class="table table-bordered  ">
  		<thead>
  			<tr style="background: #cccccc;">
  				<th>No</th>
  				<th>Barcode</th>
  				<!-- <tr ><th>Foto</th> </tr> -->
  				<th>Nama Barang</th>
          <th>Katagori Barang</th>
          <th>Rak</th>
          <th>Selfing</th>
  				<th>Stok</th>
  				
          
  				
<!-- <tr ><th>Satuan Beli</th>
  				<th>Isi S.Beli</th>
  				<th> Harga Beli Dos</th>
  				<th> Harga Beli Ecer</th>
  				<th>Satuan Jual</th>
  				<th> Harga Jual Dos</th> </tr> -->
  				<th> Harga Jual Ecer</th>
<!-- <tr ><th> Harga Grosir </th>
  				<th> Minimal Grosir </th>
  			 </tr> -->

  			</tr>
  		</thead>
  		<tbody>
  			<?php $no=1; foreach($barang as $rows) : ?> 
  			<tr>
  				<td><?php echo $no; ?></td>
          <td><?php echo $rows->barcode_ecer; ?></td>
  			<!-- <tr >	<td><img width="50px" src="<?php echo base_url();?>images/barang/<?php  echo $rows->foto;   ?>" alt="<?php  echo $rows->foto;   ?>" class="brand-image img-circle elevation-2" style="opacity: .8"> </td> </tr> -->
  				<td><?php echo $rows->nama_barang;  ?>

  				</td>
          <td><?php echo $rows->nama_katagori;  ?>
            
          </td>
  				
  				<td>	<?php echo $rows->nama_rak;  ?>
			  					
			  	</td>
          <td>  <?php echo $rows->nama_selfing;  ?>
                  
          </td>
          <td>  <?php echo $rows->stok_aplikasi;  ?>
                  
          </td>
			  	
<!-- <tr >
  			 	<td><?php 
			  			$id_satuan_beli = $rows->id_satuan_beli; 
			  			$sql_menu = "SELECT * FROM tb_satuan WHERE  id_satuan = '$id_satuan_beli' ";
			  			$main_menu = $this->db->query($sql_menu)->result();
			  			foreach ($main_menu as $main) {
			  				echo $main->nama_satuan;
			  				$id_satuan_beli= $main->id_satuan;
			  				$nama_satuan_beli= $main->nama_satuan;

			  			} ?>
  				
  				</td>
  			 	<td>
  			 			<?php echo $rows->isi; ?>

  			 	</td>
  			 	<td style="text-align: right;">
  			 			<?php echo nominal($rows->harga_beli_dos); ?>

  			 	</td>
  			 	<td style="text-align: right;">
  			 			<?php echo nominal($rows->harga_beli_ecer); ?>

  			 	</td>
  			 	<td>
	  			 		<?php 
		  				$id_satuan_jual = $rows->id_satuan_jual; 
		  				$sql_menu = "SELECT * FROM tb_satuan WHERE  id_satuan = '$id_satuan_jual' ";
		  				$main_menu = $this->db->query($sql_menu)->result();
		  				foreach ($main_menu as $main) {
		  					echo $main->nama_satuan;
		  					$id_satuan_jual= $main->id_satuan;
		  					$nama_satuan_jual= $main->nama_satuan;

		  				}
		  				?>
  			 	</td>
  			 	<td style="text-align: right;">
  			 			<?php echo nominal($rows->harga_jual_dos); ?>

  			 	</td > 
</tr> -->
  			 	<td style="text-align: right;">
  			 			<?php echo nominal($rows->harga_jual_ecer); ?>

  			 	</td>
<!-- <tr >
  			 
  			 	<td style="text-align: right;">
  			 		<?php echo nominal($rows->harga_grosir); ?>
  			 	</td>
  			 	<td>
  			 		<?php echo $rows->min_grosir; ?> item
  			 	</td>
</tr> -->
  			</td>
  			 


  	</tr>
  	<?php $no++; endforeach; ?>

  		</tbody>

		</table>



                 
  </section>
  <div class="row">
              	<div class="col-lg-12">
              		<table width="100%" border="0">
              			<tr>

              				<td >Mangetahui,</td>
              				<td width="400px;"  ></td>
              				<td ><?php echo $kontak->kab_kota ; ?>, <?php echo tgl_indo(date('Y-m-d'));  ?></td>
              			</tr>
              			<tr>
              				<td>Manager </td>
              				<td width="400px;"></td>
              				<td>Admin</td>
              			</tr>
              			<tr height="70px;">
              				<td></td>
              				<td></td>
              				<td></td>
              			</tr>
              			<tr>
              				<td> _____________________________ </td>
              				<td width="400px;"></td>
              				<td><strong>_____________________________</strong></td>
              			</tr>
              		</table>

              	</div><!-- /.row -->
              </div>
  <!-- /.content -->
</div>
<!-- ./wrapper -->

<script type="text/javascript"> 
  window.addEventListener("load", window.print());
</script>
</body>
</html>
