


<!DOCTYPE html>
<html>
<head>
  <title>Cetak LAPORAN PERUBAHAN EKUITAS</title>
</head>
<body>

  <style type="text/css">
    body{
      font-family: arial;
    }

    .table{
      width: 100%;
    }

    th,td{
    }
    .table,
    .table th,
    .table td {
      padding: 5px;
      border: 1px solid black;
      border-collapse: collapse;
    }
  </style>
  <?php 
    include '../koneksi.php';
    include '../fungsi_indotgl.php';

    $tgl=date('Y-m-d') ;
    $bln = date('m');
    $bulan=($bln) ;
            //////////////////////////////////////////////////////////////////////////// 
            $kdc   =$_SESSION['kdc'];
            $oleh 			= $_GET['toleh'];
            $tabel_tujuan   = "nawal_".$oleh; 
            $tabel_asal     = "nawal";
            //////////////////////////////////////////////////////////////////////////// 
                $sql0 = mysqli_query($koneksi, "SELECT tgl_htg,tgl_sd FROM $tabel_tujuan WHERE mutasid>=1 limit 1 ");
                list($tgl_htg,$tgl_sd) = mysqli_fetch_array($sql0);            
              $tgl_d    = $tgl_htg;
              $tgl_s    = $tgl_sd;
              
              $tgl_ke_1 =date('2025-01-01');        
              $tgl_p    =strtotime("$tgl_d");
              $tgl_lalu =date('Y-m-d', strtotime("-1 day", $tgl_p));
            //////////////////////////////////////////////////////////////////////////// 
        $sql2 = mysqli_query($koneksi, "SELECT kota,keuangan,gambar FROM kdkanca WHERE kd='$kdc'");
        list($kota,$keuangan,$gambar) = mysqli_fetch_array($sql2);
        $jabatan='Bidang Akuntansi';
        
    ?>  
<!DOCTYPE html PUBLIC "-//W3C//DTD       XHTML       1.0       Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title></head><body><img src="../gambar/<?php echo $gambar; ?>"></a><div align="center"></div>
  <center>
    <h3></h3>
  </center>
	<table border="0" width="100%" style="border-collapse:collapse;" align="center">
    	<tr class="tableheader">
            <tr class="tr-title">
              <thead>
            <tr>
                <th Style="text-align:center" colspan="10" >LAPORAN PERUBAHAN EKUITAS</th>
            </tr>  
            <tr>
                <th Style="text-align:center" colspan="10" >Dari <?php echo date('d-m-Y', strtotime($tgl_d)); ?> s/d <?php echo date('d-m-Y', strtotime($tgl_s)); ?></th>
            </tr>             
             
            <tr>
            	<tr style="border-top: 2px solid black; border-bottom: 2px solid black;">
            	<th style="text-align:center; vertical-align: middle; background-color: #D3D3D3;" colspan="3" rowspan="2">Keterangan</th>
                <th Style="text-align:center; vertical-align: middle; background-color: #D3D3D3;" colspan="2" bgcolor="#DCDCDC">Modal </th>
                <th Style="text-align:center; vertical-align: middle; background-color: #D3D3D3;" colspan="2" bgcolor="#DCDCDC">Cadangan </th>
                <th style="text-align:center; vertical-align: middle; background-color: #D3D3D3;" colspan="1"; rowspan="2"; bgcolor="#D3D3D3">Ekuitas Lain</th>                
                <th style="text-align:center; vertical-align: middle; background-color: #D3D3D3;" colspan="1"; rowspan="2"; bgcolor="#D3D3D3">SHU</th>
                <th style="text-align:center; vertical-align: middle; background-color: #D3D3D3;" colspan="1"; rowspan="2"; bgcolor="#D3D3D3">TOTAL</th>
            </tr>     
            <tr>
                <th Style="text-align:center; background-color: #D3D3D3;">Simp Pokok </th>
                <th Style="text-align:center; background-color: #D3D3D3;">Simp Wajib </th>
                <th Style="text-align:center; background-color: #D3D3D3;">Umum </th>
                <th Style="text-align:center; background-color: #D3D3D3;">Resiko </th>   
                <tr style="border-top: 2px solid black; border-bottom: 2px solid black;">        
            </tr>                                  
          </thead>
                  
          <tbody>
            <?php
                $sqlxp = mysqli_query($koneksi, "SELECT sum(awalk) AS so_awal_pokok FROM $tabel_tujuan WHERE noperk='31101' limit 1 ");
                list($so_awal_pokok) = mysqli_fetch_array($sqlxp);
                $sqlxw = mysqli_query($koneksi, "SELECT sum(awalk) AS so_awal_wajib FROM $tabel_tujuan WHERE noperk='31102' limit 1 ");
                list($so_awal_wajib) = mysqli_fetch_array($sqlxw);
                $sqlxc1 = mysqli_query($koneksi, "SELECT sum(awalk) AS so_awal_c1 FROM $tabel_tujuan WHERE noperk='31201' limit 1 ");
                list($so_awal_c1) = mysqli_fetch_array($sqlxc1);
                $sqlxc2 = mysqli_query($koneksi, "SELECT sum(awalk) AS so_awal_c2 FROM $tabel_tujuan WHERE noperk='31202' limit 1 ");
                list($so_awal_c2) = mysqli_fetch_array($sqlxc2);
                $sqlxel = mysqli_query($koneksi, "SELECT sum(awalk) AS so_awal_el FROM $tabel_tujuan WHERE noperk='31103' limit 1 ");
                list($so_awal_el) = mysqli_fetch_array($sqlxel);
                $sqlxel2 = mysqli_query($koneksi, "SELECT sum(awalk) AS so_awal_el2 FROM $tabel_tujuan WHERE noperk='32101' limit 1 ");
                list($so_awal_el2) = mysqli_fetch_array($sqlxel2);
                	$so_awal_elain=$so_awal_el+$so_awal_el2 ;
                $sqlxshu = mysqli_query($koneksi, "SELECT sum(awalk) AS so_awal_shu FROM $tabel_tujuan WHERE noperk>='33101' and noperk<='39101'");
                list($so_awal_shu) = mysqli_fetch_array($sqlxshu);
                $total_awal=$so_awal_pokok+$so_awal_wajib+$so_awal_c1+$so_awal_c2+$so_awal_el+$so_awal_shu ;
            ?>          	
                <tr>
                    <td align='right' style="font-weight: normal;">1. </td>
                    <td colspan="2" style="font-weight: normal;text-align: left;">Saldo Awal Per : <?php echo date('d-m-Y', strtotime($tgl_d)); ?> </td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$so_awal_pokok", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$so_awal_wajib", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$so_awal_c1", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$so_awal_c2", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$so_awal_elain", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$so_awal_shu", 0, ",", "."); ?></td>   
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$total_awal", 0, ",", "."); ?></td>                  
                </tr>          	

            <?php
                $sqlxp = mysqli_query($koneksi, "SELECT sum(mutasik) AS so_mt_pokok FROM $tabel_tujuan WHERE noperk='31101' limit 1 ");
                list($so_mt_pokok) = mysqli_fetch_array($sqlxp);
                $sqlxw = mysqli_query($koneksi, "SELECT sum(mutasik) AS so_mt_wajib FROM $tabel_tujuan WHERE noperk='31102' limit 1 ");
                list($so_mt_wajib) = mysqli_fetch_array($sqlxw);
                $sqlxc1 = mysqli_query($koneksi, "SELECT sum(mutasik) AS so_mt_c1 FROM $tabel_tujuan WHERE noperk='31201' limit 1 ");
                list($so_mt_c1) = mysqli_fetch_array($sqlxc1);
                $sqlxc2 = mysqli_query($koneksi, "SELECT sum(mutasik) AS so_mt_c2 FROM $tabel_tujuan WHERE noperk='31202' limit 1 ");
                list($so_mt_c2) = mysqli_fetch_array($sqlxc2);
                $sqlxel = mysqli_query($koneksi, "SELECT sum(mutasik) AS so_mt_el FROM $tabel_tujuan WHERE noperk='31103' limit 1 ");
                list($so_mt_el) = mysqli_fetch_array($sqlxel);
                $sqlxel2 = mysqli_query($koneksi, "SELECT sum(mutasik) AS so_mt_el2 FROM $tabel_tujuan WHERE noperk='32101' limit 1 ");
                list($so_mt_el2) = mysqli_fetch_array($sqlxel2);
                	$so_mt_elain=$so_mt_el+$so_mt_el2 ;
                $sqlxshu = mysqli_query($koneksi, "SELECT sum(mutasik) AS so_mt_shu FROM $tabel_tujuan WHERE noperk>='33101' and noperk<='39101'");
                list($so_mt_shu) = mysqli_fetch_array($sqlxshu);
                $total_mt=$so_mt_pokok+$so_mt_wajib+$so_mt_c1+$so_mt_c2+$so_mt_el+$so_mt_shu ;
            ?>          	
                <tr>
                    <td align='right' style="font-weight: normal;">2. </td>
                    <td colspan="2" style="font-weight: normal;text-align: left;">P e n a m b a h a n </td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$so_mt_pokok", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$so_mt_wajib", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$so_mt_c1", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$so_mt_c2", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$so_mt_elain", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$so_mt_shu", 0, ",", "."); ?></td>   
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$total_mt", 0, ",", "."); ?></td>                  
                </tr>                     

            <?php
                $so_jm_pokok=$so_awal_pokok+$so_mt_pokok;
                $so_jm_wajib=$so_awal_wajib+$so_mt_wajib;
                $so_jm_c1=$so_awal_c1+$so_mt_c1;
                $so_jm_c2=$so_awal_c2+$so_mt_c2;
                $so_jm_elain=$so_awal_elain+$so_mt_elain;
                $so_jm_shu=$so_awal_shu+$so_mt_shu;
                $total_jm=$total_awal+$total_mt ;
            ?>     

                <tr>
                	<tr style="border-top: 2px solid black; border-bottom: 2px solid black;">
                    <td align='right' style="font-weight: bold; background-color: #D3D3D3;"> </td>
                    <td colspan="2" style="font-weight: bold;text-align: center;  background-color: #D3D3D3;">J u m l a h </td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal; background-color: #D3D3D3;"><?php echo "" . number_format("$so_jm_pokok", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal; background-color: #D3D3D3;"><?php echo "" . number_format("$so_jm_wajib", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal; background-color: #D3D3D3;"><?php echo "" . number_format("$so_jm_c1", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal; background-color: #D3D3D3;"><?php echo "" . number_format("$so_jm_c2", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal; background-color: #D3D3D3;"><?php echo "" . number_format("$so_jm_elain", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal; background-color: #D3D3D3;"><?php echo "" . number_format("$so_jm_shu", 0, ",", "."); ?></td>   
                    <td style="text-align:right; font-size: 11pt; font-weight:normal; background-color: #D3D3D3;"><?php echo "" . number_format("$total_jm", 0, ",", "."); ?></td>
                    <tr style="border-top: 2px solid black; border-bottom: 2px solid black;">
                  
                </tr>  

            <?php
                $sqlxp = mysqli_query($koneksi, "SELECT sum(mutasid) AS so_mk_pokok FROM $tabel_tujuan WHERE noperk='31101' limit 1 ");
                list($so_mk_pokok) = mysqli_fetch_array($sqlxp);
                $sqlxw = mysqli_query($koneksi, "SELECT sum(mutasid) AS so_mk_wajib FROM $tabel_tujuan WHERE noperk='31102' limit 1 ");
                list($so_mk_wajib) = mysqli_fetch_array($sqlxw);
                $sqlxc1 = mysqli_query($koneksi, "SELECT sum(mutasid) AS so_mk_c1 FROM $tabel_tujuan WHERE noperk='31201' limit 1 ");
                list($so_mk_c1) = mysqli_fetch_array($sqlxc1);
                $sqlxc2 = mysqli_query($koneksi, "SELECT sum(mutasid) AS so_mk_c2 FROM $tabel_tujuan WHERE noperk='31202' limit 1 ");
                list($so_mk_c2) = mysqli_fetch_array($sqlxc2);
                $sqlxel = mysqli_query($koneksi, "SELECT sum(mutasid) AS so_mk_el FROM $tabel_tujuan WHERE noperk='31103' limit 1 ");
                list($so_mk_el) = mysqli_fetch_array($sqlxel);
                $sqlxel2 = mysqli_query($koneksi, "SELECT sum(mutasid) AS so_mk_el2 FROM $tabel_tujuan WHERE noperk='32101' limit 1 ");
                list($so_mk_el2) = mysqli_fetch_array($sqlxel2);
                	$so_mk_elain=$so_mk_el+$so_mk_el2 ;
                $sqlxshu = mysqli_query($koneksi, "SELECT sum(mutasid) AS so_mt_shu FROM $tabel_tujuan WHERE noperk>='32101' and noperk<='32901' limit 1 ");
                list($so_mt_shu) = mysqli_fetch_array($sqlxshu);
                $total_mk=$so_mk_pokok+$so_mk_wajib+$so_mk_c1+$so_mk_c2+$so_mk_el+$so_mk_shu ;
            ?>      
            	
                <tr>
                    <td align='right' style="font-weight: normal;">3. </td>
                    <td colspan="2" style="font-weight: normal ;text-align: left;">P e n g u r a n g a n </td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$so_mk_pokok", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$so_mk_wajib", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$so_mk_c1", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$so_mk_c2", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$so_mk_elain", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$so_mk_shu", 0, ",", "."); ?></td>   
                    <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$total_mk", 0, ",", "."); ?></td>                  
                </tr>         
            <?php
                $so_ak_pokok=$so_jm_pokok-$so_mk_pokok;
                $so_ak_wajib=$so_jm_wajib-$so_mk_wajib;
                $so_ak_c1=$so_jm_c1-$so_mk_c1;
                $so_jm_c2-$so_mk_c2;
                $so_ak_elain=$so_jm_elain-$so_mk_elain;
                $so_ak_shu=$so_jm_shu-$so_mk_shu;
                $total_ak=$total_jm-$total_mk ;
            ?>      
            
                <tr>
                	<tr style="border-top: 2px solid black; border-bottom: 2px solid black;">
                    <td align='right' style="font-weight: bold;; background-color: #D3D3D3;">4. </td>
                    <td colspan="2" style="font-weight: bold;text-align: left; background-color: #D3D3D3;">Saldo Akhir Per : <?php echo date('d-m-Y', strtotime($tgl_s)); ?> </td>
                    <td style="text-align:right; font-size: 11pt; font-weight:bold; background-color: #D3D3D3;"><?php echo "" . number_format("$so_ak_pokok", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:bold; background-color: #D3D3D3;"><?php echo "" . number_format("$so_ak_wajib", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:bold; background-color: #D3D3D3;"><?php echo "" . number_format("$so_ak_c1", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:bold; background-color: #D3D3D3;"><?php echo "" . number_format("$so_ak_c2", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:bold; background-color: #D3D3D3;"><?php echo "" . number_format("$so_ak_elain", 0, ",", "."); ?></td>
                    <td style="text-align:right; font-size: 11pt; font-weight:bold; background-color: #D3D3D3;"><?php echo "" . number_format("$so_ak_shu", 0, ",", "."); ?></td>   
                    <td style="text-align:right; font-size: 11pt; font-weight:bold; background-color: #D3D3D3;"><?php echo "" . number_format("$total_ak", 0, ",", "."); ?></td>
                    <tr style="border-top: 2px solid black; border-bottom: 2px solid black;">                  
                </tr>  

















							
        </table>
        
            <br />
            <div>
                <?php echo $kota ; ?>, <?php echo date('d-m-Y', strtotime($tgl)); ?>
            </div>
            <div>
                <?php
                echo $jabatan;
                ?>
            </div>
                <p>
                <br />
                <br />
                </p>            
            <div>
                <?php
                echo $keuangan;
                ?>
            </div>
            
              </div>

    </h5>

</body>

    <script>
		window.load = print_d();
		function print_d(){
			window.print();
		}
	</script>
</html>

<?php
ob_end_flush();
?>