<?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">
                <h3 class="card-title"><a href="<?php echo base_url('laporan/code_list_barcode_kosong');?>"><button   class="btn btn-warning">Kosongkan</button></a></h3>
              </div>
              <!-- /.card-header -->
              <!-- form start -->
              <form role="form" method="post"   action="<?php echo base_url('laporan/code_list_barcode');?>">
                <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 class="form-group">
                    <label for="exampleInputEmail1">Kesamping</label>
                    <input type="text" name="jumlah_samping"  class="form-control"   placeholder="Enter Jumlah Kesamping" required="">
                   
                  </div>
                   <div class="form-group">
                    <label for="exampleInputEmail1">Jumlah Baris</label>
                    <input type="text" name="jumlah_baris"  class="form-control"   placeholder="Enter Jumlah Baris" required="">
                   
                  </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($barcode_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; 
											//
								$jumlah_samping= $rows->jumlah_samping;	
								$jumlah_baris= $rows->jumlah_baris;				
								 ?> 
							<!-- 	  <?php $kode=$barcode_ecer; ?> -->
							<!-- 	  <table>
										  	<tr>
										  		<?php for ($x=1; $x <=$jumlah_samping ; $x++) :?>
										  			<td>
										  				<?php for ($i=1; $i <=$jumlah_baris ; $i++) :?>
										  					<div style="border-top-style: dotted;
										  					border-right-style: solid;
										  					border-bottom-style: dotted;
										  					border-left-style: solid;
										  					width: 290px; float: left; margin:5px; ">
										  					<div style="text-align: center"> <h4> Rp. <?php echo nominal($harga_jual_ecer); ?> </h4> </div>
										  					<div style="text-align: center"><img src="<?php echo base_url();?>laporan/barcode/<?php echo $kode;?>"> </div>
										  					<div style="text-align: center"><h5><?php echo $nama_barang; ?></h5></div> 
										  					<div style="text-align: center"><span style="font-size: 15"><?php echo $kontak->nama_toko; ?></span></div> 
										  				</div>
										  			</br> 

										  		<?php endfor;?>
										  	</td>
										  <?php endfor;?>
										</tr>
									</table>
 -->
								               

        <table width="100%" >
          <tr>
            <td style="text-align: center;"  ><h3><u><?php echo $nama_barang; ?></u> <a href="<?php echo base_url('laporan/hapus_barcode_id');?>/<?php echo $id_barang; ?>"> [hapus] </a></h><h3/td>
             
          </tr>
          <tr>
            <td style="text-align: center;"  ><span>Jumlah Kesamping <?php echo nominal($jumlah_samping); ?></span></td>
             
          </tr>
          <tr>
            <td style="text-align: center;"  ><span>Jumlah Baris <?php echo nominal($jumlah_baris); ?></span></td>
             
          </tr>
          
         
        </table>
        <hr>
								<?php $no++; endforeach; ?>
								<div class="row no-print">
									<div class="col-12">
										<a href="<?php echo base_url('laporan/cetak_barcode');?>" 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 -->

  	 