Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
3.0 kB
1
Indexable
Never
            <div class="col-xs-12">  
              <div class="box">
                <div class="box-header">
                  <h3 class="box-title">Data Transaksi Peminjaman (PJ)</h3>
                  <a class='pull-right btn btn-primary btn-sm' href='<?php echo base_url(); ?>karyawan/tambah_peminjaman'>Tambah Pembelian</a>
                </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 PJ</th>
                        <th>NO PROJEK</th>
                        <th>LOKASI</th>
                        <th>Status</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_pinjam]</td>
                              <td>$row[no_projek]</td>
                              <td>$row[lokasi]</td>
                              <td>$row[status_pinjam]</td>
                              <td><center>
                                <a class='btn btn-success btn-xs' title='Detail Data' href='".base_url()."karyawan/detail_peminjaman/$row[id_peminjaman]'><span class='glyphicon glyphicon-search'></span></a>
                                ";
							if($row['status_pinjam'] == 'Draft'){	
							echo	"<a class='btn btn-warning btn-xs' title='Edit' href='".base_url()."karyawan/edit_peminjaman/$row[id_peminjaman]'><span class='glyphicon glyphicon-edit'></span></a>
									<a class='btn btn-primary btn-xs' title='Proses' href='".base_url()."karyawan/peminjaman_submit/$row[id_peminjaman]'><span class='glyphicon glyphicon-check'></span></a>
									<a class='btn btn-danger btn-xs' title='Delete' href='".base_url()."karyawan/delete_peminjaman/$row[id_peminjaman]' onclick=\"return confirm('Apa anda yakin untuk hapus Data ini?')\"><span class='glyphicon glyphicon-remove'></span></a>";
							}
							if($row['status_pinjam'] == 'Approve'){	
							echo	"<a class='btn btn-primary btn-xs' title='Cetak' target='blank' href='".base_url()."karyawan/peminjaman_cetak/$row[id_peminjaman]'><span class='glyphicon glyphicon-print'></span></a>";
							}
							echo  "</center></td>
                          </tr>";
                      $no++;
                    }
                  ?>
                  </tbody>
                </table>
              </div>
              </div>
              </div>