<script type="text/javascript" charset="utf-8">
          $(document).ready(function(){
            $('#bbkas').dataTable({
					     "oLanguage": {
						      "sLengthMenu": "Tampilkan _MENU_ data per halaman",
						      "sSearch": "Pencarian: ", 
						      "sZeroRecords": "Maaf, tidak ada data yang ditemukan",
						      "sInfo": "Menampilkan _START_ s/d _END_ dari _TOTAL_ data",
						      "sInfoEmpty": "Menampilkan 0 s/d 0 dari 0 data",
						      "sInfoFiltered": "(di filter dari _MAX_ total data)",
						      "oPaginate": {
						          "sFirst": "<<",
						          "sLast": ">>", 
						          "sPrevious": "<", 
						          "sNext": ">"
					       }
				      },
              "sPaginationType":"full_numbers",
              "bJQueryUI":true
            });
          })    
        </script>

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="400" class="isi_tabel">
        <tr>
          <td colspan="3"><h1 style="color:#033">Index Buku Besar Bank (Deposito)</h1></td>
        </tr>
        <tr>
          <td width="159">Bulan/ Tahun Lapor</td>
          <td width="10">:</td>
          <td width="215"><?php echo $bulan.'/ '.$tahun;?></td>
        </tr>
        <tr>
          <td>Unit</td>
          <td>:</td>
          <td><?php echo $_SESSION['nama'];?></td>
        </tr>
        <tr>
          <td>Tanggal</td>
          <td>:</td>
          <td><?php echo date('d-M-Y');?></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="90%" align="center"  bgcolor="#FFFFFF" class="display" id="bbkas">
      <thead>
        <tr class="form_body" height="30">
          <th align="center" width="100">No</th>
          <th align="center" width="100">Kode Deposito</th>
          <th align="center">No.Rekening</th>
          <th align="center">Nama Bank</th>
          <th align="center">Saldo Awal</th>
          <th align="center">Saldo Akhir</th>
        </tr>
        </thead>
      <tbody>
      
        <?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]' and jenis='Deposito' order by kode_bank asc");
					          $no = 1;
							
                    while ($r = mysql_fetch_array($sql)) {
                      echo "<tr height='25'>
          <td align='center'>$no</td>
		  <td align='center'>$r[kode_bank]</td>";?>
          <?php
			if($r['kode_bank']=='Deposito 1'){
		  $saldo=$row_saldo_awal['col_1130a'];

			}
			elseif($r['kode_bank']=='Deposito 2'){
		  $saldo=$row_saldo_awal['col_1130b'];

			}
			elseif($r['kode_bank']=='Deposito 3'){
		  $saldo=$row_saldo_awal['col_1130c'];

			}
			elseif($r['kode_bank']=='Deposito 4'){
		  $saldo=$row_saldo_awal['col_1130d'];

			}
			elseif($r['kode_bank']=='Deposito 5'){
		  $saldo=$row_saldo_awal['col_1130e'];
	
			}
			else{
			}?>
		  <?php echo
            "<td align='center'>";?><a href="?section=Report&module=bb_depo&no_rek=<?php echo $r['no_rek'];?>&saldo=<?php echo $saldo;?>"><?php echo $r['no_rek'];?></a><?php echo"</td>
			<td align='center'>$r[nama_bank]</td>
			<td align='right'>";?>
			<?php
			if($r['kode_bank']=='Deposito 1'){
		  $saldo=$row_saldo_awal['col_1130a'];
		  echo formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 2'){
		  $saldo=$row_saldo_awal['col_1130b'];
		  echo formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 3'){
		  $saldo=$row_saldo_awal['col_1130c'];
		  echo formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 4'){
		  $saldo=$row_saldo_awal['col_1130d'];
		  echo formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 5'){
		  $saldo=$row_saldo_awal['col_1130e'];
		  echo formatRupiah($saldo);
			}
			else{
			}?>
			<?php echo"</td>
			<td align='right'>";?>
			<?php 
			include 'module/_proses/hitung_bank.php';
			if($r['kode_bank']=='Deposito 1'){
		  $saldo=$row_saldo_awal['col_1130a'];
		  echo formatRupiah(($saldo+$row_saldo['ttl_dbt'])-$row_saldo['ttl_krd']);
			}
			elseif($r['kode_bank']=='Deposito 2'){
		  $saldo=$row_saldo_awal['col_1130b'];
		  echo formatRupiah(($saldo+$row_saldo['ttl_dbt'])-$row_saldo['ttl_krd']);
			}
			elseif($r['kode_bank']=='Deposito 3'){
		  $saldo=$row_saldo_awal['col_1130c'];
		  echo formatRupiah(($saldo+$row_saldo['ttl_dbt'])-$row_saldo['ttl_krd']);
			}
			elseif($r['kode_bank']=='Deposito 4'){
		  $saldo=$row_saldo_awal['col_1130d'];
		  echo formatRupiah(($saldo+$row_saldo['ttl_dbt'])-$row_saldo['ttl_krd']);
			}
			elseif($r['kode_bank']=='Deposito 5'){
		  $saldo=$row_saldo_awal['col_1130e'];
		  echo formatRupiah(($saldo+$row_saldo['ttl_dbt'])-$row_saldo['ttl_krd']);
			}
			else{
			}
			?>
			<?php echo"</td>
          </tr>";
                      $no++;
                    }
                    ?>
      </tbody>
      <tfoot>
      </tfoot>
    </table></td>
  </tr>
</table>
        