<style type="text/css">
    .table > thead > tr > th {
        vertical-align: middle;
        text-align: center;
    }
</style>
<?php $this->load->view('uji_analis/header_panel');?>
  <table class="table table-bordered table-hover table-striped table-td-valign-middle">
      <thead>
          <tr>
              <th rowspan="2" class="text-center">No Urut</th>
              <th rowspan="2" class="text-center">
                Aksi
              </th>
              <?php if(!empty($data[0]["abu_ks"])) : ?>
                    <th class="text-center">Kontrol Sampel</th>
              <?php endif; ?>
              <th colspan="2" class="text-center">Mulai Pengujian</th>
              <th rowspan="2" class="text-center"><p>No Sampel</p></th>
              <th rowspan="2" class="text-center"><p>Kode Krusibel</p></th>
              <th rowspan="2" class="text-center">Berat Sampel<br/>(mg)<br/>(W)</th>
              <th rowspan="2" class="text-center">Volume Titrasi Sampel<br/>(ml)<br/>(VS)</th>
              <th rowspan="2" class="text-center">Volume Titrasi Blanko<br/>(ml)<br/>(VB)</th>
              <th rowspan="2" class="text-center">Normalitas KMnO4<br/>(N)</th>
              <th rowspan="2" class="text-center">Volume Larutan Induk<br/>(ml)(O)</th>
              <th rowspan="2" class="text-center">Volume Alikuot<br/>(ml)(A)</th>
              <th rowspan="2" class="text-center">Nomor Atom Ca</th>
              <th rowspan="2" class="text-center">% Ca</th>
              <th colspan="2" class="text-center">Selesai Pengujian</th>
              <th colspan="2" class="text-center">Analis</th>
              <th rowspan="2" class="text-center">Paraf Penyelia</th>
              <th colspan="2" class="text-center">Persetujuan</th>
              <th rowspan="2" class="text-center">Ket</th>
          </tr>
          <tr>
              <th class="text-center">Tanggal</th>
              <th class="text-center">Pukul</th>              
              <th class="text-center">Tgl</th>
              <th class="text-center">Pukul</th>
              <th class="text-center">Nama</th>
              <th class="text-center">Paraf</th>
              <th class="text-center">Tgl</th>
              <th class="text-center">Pukul</th>
          </tr>
      </thead>
      <tbody>
          <?php
          $z = 1;
          foreach ($data as $r) {
              ?>
              <tr class="">
                  <td class="text-center"><?php echo $this->uri->segment(5) + $z++ ?></td>
                  <td class="text-center">
                      <input type="checkbox" name="id[]" id="id_check<?php echo $r['id']; ?>" onchange="onCheck(<?php echo $r['id']; ?>);" value="<?php echo $r['id']; ?>">
                  </td>
                  <?php if(!empty($r["abu_ks"])) : ?>
                    <td><?php echo val_ks($r["abu_ks"]); ?></td>
                  <?php endif; ?>
                  <td colspan="2"><?php echo indo_datetime($r['mulai_uji'], 'time'); ?></td>
                  <td><?php echo ($r["id_sampel"] && $r["id_sampel"] != 0 ? $r["nomor_sampel"] : val_ks($r['kontrol_sampel'])); ?></td>
                  <td><?php echo $r['kode_krusibel']; ?></td>
                  <td><?php echo ($r["berat_sampel"]) ? $r["berat_sampel"] : ((float)$r["abu_bs"]*1000); ?></td>
                  <td><?php echo $r['volume_titrasi_sampel']; ?></td>
                  <td><?php echo $r['volume_titrasi_blanko']; ?></td>
                  <td><?php echo $r['normalitas_kmno4']; ?></td>
                  <td><?php echo $r['volume_larutan_induk']; ?></td>
                  <td><?php echo $r['volume_alikuot']; ?></td>
                  <td><?php echo $r['nomor_atom_ca']; ?></td>
                  <td class="text-center"><?php echo $r["kadar_ca"]. ($r["id_sampel"] && $r["id_sampel"] != 0 ? '' : '<br>KS:&nbsp;'.$r['c_range']); ?></td>
                  <td colspan="2"><?php echo indo_datetime($r['selesai_uji'], 'time'); ?></td>
                  <td><?php echo $r['nama_analis']; ?></td>
                  <td><?php echo $r['paraf_analis']; ?></td>
                  <td><?php echo $r['paraf_penyelia']; ?></td>
                  <td colspan="2"><?php echo indo_datetime($r['persetujuan'], 'time'); ?></td>
                  <td><?php echo $r['keterangan']; ?></td>
              </tr>
          <?php } ?>
      </tbody>
      <tfoot>

      </tfoot>
  </table>
<?php $this->load->view('uji_analis/footer_panel');?>
