<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}


if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  $insertSQL = sprintf("REPLACE INTO saldo_tb (tahun, bulan, kode_unit, key_register, col_1110, col_1120a, col_1120b, col_1120c, col_1120d, col_1120e, col_1120f, col_1120g, col_1120h, col_1120i, col_1120j, col_1120k, col_1120l, col_1120m, col_1120n, col_1120o, col_1120p, col_1120q, col_1120r, col_1120s, col_1120t, col_1130a, col_1130b, col_1130c, col_1130d, col_1130e, col_1130f, col_1130g, col_1130h, col_1130i, col_1130j, col_1130k, col_1130l, col_1130m, col_1130n, col_1130o, col_1130p, col_1130q, col_1130r, col_1130s, col_1130t, col_1140, col_1150, col_1160, col_1170, col_1210, col_1220, col_1230, col_1240, col_1250, col_1300, col_2110, col_2120, col_2130, col_2140, col_2150, col_3000, col_shu) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['tahun'], "text"),
                       GetSQLValueString($_POST['bulan'], "text"),
                       GetSQLValueString($_POST['kode_unit'], "text"),
                       GetSQLValueString($_POST['key'], "text"),
                       GetSQLValueString($_POST['col_1110'], "text"),
                       GetSQLValueString($_POST['col_1120a'], "text"),
                       GetSQLValueString($_POST['col_1120b'], "text"),
                       GetSQLValueString($_POST['col_1120c'], "text"),
                       GetSQLValueString($_POST['col_1120d'], "text"),
                       GetSQLValueString($_POST['col_1120e'], "text"),
					   GetSQLValueString($_POST['col_1120f'], "text"),
					   GetSQLValueString($_POST['col_1120g'], "text"),
					   GetSQLValueString($_POST['col_1120h'], "text"),
					   GetSQLValueString($_POST['col_1120i'], "text"),
					   GetSQLValueString($_POST['col_1120j'], "text"),
					   GetSQLValueString($_POST['col_1120k'], "text"),
					   GetSQLValueString($_POST['col_1120l'], "text"),
					   GetSQLValueString($_POST['col_1120m'], "text"),
					   GetSQLValueString($_POST['col_1120n'], "text"),
					   GetSQLValueString($_POST['col_1120o'], "text"),
					   GetSQLValueString($_POST['col_1120p'], "text"),
					   GetSQLValueString($_POST['col_1120q'], "text"),
					   GetSQLValueString($_POST['col_1120r'], "text"),
					   GetSQLValueString($_POST['col_1120s'], "text"),
					   GetSQLValueString($_POST['col_1120t'], "text"),
                       GetSQLValueString($_POST['col_1130a'], "text"),
                       GetSQLValueString($_POST['col_1130b'], "text"),
                       GetSQLValueString($_POST['col_1130c'], "text"),
                       GetSQLValueString($_POST['col_1130d'], "text"),
                       GetSQLValueString($_POST['col_1130e'], "text"),
					   GetSQLValueString($_POST['col_1130f'], "text"),
					   GetSQLValueString($_POST['col_1130g'], "text"),
					   GetSQLValueString($_POST['col_1130h'], "text"),
					   GetSQLValueString($_POST['col_1130i'], "text"),
					   GetSQLValueString($_POST['col_1130j'], "text"),
					   GetSQLValueString($_POST['col_1130k'], "text"),
					   GetSQLValueString($_POST['col_1130l'], "text"),
					   GetSQLValueString($_POST['col_1130m'], "text"),
					   GetSQLValueString($_POST['col_1130n'], "text"),
					   GetSQLValueString($_POST['col_1130o'], "text"),
					   GetSQLValueString($_POST['col_1130p'], "text"),
					   GetSQLValueString($_POST['col_1130q'], "text"),
					   GetSQLValueString($_POST['col_1130r'], "text"),
					   GetSQLValueString($_POST['col_1130s'], "text"),
					   GetSQLValueString($_POST['col_1130t'], "text"),
                       GetSQLValueString($_POST['col_1140'], "text"),
                       GetSQLValueString($_POST['col_1150'], "text"),
                       GetSQLValueString($_POST['col_1160'], "text"),
					   GetSQLValueString($_POST['col_1170'], "text"),
                       GetSQLValueString($_POST['col_1210'], "text"),
                       GetSQLValueString($_POST['col_1220'], "text"),
                       GetSQLValueString($_POST['col_1230'], "text"),
                       GetSQLValueString($_POST['col_1240'], "text"),
					   GetSQLValueString($_POST['col_1250'], "text"),
                       GetSQLValueString($_POST['col_1300'], "text"),
                       GetSQLValueString($_POST['col_2110'], "text"),
                       GetSQLValueString($_POST['col_2120'], "text"),
                       GetSQLValueString($_POST['col_2130'], "text"),
                       GetSQLValueString($_POST['col_2140'], "text"),
                       GetSQLValueString($_POST['col_2150'], "text"),
                       GetSQLValueString($_POST['col_3000'], "text"),
                       GetSQLValueString($_POST['col_shu'], "text"));
  mysql_select_db($database_sistem, $sistem);
  $Result1 = mysql_query($insertSQL, $sistem) or die(mysql_error());
}
?>

<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />

<table width="100%" border="0" align="center" cellpadding="4" cellspacing="4">
  <tr>
    <td>
          
            <div id="TabbedPanels1" class="TabbedPanels">
              <ul class="TabbedPanelsTabGroup">
                <li class="TabbedPanelsTab" tabindex="0">Setting Neraca</li>
                <li class="TabbedPanelsTab" tabindex="0">Neraca Awal</li>
              </ul>
              <div class="TabbedPanelsContentGroup">
                <div class="TabbedPanelsContent"><form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
                
                 <table width="95%" align="center" cellpadding="1" cellspacing="2" class="form_body">
              <tr>
                <td height="35" colspan="8" align="center"><table class="isi_tabel" width="400" border="0" align="left" cellpadding="2">
                  <tr>
                    <td>Unit</td>
                    <td>:</td>
                    <td><?php echo $_SESSION['kode'];?>
                      <input type="hidden" name="kode_unit" id="kode_unit" value="<?php echo $_SESSION['kode'];?>" />
                      <input type="hidden" name="key" id="key" value="<?php echo $_SESSION['kode'].'/'.'Desember'.'/'.$_SESSION['tahun'];?>" /></td>
                  </tr>
                  <tr>
                    <td width="126">Tahun</td>
                    <td width="8">:</td>
                    <td width="246"><input name="tahun" type="text" required="required" id="tahun" size="4" maxlength="4" /></td>
                  </tr>
                  <tr>
                    <td>Bulan</td>
                    <td>:</td>
                    <td><label for="bulan"></label>
                      <select name="bulan" id="bulan">

                        <option value="Januari">Januari</option>
                        <option value="Februari">Februari</option>
                        <option value="Maret">Maret</option>
                        <option value="April">April</option>
                        <option value="Mei">Mei</option>
                        <option value="Juni">Juni</option>
                        <option value="Juli">Juli</option>
                        <option value="Agustus">Agustus</option>
                        <option value="September">September</option>
                        <option value="Oktober">Oktober</option>
                        <option value="November">November</option>
                        <option value="Desember">Desember</option>
                      </select></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td><input type="submit" name="button" id="button" value="Rekam Data Neraca" class="button" /></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="35" colspan="4" align="center" background="images/bg2.png">AKTIVA</td>
                <td colspan="4" align="center" background="images/bg2.png">PASIVA</td>
              </tr>
              <tr>
                <td height="35" align="center">AKUN</td>
                <td height="35" colspan="3" align="left">AKTIVA LANCAR</td>
                <td align="center">AKUN</td>
                <td colspan="3" align="left">KEWAJIBAN</td>
                </tr>
              <tr>
                <td colspan="8" align="center"></td>
              </tr>
              <tr>
                <td width="100" height="25" align="center">1110</td>
                <td width="169" height="25" align="left">KAS</td>
                <td width="23" height="25" align="right">Rp</td>
                <td width="64" height="25" align="right"><input name="col_1110" type="text" id="col_1110" size="20" maxlength="20" required="required" placeholder="Kas" /></td>
                <td width="64" height="25" align="center">2110</td>
                <td width="233" height="25" align="left">HUTANG USAHA</td>
                <td width="23" height="25" align="right">Rp</td>
                <td width="100" height="25"><input name="col_2110" type="text" required="required" id="col_2110" placeholder="Hutang Usaha" value="0" size="20" maxlength="20" /></td>
              </tr>
              <tr>
                <td height="25" align="center">1120</td>
                <td height="25" align="left">BANK</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right">
                 <?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]' and kode_bank='Bank 1' and jenis='Bank' order by kode_bank asc ");
							  $r1 = mysql_fetch_array($sql);
							  ?>
                <input name="col_1120a" type="text" id="col_1120a" size="20" maxlength="20" value="<?php echo $r1['nominal'];?>" required="required" placeholder="Bank 1" /></td>
                <td height="25" align="center">2120</td>
                <td height="25" align="left">Titipan</td>
                <td height="25" align="right">Rp</td>
                <td height="25"><input name="col_2120" type="text" required="required" id="col_2120" placeholder="Titipan" value="0" size="20" maxlength="20" /></td>
              </tr>
              <tr>
                <td height="25" align="center">&nbsp;</td>
                <td rowspan="9" align="left"><table class="isi_tabel" width="200" border="0" cellpadding="1">
                   <?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]' and jenis='Bank' order by kode_bank asc ");
					          $no = 1;
							
                    while ($r = mysql_fetch_array($sql)) {
                      echo "<tr>
                    <td>$r[kode_bank]</td>
                    <td align='right'>";?><?php echo formatRupiah($r['nominal']);?><?php echo"</td>
                  </tr>";
		 $no++;
                    }
                    ?> 
                </table></td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right">
                 <?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]' and kode_bank='Bank 2' and jenis='Bank' order by kode_bank asc ");
							  $r2 = mysql_fetch_array($sql);
							  ?>
                <input name="col_1120b" type="text" id="col_1120b" size="20" maxlength="20" required="required" value="<?php echo $r2['nominal'];?>" placeholder="Bank 2" /></td>
                <td height="25" align="center">2130</td>
                <td height="25" align="left">Sumbangan dengan Intensi</td>
                <td height="25" align="right">Rp</td>
                <td height="25"><input name="col_2130" type="text" required="required" id="col_2130" placeholder="Sumbangan dengan Intensi" value="0" size="20" maxlength="20" /></td>
                </tr>
              <tr>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right">
                 <?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]' and kode_bank='Bank 3' and jenis='Bank' order by kode_bank asc ");
							  $r3 = mysql_fetch_array($sql);
							  ?>
                <input name="col_1120c" type="text" id="col_1120c" size="20" maxlength="20" value="<?php echo $r3['nominal'];?>" required="required" placeholder="Bank 3" /></td>
                <td height="25" align="center">2140</td>
                <td height="25" align="left">PENDAPATAN DITERIMA DIMUKA</td>
                <td height="25" align="right">Rp</td>
                <td height="25"><input name="col_2140" type="text" required="required" id="col_2140" placeholder="Pen. Dtm Dmk" value="0" size="20" maxlength="20" /></td>
                </tr>
              <tr>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right">
                 <?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]' and kode_bank='Bank 4' and jenis='Bank' order by kode_bank asc ");
							  $r4 = mysql_fetch_array($sql);
							  ?>
                <input name="col_1120d" type="text" id="col_1120d" size="20" maxlength="20" required="required" value="<?php echo $r4['nominal'];?>" placeholder="Bank 4" /></td>
                <td height="25" align="center">2150</td>
                <td height="25" align="left">BIAYA YG MASIH HARUS DIBAYAR</td>
                <td height="25" align="right">Rp</td>
                <td height="25"><input name="col_2150" type="text" required="required" id="col_2150" placeholder="Biaya" value="0" size="20" maxlength="20" /></td>
                </tr>
              <tr>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right">
                 <?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]' and kode_bank='Bank 5' and jenis='Bank' order by kode_bank asc ");
							  $r5 = mysql_fetch_array($sql);
							  ?>
                <input name="col_1120e" type="text" id="col_1120e" size="20" maxlength="20" required="required" value="<?php echo $r5['nominal'];?>" placeholder="Bank 5" /></td>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]' and kode_bank='Bank 5' and jenis='Bank' order by kode_bank asc ");
							  $r6 = mysql_fetch_array($sql);
							  ?>                  <input name="col_1120f" type="text" id="col_1120f" size="20" maxlength="20" value="<?php echo $r6['nominal'];?>" required="required" placeholder="Bank 6" /></td>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]' and kode_bank='Bank 5' and jenis='Bank' order by kode_bank asc ");
							  $r7 = mysql_fetch_array($sql);
							  ?>                  <input name="col_1120g" type="text" id="col_1120g" size="20" maxlength="20" value="<?php echo $r7['nominal'];?>" required="required" placeholder="Bank 7" /></td>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]' and kode_bank='Bank 5' and jenis='Bank' order by kode_bank asc ");
							  $r8 = mysql_fetch_array($sql);
							  ?>                  <input name="col_1120h" type="text" id="col_1120h" size="20" maxlength="20" value="<?php echo $r8['nominal'];?>" required="required" placeholder="Bank 8" /></td>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]' and kode_bank='Bank 5' and jenis='Bank' order by kode_bank asc ");
							  $r9 = mysql_fetch_array($sql);
							  ?>                  <input name="col_1120i" type="text" id="col_1120i" size="20" maxlength="20" value="<?php echo $r9['nominal'];?>" required="required" placeholder="Bank 9" /></td>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]' and kode_bank='Bank 5' and jenis='Bank' order by kode_bank asc ");
							  $r10 = mysql_fetch_array($sql);
							  ?>                  <input name="col_1120j" type="text" id="col_1120j" size="20" maxlength="20" required="required" value="<?php echo $r10['nominal'];?>" placeholder="Bank 10" /></td>
                <td height="25" align="center"><input name="col_1120l" type="hidden" required="required" id="col_1120l" placeholder="Bank 12" value="0" size="20" maxlength="20" />                  <input name="col_1120k" type="hidden" required="required" id="col_1120k" placeholder="Bank 11" value="0" size="20" maxlength="20" />
                  <input name="col_1120m" type="hidden" required="required" id="col_1120m" placeholder="Bank 13" value="0" size="20" maxlength="20" />
                  <input name="col_1120n" type="hidden" required="required" id="col_1120n" placeholder="Bank 14" value="0" size="20" maxlength="20" />
                  <input name="col_1120o" type="hidden" required="required" id="col_1120o" placeholder="Bank 15" value="0" size="20" maxlength="20"/>
                  <input name="col_1120p" type="hidden" required="required" id="col_1120p" placeholder="Bank 16" value="0" size="20" maxlength="20" />
                  <input name="col_1120q" type="hidden" required="required" id="col_1120q" placeholder="Bank 17" value="0" size="20" maxlength="20" />
                  <input name="col_1120r" type="hidden" required="required" id="col_1120r" placeholder="Bank 18" value="0" size="20" maxlength="20" />
                  <input name="col_1120s" type="hidden" required="required" id="col_1120s" placeholder="Bank 19" value="0" size="20" maxlength="20"/>
                  <input name="col_1120t" type="hidden" required="required" id="col_1120t" placeholder="Bank 20" value="0" size="20" maxlength="20"/></td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">1130</td>
                <td height="25" align="left">DEPOSITO</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right">
                 <?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]'  and jenis='Deposito' and kode_bank='Deposito 1' order by kode_bank asc ");
					$dp1 = mysql_fetch_array($sql);
					?>
                <input name="col_1130a" type="text" required="required" id="col_1130a" value="<?php echo $dp1['nominal'];?>" placeholder="Deposito 1" size="20" maxlength="20" /></td>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">&nbsp;</td>
                <td rowspan="9" align="left"><table class="isi_tabel" width="200" border="0" cellpadding="1">
                   <?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>
                    <td>$r[kode_bank]</td>
                    <td align='right'>";?><?php echo formatRupiah($r['nominal']);?><?php echo"</td>
                  </tr>";
		 $no++;
                    }
                    ?> 
                </table></td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]'  and jenis='Deposito' and kode_bank='Deposito 2' order by kode_bank asc ");
					$dp2 = mysql_fetch_array($sql);
					?>                  <input name="col_1130b" type="text" required="required" id="col_1130b" value="<?php echo $dp2['nominal'];?>" placeholder="Deposito 2" size="20" maxlength="20" /></td>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]'  and jenis='Deposito' and kode_bank='Deposito 3' order by kode_bank asc ");
					$dp3 = mysql_fetch_array($sql);
					?>                  <input name="col_1130c" type="text" required="required" id="col_1130c" value="<?php echo $dp3['nominal'];?>" placeholder="Deposito 3" size="20" maxlength="20" /></td>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]'  and jenis='Deposito' and kode_bank='Deposito 4' order by kode_bank asc ");
					$dp4 = mysql_fetch_array($sql);
					?>                  <input name="col_1130d" type="text" required="required" id="col_1130d" value="<?php echo $dp4['nominal'];?>" placeholder="Deposito 4" size="20" maxlength="20" /></td>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]'  and jenis='Deposito' and kode_bank='Deposito 5' order by kode_bank asc ");
					$dp5 = mysql_fetch_array($sql);
					?>                  <input name="col_1130e" type="text" required="required" id="col_1130e" value="<?php echo $dp5['nominal'];?>" placeholder="Deposito 5" size="20" maxlength="20" /></td>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]'  and jenis='Deposito' and kode_bank='Deposito 6' order by kode_bank asc ");
					$dp6 = mysql_fetch_array($sql);
					?>                  <input name="col_1130f" type="text" required="required" id="col_1130f" value="<?php echo $dp6['nominal'];?>" placeholder="Deposito 6" size="20" maxlength="20" /></td>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]'  and jenis='Deposito' and kode_bank='Deposito 7' order by kode_bank asc ");
					$dp7 = mysql_fetch_array($sql);
					?>                  <input name="col_1130g" type="text" required="required" id="col_1130g" value="<?php echo $dp7['nominal'];?>" placeholder="Deposito 7" size="20" maxlength="20" /></td>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]'  and jenis='Deposito' and kode_bank='Deposito 8' order by kode_bank asc ");
					$dp8 = mysql_fetch_array($sql);
					?>                  <input name="col_1130h" type="text" required="required" id="col_1130h" value="<?php echo $dp8['nominal'];?>" placeholder="Deposito 8" size="20" maxlength="20" /></td>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]'  and jenis='Deposito' and kode_bank='Deposito 9' order by kode_bank asc ");
					$dp9 = mysql_fetch_array($sql);
					?>                  <input name="col_1130i" type="text" required="required" id="col_1130i" value="<?php echo $dp9['nominal'];?>" placeholder="Deposito 9" size="20" maxlength="20"/></td>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]'  and jenis='Deposito' and kode_bank='Deposito 10' order by kode_bank asc ");
					$dp10 = mysql_fetch_array($sql);
					?>                  <input name="col_1130j" type="text" required="required" id="col_1130j" value="<?php echo $dp10['nominal'];?>" placeholder="Deposito 10" size="20" maxlength="20" /></td>
                <td height="25" align="center"><input name="col_1130k" type="hidden" required="required" id="col_1130k" placeholder="Deposito 11" value="0" size="20" maxlength="20"/>
                  <input name="col_1130l" type="hidden" required="required" id="col_1130l" placeholder="Deposito 12" value="0" size="20" maxlength="20"/>
                  <input name="col_1130m" type="hidden" required="required" id="col_1130m" placeholder="Deposito 13" value="0" size="20" maxlength="20" />
                  <input name="col_1130n" type="hidden" required="required" id="col_1130n" placeholder="Deposito 14" value="0" size="20" maxlength="20" />
                  <input name="col_1130o" type="hidden" required="required" id="col_1130o" placeholder="Deposito 15" value="0" size="20" maxlength="20" />
                  <input name="col_1130p" type="hidden" required="required" id="col_1130p" placeholder="Deposito 16" value="0" size="20" maxlength="20" />
                  <input name="col_1130q" type="hidden" required="required" id="col_1130q" placeholder="Deposito 17" value="0" size="20" maxlength="20" />
                  <input name="col_1130r" type="hidden" required="required" id="col_1130r" placeholder="Deposito 18" value="0" size="20" maxlength="20" />
                  <input name="col_1130s" type="hidden" required="required" id="col_1130s" placeholder="Deposito 19" value="0" size="20" maxlength="20" />
                  <input name="col_1130t" type="hidden" required="required" id="col_1130t" placeholder="Deposito 20" value="0" size="20" maxlength="20" /></td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">1140</td>
                <td height="25" align="left">PIUTANG</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><input name="col_1140" type="text" required="required" id="col_1140" placeholder="Piutang" value="0" size="20" maxlength="20" /></td>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">1150</td>
                <td height="25" align="left">PERSEDIAAN</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><input name="col_1150" type="text" required="required" id="col_1150" placeholder="Persediaan" value="0" size="20" maxlength="20" /></td>
                <td height="25" align="center">&nbsp;</td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">1160</td>
                <td height="25" align="left">Piutang Lain</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><input name="col_1160" type="text" required="required" id="col_1160" placeholder="Biaya Dby Dmk" value="0" size="20" maxlength="20" /></td>
                <td height="25" align="center"></td>
                <td height="25" align="left"></td>
                <td height="25" align="right"></td>
                <td height="25"></td>
              </tr>
              <tr>
                <td height="25" align="center">1170</td>
                <td height="25" align="left">INVESTASI LAINNYA</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><input name="col_1170" type="text" required="required" id="col_1170" placeholder="Investasi" value="0" size="20" maxlength="20"/></td>
                <td height="25" align="center"></td>
                <td height="25" align="left"></td>
                <td height="25" align="right"></td>
                <td height="25"></td>
              </tr>
              <tr>
                <td height="20" colspan="8" align="center"><hr/></td>
              </tr>
              <tr>
                <td align="center"></td>
                <td align="left"></td>
                <td align="right"></td>
                <td align="right"></td>
                <td align="center"></td>
                <td align="left"></td>
                <td align="right"></td>
                <td></td>
              </tr>
              <tr>
                <td height="30" align="center"></td>
                <td align="left">AKTIVA TETAP</td>
                <td align="right"></td>
                <td align="right"></td>
                <td align="center"></td>
                <td align="left"></td>
                <td align="right"></td>
                <td></td>
              </tr>
              <tr>
                <td height="25" align="center">1210</td>
                <td rowspan="4" align="left"><table class="isi_tabel" width="200" border="0" cellpadding="1">
                   <?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT sum(nominal)as nilai, akun From aktiva_tb where kode_unit='$_SESSION[kode]' group by akun asc ");
					          $no = 1;
							
                    while ($r = mysql_fetch_array($sql)) {
                      echo "<tr>
                    <td>$r[akun]</td>
                    <td align='right'>";?><?php echo formatRupiah($r['nilai']);?><?php echo"</td>
                  </tr>";
		 $no++;
                    }
                    ?> 
                </table></td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right">
                <?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT sum(nominal)as nilai, akun From aktiva_tb where kode_unit='$_SESSION[kode]' and akun='1210'");
					$tanah = mysql_fetch_array($sql);
					?>
                <input name="col_1210" type="text" id="col_1210" size="20" maxlength="20" required="required" placeholder="Tanah" value="<?php echo $tanah['nilai'];?>" /></td>
                <td height="25" align="center">3000</td>
                <td height="25" align="left">MODAL</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><input name="col_3000" type="text" required="required" id="col_3000" placeholder="Modal" value="0" size="20" maxlength="20" /></td>
              </tr>
              <tr>
                <td height="25" align="center">1220</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT sum(nominal)as nilai, akun From aktiva_tb where kode_unit='$_SESSION[kode]' and akun='1220'");
					$gedung = mysql_fetch_array($sql);
					?>                  <input name="col_1220" type="text" id="col_1220" size="20" maxlength="20" required="required" placeholder="Gedung" value="<?php echo $gedung['nilai'];?>" /></td>
                <td height="25" align="center"></td>
                <td height="25" align="left">SHU DITAHAN</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><input name="col_shu" type="text" required="required" id="col_shu" placeholder="SHU" value="0" size="20" maxlength="20" /></td>
                </tr>
              <tr>
                <td height="25" align="center">1230</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT sum(nominal)as nilai, akun From aktiva_tb where kode_unit='$_SESSION[kode]' and akun='1230'");
					$kendaraan = mysql_fetch_array($sql);
					?>                  <input name="col_1230" type="text" id="col_1230" size="20" maxlength="20" required="required" placeholder="Kendaraan" value="<?php echo $kendaraan['nilai'];?>" /></td>
                <td height="25" align="center"></td>
                <td height="25" align="left">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
                <td height="25" align="right">&nbsp;</td>
              </tr>
              <tr>
                <td height="25" align="center">1240</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT sum(nominal)as nilai, akun From aktiva_tb where kode_unit='$_SESSION[kode]' and akun='1240'");
					$inventaris = mysql_fetch_array($sql);
					?>                  <input name="col_1240" type="text" id="col_1240" size="20" maxlength="20" required="required" placeholder="Inventaris" value="<?php echo $inventaris['nilai'];?>" /></td>
                <td height="25" align="center"></td>
                <td height="25" align="left"></td>
                <td height="25" align="right"></td>
                <td height="25"></td>
              </tr>
              <tr>
                <td height="25" align="center">1250</td>
                <td height="25" align="left">AKTIVA TETAP LAINNYA</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><input name="col_1250" type="text" required="required" id="col_1250" placeholder="Aktiva Lain" value="0" size="20" maxlength="20" /></td>
                <td height="25" align="center"></td>
                <td height="25" align="left"></td>
                <td height="25" align="right"></td>
                <td height="25"></td>
              </tr>
              <tr>
                <td height="25" align="center">1300</td>
                <td height="25" align="left">AKUMULASI PENYUSUTAN</td>
                <td height="25" align="right">Rp</td>
                <td height="25" align="right"><input name="col_1300" type="text" required="required" id="col_1300" placeholder="Akumulasi" value="0" size="20" maxlength="20" /></td>
                <td height="25" align="center"></td>
                <td height="25" align="left"></td>
                <td height="25" align="right"></td>
                <td height="25"></td>
              </tr>
              <tr>
                <td align="center"></td>
                <td align="left"></td>
                <td align="right"></td>
                <td align="right"></td>
                <td align="center"></td>
                <td align="left"></td>
                <td align="right"></td>
                <td></td>
              </tr>
              <tr>
                <td height="20" colspan="8" align="center">&nbsp;</td>
              </tr>
              <tr height="30">
                <td colspan="8" align="center"></td>
              </tr>
            </table>
            <input type="hidden" name="MM_insert" value="form1" />
      </form>
                </div>
                <div class="TabbedPanelsContent">
                <?php
				mysql_select_db($database_sistem, $sistem);
$query_saldo_awal = "SELECT * FROM saldo_tb where kode_unit='$_SESSION[kode]' and bulan='Desember' and tahun='2023' order by id asc";
$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);
				?>
                <table width="95%" align="center" cellpadding="5" cellspacing="5" class="form_body">
                  <tr>
                    <td height="35" colspan="8" align="center"><table class="isi_tabel" width="400" border="0" align="left" cellpadding="2">
                      <tr>
                        <td>Unit</td>
                        <td>:</td>
                        <td><?php echo $_SESSION['kode'];?></td>
                      </tr>
                      <tr>
                        <td width="126">Tahun</td>
                        <td width="8">:</td>
                        <td width="246"><?php echo $row_saldo_awal['tahun'];?></td>
                      </tr>
                      <tr>
                        <td>Bulan</td>
                        <td>:</td>
                        <td><?php echo $row_saldo_awal['bulan'];?></td>
                      </tr>
                      <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                        <td><form id="form2" name="form2" method="post" action="?section=Setting&module=update_neraca">
                          <input type="submit" name="update" id="update" value="Update Neraca Awal" class="button" />
                          <input type="hidden" name="reg" id="reg" value="<?php echo $row_saldo_awal['key_register'];?>" />
                        </form></td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td height="35" colspan="4" align="center" background="images/bg2.png">AKTIVA</td>
                    <td colspan="4" align="center" background="images/bg2.png">PASIVA</td>
                  </tr>
                  <tr>
                    <td height="35" align="center">AKUN</td>
                    <td height="35" colspan="3" align="left">AKTIVA LANCAR</td>
                    <td align="center">AKUN</td>
                    <td colspan="3" align="left">KEWAJIBAN</td>
                  </tr>
                  <tr>
                    <td colspan="8" align="center"></td>
                  </tr>
                  <tr>
                    <td width="100" height="25" align="center">1110</td>
                    <td width="169" height="25" align="left">KAS</td>
                    <td width="23" height="25" align="right">Rp</td>
                    <td width="64" height="25" align="right"><?php echo formatRupiah($row_saldo_awal['col_1110']);?></td>
                    <td width="64" height="25" align="center">2110</td>
                    <td width="233" height="25" align="left">HUTANG USAHA</td>
                    <td width="23" height="25" align="right">Rp</td>
                    <td width="100" height="25"><?php echo formatRupiah($row_saldo_awal['col_2110']);?></td>
                  </tr>
                  <tr>
                    <td height="25" align="center">1120</td>
                    <td height="25" colspan="3" rowspan="5" align="right" valign="top"><table class="form_body" width="200" border="0" cellpadding="1">
                      <?php        mysql_select_db("csabrude_akurat");
					          $sql = mysql_query("SELECT * From bank_tb where kode_unit='$_SESSION[kode]' and jenis='Bank' order by kode_bank asc ");
					          $no = 1;
							
                    while ($r = mysql_fetch_array($sql)) {
                      echo "<tr>
                    <td align='left'>$r[kode_bank]</td>
                    <td align='right'>";?>
                      <?php echo formatRupiah($r['nominal']);?><?php echo"</td>
                  </tr>";
		 $no++;
                    }
                    ?>
                    </table></td>
                    <td height="25" align="center">2120</td>
                    <td height="25" align="left">Titipan</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25"><?php echo formatRupiah($row_saldo_awal['col_2120']);?></td>
                  </tr>
                  <tr>
                    <td height="25" align="center">&nbsp;</td>
                    <td height="25" align="center">2130</td>
                    <td height="25" align="left">Sumbangan dengan Intensi</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25"><?php echo formatRupiah($row_saldo_awal['col_2130']);?></td>
                  </tr>
                  <tr>
                    <td height="25" align="center">&nbsp;</td>
                    <td height="25" align="center">2140</td>
                    <td height="25" align="left">PENDAPATAN DITERIMA DIMUKA</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25"><?php echo formatRupiah($row_saldo_awal['col_2140']);?></td>
                  </tr>
                  <tr>
                    <td height="25" align="center">&nbsp;</td>
                    <td height="25" align="center">2150</td>
                    <td height="25" align="left">BIAYA YG MASIH HARUS DIBAYAR</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25"><?php echo formatRupiah($row_saldo_awal['col_2150']);?></td>
                  </tr>
                  <tr>
                    <td height="25" align="center">&nbsp;</td>
                    <td height="25" align="center">&nbsp;</td>
                    <td height="25" align="left">&nbsp;</td>
                    <td height="25" align="right">&nbsp;</td>
                    <td height="25">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="25" align="center">1130</td>
                    <td height="25" colspan="3" rowspan="5" align="right" valign="top"><table class="form_body" width="200" border="0" cellpadding="1">
                      <?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>
                    <td align='left'>$r[kode_bank]</td>
                    <td align='right'>";?>
                      <?php echo formatRupiah($r['nominal']);?><?php echo"</td>
                  </tr>";
		 $no++;
                    }
                    ?>
                    </table></td>
                    <td height="25" align="center">&nbsp;</td>
                    <td height="25" align="left">&nbsp;</td>
                    <td height="25" align="right">&nbsp;</td>
                    <td height="25">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="25" align="center">&nbsp;</td>
                    <td height="25" align="center">&nbsp;</td>
                    <td height="25" align="left">&nbsp;</td>
                    <td height="25" align="right">&nbsp;</td>
                    <td height="25">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="25" align="center">&nbsp;</td>
                    <td height="25" align="center">&nbsp;</td>
                    <td height="25" align="left">&nbsp;</td>
                    <td height="25" align="right">&nbsp;</td>
                    <td height="25">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="25" align="center">&nbsp;</td>
                    <td height="25" align="center">&nbsp;</td>
                    <td height="25" align="left">&nbsp;</td>
                    <td height="25" align="right">&nbsp;</td>
                    <td height="25">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="25" align="center">&nbsp;</td>
                    <td height="25" align="center">&nbsp;</td>
                    <td height="25" align="left">&nbsp;</td>
                    <td height="25" align="right">&nbsp;</td>
                    <td height="25">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="25" align="center">1140</td>
                    <td height="25" align="left">PIUTANG</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25" align="right"><?php echo formatRupiah($row_saldo_awal['col_1140']);?></td>
                    <td height="25" align="center">&nbsp;</td>
                    <td height="25" align="left">&nbsp;</td>
                    <td height="25" align="right">&nbsp;</td>
                    <td height="25">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="25" align="center">1150</td>
                    <td height="25" align="left">PERSEDIAAN</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25" align="right"><?php echo formatRupiah($row_saldo_awal['col_1150']);?></td>
                    <td height="25" align="center">&nbsp;</td>
                    <td height="25" align="left">&nbsp;</td>
                    <td height="25" align="right">&nbsp;</td>
                    <td height="25">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="25" align="center">1160</td>
                    <td height="25" align="left">Piutang Lain</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25" align="right"><?php echo formatRupiah($row_saldo_awal['col_1160']);?></td>
                    <td height="25" align="center"></td>
                    <td height="25" align="left"></td>
                    <td height="25" align="right"></td>
                    <td height="25"></td>
                  </tr>
                  <tr>
                    <td height="25" align="center">1170</td>
                    <td height="25" align="left">INVESTASI LAINNYA</td>
                    <td height="25" align="right">Rp.</td>
                    <td height="25" align="right"><?php echo formatRupiah($row_saldo_awal['col_1170']);?></td>
                    <td height="25" align="center"></td>
                    <td height="25" align="left"></td>
                    <td height="25" align="right"></td>
                    <td height="25"></td>
                  </tr>
                  <tr>
                    <td height="20" colspan="8" align="center"><hr/></td>
                  </tr>
                  <tr>
                    <td height="25" colspan="2" align="center">JUMLAH AKTIVA LANCAR</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25" align="right"><?php 
	$aktiva_lancar=$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']+$row_saldo_awal['col_1140']+$row_saldo_awal['col_1150']+$row_saldo_awal['col_1160']+$row_saldo_awal['col_1170'];
	echo formatRupiah($aktiva_lancar);?></td>
                    <td height="25" colspan="2" align="center">JUMLAH KEWAJIBAN</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25" align="right"><?php 
	$jumlah_kewajiban=$row_saldo_awal['col_2110']+$row_saldo_awal['col_2120']+$row_saldo_awal['col_2130']+$row_saldo_awal['col_2140']+$row_saldo_awal['col_2150'];
	echo formatRupiah($jumlah_kewajiban);?></td>
                  </tr>
                  <tr>
                    <td align="center"></td>
                    <td align="left"></td>
                    <td align="right"></td>
                    <td align="right"></td>
                    <td align="center"></td>
                    <td align="left"></td>
                    <td align="right"></td>
                    <td></td>
                  </tr>
                  <tr>
                    <td height="30" align="center"></td>
                    <td align="left">AKTIVA TETAP</td>
                    <td align="right"></td>
                    <td align="right"></td>
                    <td align="center"></td>
                    <td align="left"></td>
                    <td align="right"></td>
                    <td></td>
                  </tr>
                  <tr>
                    <td height="25" align="center">1210</td>
                    <td height="25" align="left">TANAH</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25" align="right"><?php echo formatRupiah($row_saldo_awal['col_1210']);?></td>
                    <td height="25" align="center">3000</td>
                    <td height="25" align="left">MODAL</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25" align="right"><?php echo formatRupiah($row_saldo_awal['col_3000']);?></td>
                  </tr>
                  <tr>
                    <td height="25" align="center">1220</td>
                    <td height="25" align="left">GEDUNG</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25" align="right"><?php echo formatRupiah($row_saldo_awal['col_1220']);?></td>
                    <td height="25" align="center"></td>
                    <td height="25" align="left"></td>
                    <td height="25" align="right"></td>
                    <td height="25"></td>
                  </tr>
                  <tr>
                    <td height="25" align="center">1230</td>
                    <td height="25" align="left">KENDARAAN</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25" align="right"><?php echo formatRupiah($row_saldo_awal['col_1230']);?></td>
                    <td height="25" align="center"></td>
                    <td height="25" align="left">SHU DITAHAN</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25" align="right"><?php echo formatRupiah($row_saldo_awal['col_shu']);?></td>
                  </tr>
                  <tr>
                    <td height="25" align="center">1240</td>
                    <td height="25" align="left">INVENTARIS</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25" align="right"><?php echo formatRupiah($row_saldo_awal['col_1240']);?></td>
                    <td height="25" align="center"></td>
                    <td height="25" align="left"></td>
                    <td height="25" align="right"></td>
                    <td height="25"></td>
                  </tr>
                  <tr>
                    <td height="25" align="center">1250</td>
                    <td height="25" align="left">AKTIVA TETAP LAINNYA</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25" align="right"><?php echo formatRupiah($row_saldo_awal['col_1250']);?></td>
                    <td height="25" align="center"></td>
                    <td height="25" align="left">&nbsp;</td>
                    <td height="25" align="right">&nbsp;</td>
                    <td height="25" align="right">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="25" align="center"></td>
                    <td height="25" align="left">JUMLAH AKTIVA TETAP</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25" align="right"><?php 
	$aktiva_tetap=$row_saldo_awal['col_1210']+$row_saldo_awal['col_1220']+$row_saldo_awal['col_1230']+$row_saldo_awal['col_1240']+$row_saldo_awal['col_1250'];
	echo formatRupiah($aktiva_tetap);?></td>
                    <td height="25" align="center"></td>
                    <td height="25" align="left">JUMLAH MODAL</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25" align="right"><?php 
	$jumlah_modal=$row_saldo_awal['col_3000']+$row_saldo_awal['col_shu'];
	echo formatRupiah($jumlah_modal);?></td>
                  </tr>
                  <tr>
                    <td height="25" align="center"></td>
                    <td height="25" align="left"></td>
                    <td height="25" align="right"></td>
                    <td height="25" align="right"></td>
                    <td height="25" align="center"></td>
                    <td height="25" align="left"></td>
                    <td height="25" align="right"></td>
                    <td height="25"></td>
                  </tr>
                  <tr>
                    <td height="25" align="center">1300</td>
                    <td height="25" align="left">AKUMULASI PENYUSUTAN</td>
                    <td height="25" align="right">Rp</td>
                    <td height="25" align="right"><?php echo formatRupiah($row_saldo_awal['col_1300']);?></td>
                    <td height="25" align="center"></td>
                    <td height="25" align="left"></td>
                    <td height="25" align="right"></td>
                    <td height="25"></td>
                  </tr>
                  <tr>
                    <td align="center"></td>
                    <td align="left"></td>
                    <td align="right"></td>
                    <td align="right"></td>
                    <td align="center"></td>
                    <td align="left"></td>
                    <td align="right"></td>
                    <td></td>
                  </tr>
                  <tr>
                    <td height="20" colspan="8" align="center"><hr/></td>
                  </tr>
                  <tr>
                    <td height="30" align="center"></td>
                    <td align="left">JUMLAH AKTIVA</td>
                    <td align="right">Rp</td>
                    <td align="right"><?php 
	$total_aktiva=($aktiva_lancar+$aktiva_tetap)-$row_saldo_awal['col_1300'];
	echo formatRupiah($total_aktiva);?></td>
                    <td align="center"></td>
                    <td align="left">JUMLAH MODAL DAN KEWAJIBAN</td>
                    <td align="right">Rp</td>
                    <td align="right"><?php 
	$total_mk=$jumlah_kewajiban+$jumlah_modal;
	echo formatRupiah($total_mk);?></td>
                  </tr>
                  <tr height="30">
                    <td colspan="8" align="center"></td>
                  </tr>
                </table>
                </div>
              </div>
            </div>
    </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<p>&nbsp;</p>
<script type="text/javascript">
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
</script>
