Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
7.6 kB
2
Indexable
            <div class="col-xs-12">  
              <div class="box">
                <div class="box-header">
                  <h3 class="box-title">Edit Transaksi Peminjaman (PR)</h3>
                </div><!-- /.box-header -->
				
				<div class="box-body">
                
				<?php 
                  $attributes = array('class'=>'form-horizontal','role'=>'form');
                  echo form_open_multipart('karyawan/edit_peminjaman',$attributes); 
                    $kode_peminjaman = $rows['kd_pinjam'];
                ?>
				
				<div class="col-xs-12">
				<table class="table table-bordered table-striped">
                    <thead>
                      <tr>
                      <th style='width:5%'>No</th>
                        <th style='width:30%'>Nama Item</th>
                        <th style='width:25%'>Deskripsi</th>
                        <th style='width:5%'>Jumlah</th>
                        <th style='width:5%'>Satuan</th>
                        <th style='width:5%'>Status</th>
                      </tr>
                    </thead>
                    <?php 
                        echo "<tr>
                                <td></td>
                                <input type='hidden' value='$kode_peminjaman' name='kd'>
                                <input type='hidden' value='".$this->uri->segment(3)."' name='idp'>
                                <input type='hidden' value='".$this->uri->segment(4)."' name='idpd'>
                                <td><select name='aa' class='combobox form-control'  autofocus>
                                                                      <option value='' selected> Cari Item </option>";
                                                                      foreach ($item as $r){
                                                                        if ($r['kode_item']==$row['kode_item']){
                                                                          echo "<option value='$r[kode_item]' selected>$r[nama_item]</option>";
                                                                        }else{
                                                                          echo "<option value='$r[kode_item]'>$r[nama_item]</option>";
                                                                        }
                                                                      }
                                                                   echo "</select></td>
                                <td><input class='form-control' type='text' name='bb' value='$row[keterangan_item]' id='harga'> </td>
                                <td><input class='form-control' type='number' name='dd' value='$row[jumlah_pinjam]'> </td>
                                <td><input class='form-control' type='text' name='ee'  value='$row[satuan_pinjam]'> </td>
                                <td><button type='submit' name='submit' class='btn btn-success  btn-xs'><span class='glyphicon glyphicon-ok' aria-hidden='true'></span></button>
                                    <a class='btn btn-danger btn-xs' title='Delete Data' href='".base_url()."karyawan/tambah_peminjaman'><span class='glyphicon glyphicon-remove'></span></a>
                                </td>
                              </tr>";
                      ?>
                    <tbody>
                  <?php 
                    $no = 1;
                    foreach ($record as $row){
                    echo "<tr><td>$no</td>
                              <td>$row[nama_item]</td>
                              <td>$row[keterangan_item]</td>
                              <td>$row[jumlah_pinjam]</td>
                              <td>$row[satuan_pinjam]</td>
                              <td>
								<a class='btn btn-warning btn-xs' title='Edit Data' href='".base_url()."karyawan/edit_peminjaman/".$this->uri->segment(3)."/$row[id_dpeminjaman]'><span class='glyphicon glyphicon-edit'></span></a>
                                <a class='btn btn-danger btn-xs' title='Delete Data' href='".base_url()."karyawan/delete_peminjaman_detail/".$this->uri->segment(3)."/$row[id_dpeminjaman]' onclick=\"return confirm('Apa anda yakin untuk hapus Data ini?')\"><span class='glyphicon glyphicon-remove'></span></a>
							  </td>
                          </tr>";
                      $no++;
                    }

                  ?>
                  </tbody>
                </table>
                </div>
				
				<div class="col-xs-12">  
				<table class='table table-condensed table-bordered'>
                  <tr><th width='140px' scope='row'>Kode Peminjaman</th>  <td><input type='text' class='form-control' value='<?php echo "$kode_peminjaman"; ?>' name='a' readonly></td></tr>
				   
				  <tr><th scope='row'>Lokasi</th>                 <td><select class='form-control' name='e'>
                                                                                <option value='' selected></option>
                                                                                <?php 
                                                                                  foreach ($lokasi as $r){
                                                                                    if ($r['value1']==$rows['lokasi']){
                                                                                      echo "<option value='$r[value1]' selected>$r[value1]</option>";
                                                                                    }else{
                                                                                      echo "<option value='$r[value1]'>$r[value1]</option>";
                                                                                    }
                                                                                  }
                                                                                ?>
                                                                               </select></td></tr>
                                                                               <tr><th width='140px' scope='row'>No Projek</th>  <td><input type='text' class='form-control' value='<?php echo "$rows[no_projek]"; ?>' name='d'></td></tr>
				  
				  </table>
				<!-- </div>
                  <div class="col-xs-6">  
				<table class='table table-condensed table-bordered'>
                  <tbody>
                  
				  <tr><th width='140px' scope='row'>No Job</th>  <td><input type='text' class='form-control' value='<?php echo "$rows[no_job]"; ?>' name='h'></td></tr>
				  <tr><th width='140px' scope='row'>Tanggal Dibutuhkan</th>  <td><input type='date' class='form-control' value='<?php echo "$rows[tgl_kebutuhan]"; ?>' name='f'> 
				  <tr><th width='140px' scope='row'>Keterangan PR</th>  <td><textarea class='form-control' name='g' style='height:80px'><?php echo $rows['keterangan_pr']?></textarea></td></tr>
                    
				  </tbody>
                  </table>
				</div> -->
				  
                  <input class='btn btn-primary btn-sm' type="submit" name='submit1' value='Simpan Data'>
				 <a class='btn btn-default btn-sm' href='<?php echo base_url(); ?>karyawan/peminjaman'>Selesai / Kembali</a>
                  
				 
				 
                </div>
			<!-- Pembatas box 12 dalam -->	
                         
			   </div>
			<!-- Pembatas box 12 pixel -->	
           
		   </div>
			<!-- Pembatas akhir dari template -->	
              </div>