<?php
 
header("Content-type: application/vnd-ms-excel");
header("Content-Disposition: attachment; filename=BCP_BC27_IN.xls");
?>
<table border="0" cellpadding="2">
  	<tr>
    	 
        <th colspan="17" rowspan="4">BUKU CATATAN PABEAN BC 2.7 MASUK ANTAR KAWASAN BERIKAT </th>
        <tr>
            <tr>
                <tr>
                    <tr>
                    <th colspan="2" align="left">NAMA KB</th>
                    <th colspan="15" align="left"></th>
                        <tr>
                            <th colspan="2" align="left">NPWP</th>
                            <th colspan="15" align="left"></th>
                        </tr>    
                    </tr>
                </tr>
            </tr>    
        </tr>
    </tr>
</table>
<table border="1" cellpadding="2">    
    <tr>
        <th rowspan="2">NO URUT</th>
        <th rowspan="1" colspan="2">NO. PENDAFTARAN</th>
        <th rowspan="1" colspan="2">KEMASAN</th>
        <th rowspan="2">JENIS BARANG</th>
        <th rowspan="2">SATUAN</th>
        <th rowspan="2">JUMLAH</th>
        <th colspan="2">BERAT</th>
        <th colspan="1" rowspan="2" >JUMLAH DEVISA IMPORT</th>
        <th colspan="2" rowspan="1" >DEVISA VALUTA</th>      
        <th colspan="2" rowspan="1" >SELESAI MASUK</th>
        <th colspan="1" rowspan="2" >PELABUHAN BONGKAR</th>
        <th rowspan="1" rowspan="2" >KETERANGAN</th>  
        <tr>
            <th rowspan="1">NOMOR</th>
            <th rowspan="1">TANGGAL</th>
            <th rowspan="1">JENIS </th>
            <th colspan="1">JUMLAH</th>
            <th colspan="1">KOTOR</th>
            <th colspan="1">BERSIH</th>
            <th rowspan="1">VAL</th>
            <th rowspan="1">DEVISA</th>
            <th colspan="1">TANGGAL</th>  
            <th colspan="1">JAM</th>
        </tr>
        <tr>
            <th colspan="1">1</th>
            <th colspan="1">2</th>
            <th colspan="1">3</th>
   			<th colspan="1">4</th>
            <th colspan="1">5</th>
			<th colspan="1">6</th>
            <th colspan="1"></th>
            <th colspan="1">7 </th>
            <th colspan="1"></th>
            <th colspan="1">8</th>
            <th colspan="1">9</th>
            <th colspan="1"></th>
            <th colspan="1"></th>
            <th colspan="1">13</th>
            <th colspan="1">14</th>
            <th colspan="1"></th>            
            <th colspan="1">15</th>


        </tr>
  
        <?php
  
  

  $this->db = $this->load->database('pasi', TRUE);
  $userid = $this->session->userdata('DX_user_id');
  $query = $this->db->query("SELECT * FROM tblx_pabean_bcin where userid like '$userid' and typebc like '27'" );
  $no = 1;  
  foreach ($query->result() as $row)
  {

      echo "<tr>";
      echo "<td>".$no."</td>";
      echo "<td>".$row->nomordaftar."</td>";
      echo "<td>".$row->tanggaldaftar."</td>";
      echo "<td>".$row->jeniskemasan."</td>";
      echo "<td>".$row->jumlahkemasan."</td>";
      echo "<td>".$row->jenisbarang."</td>";
      echo "<td>".$row->satuan."</td>";
      echo "<td>".$row->jumlah."</td>";
      echo "<td>".$row->beratbersih."</td>";
      echo "<td>".$row->beratkotor."</td>";
      echo "<td>".$row->devisausd."</td>";
      echo "<td>".$row->val."</td>";
      echo "<td>".$row->dev."</td>";
      echo "<td>".$row->tanggalselesai."</td>";
      echo "<td>".$row->jamselesai."</td>";
      echo "<td>".$row->pelabuhan."</td>";
      echo "<td>".$row->keterangan."</td>";
       echo "</tr>";    

      $no++;  
  }





    ?>

<table border="0" cellpadding="2">    
    <tr>
    <th colspan="14" align="left"> </th>
    <th colspan="4" align="left">Ditutup pada hari Rabu tanggal 01 Januari 2020 </th>
    </tr>
    <tr>
    <th colspan="14" align="left"> </th>
    <th colspan="4" align="left">Dengan jumlah dokumen : 0 Dokumen </th>
    </tr>
    <tr>
    <th colspan="14" align="left"> </th>
    <th colspan="4" align="left">Kasubsi Hanggar Pabean Dan Cukai </th>
    </tr>
    <tr>
    </tr>
    <tr>
    </tr>
    <tr>
    <th colspan="14" align="left"> </th>
    <th colspan="4" align="left">NIP</th>
    </tr>


    </tr>
</table>    
 
</table>     