<?php

if($bulan=='Januari'){
	$bulannya='Desember';
	$tahunnya=$tahun-1;
}
elseif($bulan=='Februari'){
	$bulannya='Januari';
	$tahunnya=$tahun;
}
elseif($bulan=='Maret'){
	$bulannya='Februari';
	$tahunnya=$tahun;
}
elseif($bulan=='April'){
	$bulannya='Maret';
	$tahunnya=$tahun;
}
elseif($bulan=='Mei'){
	$bulannya='April';
	$tahunnya=$tahun;
}
elseif($bulan=='Juni'){
	$bulannya='Mei';
	$tahunnya=$tahun;
}
elseif($bulan=='Juli'){
	$bulannya='Juni';
	$tahunnya=$tahun;
}
elseif($bulan=='Agustus'){
	$bulannya='Juli';
	$tahunnya=$tahun;
}
elseif($bulan=='September'){
	$bulannya='Agustus';
	$tahunnya=$tahun;
}
elseif($bulan=='Oktober'){
	$bulannya='September';
	$tahunnya=$tahun;
}
elseif($bulan=='November'){
	$bulannya='Oktober';
	$tahunnya=$tahun;
}
elseif($bulan=='Desember'){
	$bulannya='November';
	$tahunnya=$tahun;
}
mysql_select_db($database_sistem, $sistem);
$query_saldo_awal = "SELECT * FROM saldo_tb where bulan='$bulannya' and tahun='$tahunnya' and kode_unit='-'";
$saldo_awal = mysql_query($query_saldo_awal, $sistem) or die(mysql_error());
$row_saldo_awal = mysql_fetch_assoc($saldo_awal);
$totalRows_saldo_awal = mysql_num_rows($saldo_awal);

mysql_select_db($database_sistem, $sistem);
$query_saldo_akhir = "SELECT * FROM saldo_tb where bulan='$bulan' and tahun='$tahun' and kode_unit='-'";
$saldo_akhir = mysql_query($query_saldo_akhir, $sistem) or die(mysql_error());
$row_saldo_akhir = mysql_fetch_assoc($saldo_akhir);
$totalRows_saldo_akhir = mysql_num_rows($saldo_akhir);

mysql_select_db($database_sistem, $sistem);
$query_unit = "SELECT * FROM user_tb WHERE user_tb.`level`='Unit'";
$unit = mysql_query($query_unit, $sistem) or die(mysql_error());
$row_unit = mysql_fetch_assoc($unit);
$totalRows_unit = mysql_num_rows($unit);
?>

<p>&nbsp;</p>
<table width="90%" align="center" cellpadding="5" cellspacing="5">
  <tr>
    <td><h3>Tabel Data Unit</h3></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" align="center" cellpadding="2" cellspacing="2" class="form_body">
      <tr align="center">
        <td background="images/bg1.png"  height="30">kode unit</td>
        <td background="images/bg1.png">nama unit</td>
        <td background="images/bg1.png">alamat</td>
        <td background="images/bg1.png">telp</td>
        <td background="images/bg1.png">email</td>
        <td background="images/bg1.png">direktur</td>
        <td background="images/bg1.png">bendahara</td>
        <td background="images/bg1.png">nama admin</td>
      </tr>
      <tr align="center">
        <td colspan="8"><hr /></td>
      </tr>
      <?php do { ?>
      <tr align="center">
        <td><a href="?section=Report&module=show_akb&amp;kodenya=<?php echo $row_unit['kode_unit'];?>"><?php echo $row_unit['kode_unit']; ?></a></td>
        <td><?php echo $row_unit['nama_unit']; ?></td>
        <td><?php echo $row_unit['alamat']; ?></td>
        <td><?php echo $row_unit['telp']; ?></td>
        <td><?php echo $row_unit['email']; ?></td>
        <td><?php echo $row_unit['direktur']; ?></td>
        <td><?php echo $row_unit['bendahara']; ?></td>
        <td><?php echo $row_unit['nama_admin']; ?></td>
      </tr>
      <tr align="center">
        <td colspan="8"><hr /></td>
      </tr>
      <?php } while ($row_unit = mysql_fetch_assoc($unit)); ?>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" align="center" cellpadding="3" cellspacing="3" class="form_body" background="images/tr.png">
      <tr>
        <td colspan="8"><hr /></td>
      </tr>
      <tr>
        <td colspan="8"><table width="400" class="isi_tabel">
          <tr>
            <td colspan="3"><h1 style="color:#033">Arus Kas &amp; Bank</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 height="35">
        <td width="100" align="center" background="images/bg1.png">Akun</td>
        <td align="center" background="images/bg1.png">Keterangan</td>
        <td colspan="6" align="center" background="images/bg1.png">Nominal</td>
      </tr>
      <tr>
        <td align="center">1110</td>
        <td align="left">Kas</td>
        <td align="center">&nbsp;</td>
        <td align="center">&nbsp;</td>
        <td align="right">Rp.</td>
        <td align="right"><?php 
  echo formatRupiah($row_saldo_awal['col_1110']);
  ?></td>
        <td align="center">&nbsp;</td>
        <td align="center">&nbsp;</td>
      </tr>
      <?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='-' and jenis='Bank' order by kode_bank asc ");
					          $no = 1;
							
                    while ($r = mysql_fetch_array($sql)) {
                      echo "<tr>
          <td align='center'>1120</td>
          <td align='left'>$r[kode_bank] | $r[nama_bank] | $r[no_rek]</td>
          <td align='right'></td>
          <td align='right'></td>
		  <td align='right'>Rp.</td>
          <td align='right'>";?>
           <?php
			if($r['kode_bank']=='Bank 1'){
		  $saldo=$row_saldo_awal['col_1120a'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Bank 2'){
		  $saldo=$row_saldo_awal['col_1120b'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Bank 3'){
		  $saldo=$row_saldo_awal['col_1120c'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Bank 4'){
		  $saldo=$row_saldo_awal['col_1120d'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Bank 5'){
		  $saldo=$row_saldo_awal['col_1120e'];
		  echo  formatRupiah($saldo);
			}
		  elseif($r['kode_bank']=='Bank 6'){
		  $saldo=$row_saldo_awal['col_1120f'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Bank 7'){
		  $saldo=$row_saldo_awal['col_1120g'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Bank 8'){
		  $saldo=$row_saldo_awal['col_1120h'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Bank 9'){
		  $saldo=$row_saldo_awal['col_1120i'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Bank 10'){
		  $saldo=$row_saldo_awal['col_1120j'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Bank 11'){
		  $saldo=$row_saldo_awal['col_1120k'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Bank 12'){
		  $saldo=$row_saldo_awal['col_1120l'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Bank 13'){
		  $saldo=$row_saldo_awal['col_1120m'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Bank 14'){
		  $saldo=$row_saldo_awal['col_1120n'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Bank 15'){
		  $saldo=$row_saldo_awal['col_1120o'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Bank 16'){
		  $saldo=$row_saldo_awal['col_1120p'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Bank 17'){
		  $saldo=$row_saldo_awal['col_1120q'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Bank 18'){
		  $saldo=$row_saldo_awal['col_1120r'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Bank 19'){
		  $saldo=$row_saldo_awal['col_1120s'];
		  echo  formatRupiah($saldo);
			}
		   elseif($r['kode_bank']=='Bank 20'){
		  $saldo=$row_saldo_awal['col_1120t'];
		  echo  formatRupiah($saldo);
			}
			elseif($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);
			}
			 elseif($r['kode_bank']=='Deposito 6'){
		  $saldo=$row_saldo_awal['col_1130f'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 7'){
		  $saldo=$row_saldo_awal['col_1130g'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Deposito 8'){
		  $saldo=$row_saldo_awal['col_1130h'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Deposito 9'){
		  $saldo=$row_saldo_awal['col_1130i'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Deposito 10'){
		  $saldo=$row_saldo_awal['col_1130j'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Deposito 11'){
		  $saldo=$row_saldo_awal['col_1130k'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 12'){
		  $saldo=$row_saldo_awal['col_1130l'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Deposito 13'){
		  $saldo=$row_saldo_awal['col_1130m'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Deposito 14'){
		  $saldo=$row_saldo_awal['col_1130n'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Deposito 15'){
		  $saldo=$row_saldo_awal['col_1130o'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Deposito 16'){
		  $saldo=$row_saldo_awal['col_1130p'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 17'){
		  $saldo=$row_saldo_awal['col_1130q'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 18'){
		  $saldo=$row_saldo_awal['col_1130r'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 19'){
		  $saldo=$row_saldo_awal['col_1130s'];
		  echo  formatRupiah($saldo);
			}
			else{
		  $saldo=$row_saldo_awal['col_1130t'];
		  echo  formatRupiah($saldo);
			}
			?>
          <?php echo"</td>
          <td></td>
          <td></td>
        </tr>";
		 $no++;
                    }
                    ?>
                    
        <tr height>
            <td colspan="8" align="left"><hr /></td>
        </tr>
        <tr height="30">
          <td align="left">&nbsp;</td>
          <td align="left">Saldo Awal</td>
          <td align="left">&nbsp;</td>
          <td align="left">&nbsp;</td>
          <td align="left">&nbsp;</td>
          <td align="left">&nbsp;</td>
          <td align="left">&nbsp;</td>
          <td align="left"><?php 
  $saldoawal=$row_saldo_awal['col_1110']+$row_saldo_awal['col_1120a']+$row_saldo_awal['col_1120b']+$row_saldo_awal['col_1120c']+$row_saldo_awal['col_1120d']+$row_saldo_awal['col_1120e']+$row_saldo_awal['col_1120f']+$row_saldo_awal['col_1120g']+$row_saldo_awal['col_1120h']+$row_saldo_awal['col_1120i']+$row_saldo_awal['col_1120j']+$row_saldo_awal['col_1120k']+$row_saldo_awal['col_1120l']+$row_saldo_awal['col_1120m']+$row_saldo_awal['col_1120n']+$row_saldo_awal['col_1120o']+$row_saldo_awal['col_1120p']+$row_saldo_awal['col_1120q']+$row_saldo_awal['col_1120r']+$row_saldo_awal['col_1120s']+$row_saldo_awal['col_1120t']+$row_saldo_awal['col_1130a']+$row_saldo_awal['col_1130b']+$row_saldo_awal['col_1130c']+$row_saldo_awal['col_1130d']+$row_saldo_awal['col_1130e']+$row_saldo_awal['col_1130f']+$row_saldo_awal['col_1130g']+$row_saldo_awal['col_1130h']+$row_saldo_awal['col_1130i']+$row_saldo_awal['col_1130j']+$row_saldo_awal['col_1130k']+$row_saldo_awal['col_1130l']+$row_saldo_awal['col_1130m']+$row_saldo_awal['col_1130n']+$row_saldo_awal['col_1130o']+$row_saldo_awal['col_1130p']+$row_saldo_awal['col_1130q']+$row_saldo_awal['col_1130r']+$row_saldo_awal['col_1130s']+$row_saldo_awal['col_1130t'];
  echo formatRupiah($saldoawal);
  ?></td>
        </tr>
        <tr height="30">
        <td colspan="8" align="left">Pendapatan</td>
      </tr>
      <?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From akun_tb where kode_unit='All' and kelompok='Pendapatan' and akun=perkiraan order by akun asc ");
					          $no = 1;
							
                    while ($r = mysql_fetch_array($sql)) {
                      echo "<tr>
          <td align='center'>$r[akun]</td>
          <td align='left'>$r[keterangan]</td>
          <td align='right'></td>
          <td align='right'></td>
          <td align='right'>Rp.</td>
          <td align='right'>";?>
      <?php 
			if($r['index']=='Ya'){
			include 'module/_report/akb_hitung_pdp_index.php';
			}else{
				echo '';
			}
			?>
      <?php echo"</td>
          <td></td>
          <td></td>
        </tr>";
		 $no++;
                    }
                    ?>
      <tr>
        <td colspan="8"><hr /></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>Total Pendapatan</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><?php include 'module/_proses/akb_hitung_ttl_pdp.php';?></td>
      </tr>
      <tr height="30">
        <td colspan="8">Pengeluaran</td>
      </tr>
      <?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From akun_tb where kode_unit='All' and kelompok='Pengeluaran' and akun=perkiraan order by akun asc ");
					          $no = 1;
							
                    while ($r = mysql_fetch_array($sql)) {
                      echo "<tr>
          <td align='center'>$r[akun]</td>
          <td align='left'>$r[keterangan]</td>
          <td align='right'></td>
          <td align='right'></td>
          <td align='right'>Rp.</td>
          <td align='right'>";?>
      <?php 
			if($r['index']=='Ya'){
			include 'module/_report/akb_hitung_pnl_index.php';
			}else{
				echo '';
			}
			?>
      <?php echo"</td>
          <td></td>
          <td></td>
        </tr>";
		 $no++;
                    }
                    ?>
      <tr>
        <td colspan="8"><hr /></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>Total Pengeluaran</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><?php include 'module/_proses/akb_hitung_ttl_pnl.php';?></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>Arus Kas Bersih</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><?php 
  $lr=$ttl_pdp-$ttl_pnl;
  echo formatRupiah($lr);
  ?></td>
      </tr>
      <tr>
        <td colspan="8"><hr /></td>
        </tr>
      <tr>
        <td align="center">1110</td>
        <td>Kas</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td align="right">Rp.</td>
        <td align="right"><?php echo formatRupiah($row_saldo_akhir['col_1110']);?></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
     <?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='-' and jenis='Bank' order by kode_bank asc ");
					          $no = 1;
							
                    while ($r = mysql_fetch_array($sql)) {
                      echo "<tr>
          <td align='center'>1120</td>
          <td align='left'>$r[kode_bank] | $r[nama_bank] | $r[no_rek]</td>
          <td align='right'></td>
          <td align='right'></td>
          <td align='right'>Rp.</td>
          <td align='right'>";?>
            <?php
			if($r['kode_bank']=='Bank 1'){
		  $saldo=$row_saldo_akhir['col_1120a'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Bank 2'){
		  $saldo=$row_saldo_akhir['col_1120b'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Bank 3'){
		  $saldo=$row_saldo_akhir['col_1120c'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Bank 4'){
		  $saldo=$row_saldo_akhir['col_1120d'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Bank 5'){
		  $saldo=$row_saldo_akhir['col_1120e'];
		  echo  formatRupiah($saldo);
			}
		  elseif($r['kode_bank']=='Bank 6'){
		  $saldo=$row_saldo_akhir['col_1120f'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Bank 7'){
		  $saldo=$row_saldo_akhir['col_1120g'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Bank 8'){
		  $saldo=$row_saldo_akhir['col_1120h'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Bank 9'){
		  $saldo=$row_saldo_akhir['col_1120i'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Bank 10'){
		  $saldo=$row_saldo_akhir['col_1120j'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Bank 11'){
		  $saldo=$row_saldo_akhir['col_1120k'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Bank 12'){
		  $saldo=$row_saldo_akhir['col_1120l'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Bank 13'){
		  $saldo=$row_saldo_akhir['col_1120m'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Bank 14'){
		  $saldo=$row_saldo_akhir['col_1120n'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Bank 15'){
		  $saldo=$row_saldo_akhir['col_1120o'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Bank 16'){
		  $saldo=$row_saldo_akhir['col_1120p'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Bank 17'){
		  $saldo=$row_saldo_akhir['col_1120q'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Bank 18'){
		  $saldo=$row_saldo_akhir['col_1120r'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Bank 19'){
		  $saldo=$row_saldo_akhir['col_1120s'];
		  echo  formatRupiah($saldo);
			}
		   elseif($r['kode_bank']=='Bank 20'){
		  $saldo=$row_saldo_akhir['col_1120t'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 1'){
		  $saldo=$row_saldo_akhir['col_1130a'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 2'){
		  $saldo=$row_saldo_akhir['col_1130b'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 3'){
		  $saldo=$row_saldo_akhir['col_1130c'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 4'){
		  $saldo=$row_saldo_akhir['col_1130d'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 5'){
		  $saldo=$row_saldo_akhir['col_1130e'];
		  echo  formatRupiah($saldo);
			}
			 elseif($r['kode_bank']=='Deposito 6'){
		  $saldo=$row_saldo_akhir['col_1130f'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 7'){
		  $saldo=$row_saldo_akhir['col_1130g'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Deposito 8'){
		  $saldo=$row_saldo_akhir['col_1130h'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Deposito 9'){
		  $saldo=$row_saldo_akhir['col_1130i'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Deposito 10'){
		  $saldo=$row_saldo_akhir['col_1130j'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Deposito 11'){
		  $saldo=$row_saldo_akhir['col_1130k'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 12'){
		  $saldo=$row_saldo_akhir['col_1130l'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Deposito 13'){
		  $saldo=$row_saldo_akhir['col_1130m'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Deposito 14'){
		  $saldo=$row_saldo_akhir['col_1130n'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Deposito 15'){
		  $saldo=$row_saldo_akhir['col_1130o'];
		  echo  formatRupiah($saldo);
			}
		elseif($r['kode_bank']=='Deposito 16'){
		  $saldo=$row_saldo_akhir['col_1130p'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 17'){
		  $saldo=$row_saldo_akhir['col_1130q'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 18'){
		  $saldo=$row_saldo_akhir['col_1130r'];
		  echo  formatRupiah($saldo);
			}
			elseif($r['kode_bank']=='Deposito 19'){
		  $saldo=$row_saldo_akhir['col_1130s'];
		  echo  formatRupiah($saldo);
			}
			else{
		  $saldo=$row_saldo_akhir['col_1130t'];
		  echo  formatRupiah($saldo);
			}
			?>
          <?php echo"</td>
          <td></td>
          <td></td>
        </tr>";
		 $no++;
                    }
                    ?>

      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
