Untitled
unknown
plain_text
a month ago
3.7 kB
1
Indexable
Never
//view_pembelian_wh <div class="col-xs-12"> <div class="box"> <div class="box-header"> <h3 class="box-title">Data Transaksi Pembelian (PR)</h3> </div><!-- /.box-header --> <div class="box-body"> <table id="example1" class="table table-bordered table-striped"> <thead> <tr> <th style='width:40px'>No</th> <th>Kode PR</th> <th>Lokasi</th> <th>BOMS</th> <th>NO VIP</th> <th>NO JOB</th> <th>Status</th> <th>File</th> <th style='width:120px'>Action</th> </tr> </thead> <tbody> <?php $no = 1; foreach ($record as $row){ //$total = $this->db->query("SELECT sum(a.harga_pesan*a.jumlah_pesan) as total FROM `rb_pembelian_detail` a where a.id_pembelian='$row[id_pembelian]'")->row_array(); echo "<tr><td>$no</td> <td>$row[kd_pr]</td> <td>$row[lokasi_projek]</td> <td>$row[type_pr]</td> <td>$row[no_projek]</td> <td>$row[no_job]</td> <td>$row[status_pr]</td> <td>"; if (!empty($row['file'])) { // Menampilkan daftar URL file $fileUrls = explode(';', $row['file']); foreach ($fileUrls as $fileUrl) { echo "<a href='" . base_url() . "asset/foto_pr/$fileUrl' target='_blank'>View $fileUrl</a> | "; echo "<a href='" . base_url() . "asset/foto_pr/$fileUrl' download>Download</a> | "; echo "<br>"; } } echo "</td> <td><center> <a class='btn btn-success btn-xs' title='Detail Data' href='".base_url()."administrator/pembelian_detail_pr/$row[id_pembelian]'><span class='glyphicon glyphicon-search'></span>Detail</a> "; if($row['status_pr'] == 'Verifikasi' OR $row['status_pr'] == 'Submit'){ echo "<a class='btn btn-warning btn-xs' title='Verifikasi' href='".base_url()."administrator/verifikasi_pembelian/$row[id_pembelian]'><span class='glyphicon glyphicon-edit'></span>Verifikasi</a> "; } if($row['status_pr'] == 'Close' or $row['status_pr'] == 'Order'){ echo "<a class='btn btn-primary btn-xs' title='Cetak' target='blank' href='".base_url()."administrator/pembelian_cetak_pr/$row[id_pembelian]'><span class='glyphicon glyphicon-print'></span>Cetak PR</a>"; echo "<a class='btn btn-default btn-xs' title='Cetak' target='blank' href='".base_url()."administrator/pembelian_cetak_serah/$row[id_pembelian]'><span class='glyphicon glyphicon-print'></span>Cetak MR</a>"; } echo "</center></td> </tr>"; $no++; } ?> </tbody> </table> </div> </div> </div> <script> <script> function toggleFileList(id) { var fileList = document.getElementById(id); if (fileList.style.display === 'none') { fileList.style.display = 'block'; } else { fileList.style.display = 'none'; } } </script>