<?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="row">
          <!-- left column -->
          <div class="col-md-6">
            <!-- general form elements -->
            <div class="card card-primary">
              <div class="card-header">
                 <div class="row">
                   <div class="col-md-6">
                    <h3 class="card-title"><a href="<?php echo base_url('laporan/code_list_label_kosong');?>"><button   class="btn btn-warning">Kosongkan</button></a></h3> 
                   </div>
                   <div class="col-md-6">
                     <h3 class="card-title"><a href="<?php echo base_url('laporan/cetak_label_all');?>" target="_blank"><button   class="btn btn-info">Cetak Semua Label</button></a></h3>
                   </div>
                </div>

              
              </div>
              <!-- /.card-header -->
              <!-- form start -->
              <form role="form" method="post"   action="<?php echo base_url('laporan/code_list_label');?>">
                <div class="card-body">
                	<div class="form-group">
                  	<label for="exampleInputEmail1">Pilih Barang </label>
                  	 <select class="form-control select2" name="id_barang" style="width: 100%;">
                  		 
                  		<?php $no=1; foreach($barang as $row) : ?> 
                  		<option value="<?php echo $row->id; ?>"> [ <?php echo $row->barcode_ecer; ?> ] [ <?php echo $row->nama_barang; ?> ]</option>
                  		<?php $no++; endforeach; ?>
                  	</select>
                  </div>
                 
      
                </div>
                <!-- /.card-body -->
 
                <div class="card-footer">
                  <button type="submit" class="btn btn-primary">Tambah</button>

                </div>
              </form>
            </div>
            <!-- /.card -->

           
           
 

          </div>
          <!--/.col (left) -->
         
          <!--/.col (right) -->
        </div>
        <!-- /.row -->
      </div><!-- /.container-fluid -->
    </section>
      <section class="content">
      <div class="container-fluid">
        <div class="row">
          <!-- left column -->
          <div class="col-md-12">
            <!-- general form elements -->
            <div class="card card-primary">
              <div class="card-header">
                <h3 class="card-title">List Barcode</h3>
              </div>


              <?php $no=1; foreach($label_list 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; 
											$harga_jual_ecer = $row->harga_jual_ecer; 
                       $harga_jual_dos = $row->harga_jual_dos; 
                      $harga_grosir = $row->harga_grosir_lv1; 
                      $min_grosir = $row->min_grosir_lv1 ; 
											//
								$jumlah_samping= $rows->jumlah_samping;	
								$jumlah_baris= $rows->jumlah_baris;				
								 ?> 
								  

												<div class="cetak">
				<table width="100%" >
					<tr>
						<td style="text-align: center;"  ><h3><u><?php echo $nama_barang; ?></u> <a href="<?php echo base_url('laporan/hapus_label_id');?>/<?php echo $id_barang; ?>"> [hapus] </a></h><h3/td>
						 
					</tr>
          <tr>
            <td style="text-align: center;"  ><span>Harga Ecer  Rp.<?php echo nominal($harga_jual_ecer); ?></span></td>
             
          </tr>
          <tr>
            <td style="text-align: center;"  ><span>Harga Dos Rp. <?php echo nominal($harga_jual_dos); ?></span></td>
             
          </tr>
					<tr>
					 
						<td style="text-align: center;" ><span>Harga Grosir Lv1. Rp.<?php echo nominal($harga_grosir); ?> Min. <?php echo $min_grosir; ?></span></td>
					</tr>
					
				 
				</table>
			 
			</div>  
			<hr>
								<?php $no++; endforeach; ?>
								<div class="row no-print">
									<div class="col-12">
										<a href="<?php echo base_url('laporan/cetak_label');?>" target="_blank" class="btn btn-default"><i class="fas fa-print"></i> Print</a>
										
									</div>
								</div>
            </div>
            <!-- /.card -->

           
           
 

          </div>
          <!--/.col (left) -->
         
          <!--/.col (right) -->
        </div>
        <!-- /.row -->
      </div><!-- /.container-fluid -->
    </section>
    <!-- /.content -->
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->

  	 