Untitled
unknown
plain_text
25 days ago
11 kB
2
Indexable
Never
<div class="col-xs-12"> <div class="box"> <div class="box-header"> <h3 class="box-title">Edit Transaksi Pembelian (PR)</h3> </div><!-- /.box-header --> <div class="box-body"> <?php $attributes = array('class'=>'form-horizontal','role'=>'form'); echo form_open_multipart('karyawan/edit_pembelian',$attributes); $kode_pembelian = $rows['kd_pr']; ?> <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:25%'>Dimensi(Input satuannya CM/MM/M/Inci)</th> <th style='width:5%'>Jumlah</th> <th style='width:5%'>Satuan</th> <th style='width:5%'>Action</th> </tr> </thead> <?php echo "<tr> <td></td> <input type='hidden' value='$kode_pembelian' 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=''> 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[deskripsi_item]' id='harga'> </td> <td><input class='form-control' type='text' name='cc' value='$row[dimension_item]'></td> <td><input class='form-control' type='number' name='dd' value='$row[jumlah_item]'> </td> <td><input class='form-control' type='text' name='ee' value='$row[satuan_item]'> </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_pembelian'><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[deskripsi_item]</td> <td>$row[dimension_item]</td> <td>$row[jumlah_item]</td> <td>$row[satuan_item]</td> <td> <a class='btn btn-warning btn-xs' title='Edit Data' href='".base_url()."karyawan/edit_pembelian/$row[id_pembelian]/$row[id_dpembelian]'><span class='glyphicon glyphicon-edit'></span></a> <a class='btn btn-danger btn-xs' title='Delete Data' href='".base_url()."karyawan/delete_pembelian_detail/$row[id_pembelian]/$row[id_dpembelian]' 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-6"> <table class='table table-condensed table-bordered'> <tr><th width='140px' scope='row'>Kode Pembelian</th> <td><input type='text' class='form-control' value='<?php echo "$kode_pembelian"; ?>' name='a' readonly></td></tr> <tr><th scope='row'>Kategori</th> <td><select class='form-control' name='b'> <option value=''></option> <?php foreach ($kategori as $r){ if ($r['value1']==$rows['kategori_pr']){ echo "<option value='$r[value1]' selected>$r[value1]</option>"; }else{ echo "<option value='$r[value1]'>$r[value1]</option>"; } } ?> </select></td></tr> <tr><th scope='row'>Type</th> <td><select class='form-control' name='c'> <option value=''></option> <?php foreach ($type as $r){ if ($r['value1']==$rows['type_pr']){ echo "<option value='$r[value1]' selected>$r[value1]</option>"; }else{ echo "<option value='$r[value1]'>$r[value1]</option>"; } } ?> </select></td></tr> <tr><th scope='row'>Lokasi</th> <td><select class='form-control' name='e'> <option value=''></option> <?php foreach ($lokasi as $r){ if ($r['value1']==$rows['lokasi_projek']){ echo "<option value='$r[value1]' selected>$r[value1]</option>"; }else{ echo "<option value='$r[value1]'>$r[value1]</option>"; } } ?> </select></td></tr> </table> </div> <div class="col-xs-6"> <table class='table table-condensed table-bordered'> <tbody> <tr><th width='140px' scope='row'>Kode VIP</th> <td><input type='text' class='form-control' value='<?php echo "$rows[no_projek]"; ?>' name='d'></td></tr> <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> <tr><th scope='row'>File Attachment</th> <td> <?php if (!empty($rows['file'])) { $fileUrls = explode(';', $rows['file']); echo "<ul>"; foreach ($fileUrls as $fileUrl) { echo "<li><a href='" . base_url() . "asset/foto_pr/$fileUrl' target='_blank'>$fileUrl</a></li>"; } echo "</ul>"; } ?> </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/pembelian'>Selesai / Kembali</a> <a class='btn btn-success btn-sm' href='<?php echo base_url(); ?>karyawan/pembelian_submit/<?php echo $rows['id_pembelian'] ?>'>Submit</a> </div> <!-- Pembatas box 12 dalam --> </div> <!-- Pembatas box 12 pixel --> </div> <!-- Pembatas akhir dari template --> </div> <script> // JavaScript to show/hide the uploaded file document.querySelector('a[href$="uploads/"]').addEventListener('click', function(event) { event.preventDefault(); document.getElementById('dvPreview').style.display = 'block'; }); </script>