
<!DOCTYPE html>
<html>
<head>
  <title>Cetak PROFIL KDMP</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="7" >PROFIL KOPERASI</th>
            </tr>  
            <tr>
                <th Style="text-align:center" colspan="7" >Dari <?php echo date('d-m-Y', strtotime($tgl_d)); ?> s/d <?php echo date('d-m-Y', strtotime($tgl_s)); ?></th>
            </tr>             

          </thead>
                  
                <tr>
                    <td align='center' style="font-weight: bold;background-color: <?php echo$_SESSION['warna_bag']; ?>;">A. </td>
                    <td colspan="2" style="font-weight: bold;text-align: left;background-color: <?php echo$_SESSION['warna_bag']; ?>;">Identitas Koperasi : </td>
                    <td align='right' style="font-weight: bold;background-color: <?php echo$_SESSION['warna_bag']; ?>;"><?php echo ""?></td>
                </tr>
            <?php 
            $no=1;
            $nol=0;
            //
            $data = mysqli_query($koneksi,"SELECT * FROM n_profil WHERE kd>'10' and kd<'20' order by kd ASC ");
            while($p = mysqli_fetch_array($data)){
            	$kdp=$p['kd'];
				$sql_11 = mysqli_query($koneksi, "SELECT kota AS p_kota FROM kdkanca WHERE kd='$kdc' ");
                	list($p_kota) = mysqli_fetch_array($sql_11);
				$sql_12 = mysqli_query($koneksi, "SELECT kanca AS p_kanca,nama_singkat AS p_nama_singkat FROM kdkanca WHERE kd='$kdc' ");
                	list($p_kanca,$p_nama_singkat) = mysqli_fetch_array($sql_12);
				$sql_13 = mysqli_query($koneksi, "SELECT no_bh AS p_no_bh FROM kdkanca WHERE kd='$kdc' ");
                	list($p_no_bh) = mysqli_fetch_array($sql_13);  
                $sql_14 = mysqli_query($koneksi, "SELECT no_nik AS p_no_nik,npwp AS no_npwp FROM kdkanca WHERE kd='$kdc' ");
                	list($p_no_nik,$no_npwp) = mysqli_fetch_array($sql_14);
                $sql_16 = mysqli_query($koneksi, "SELECT no_nib AS p_no_nib FROM kdkanca WHERE kd='$kdc' ");
                	list($p_no_nib) = mysqli_fetch_array($sql_16);                	
                $sql_15 = mysqli_query($koneksi, "SELECT alamat,kelurahan,kecamatan,kota FROM kdkanca WHERE kd='$kdc' ");
                	list($alamat,$kelurahan,$kecamatan,$kota) = mysqli_fetch_array($sql_15);                	
                	
                	if ($kdp=='11')	{
                		$jawab=$p_kota;	
                	} else if ($kdp=='12') {
                		$jawab=''.$p_kanca.' ('.$p_nama_singkat.')';
                	} else if ($kdp=='13') {
                		$jawab=$p_no_bh;
                	} else if ($kdp=='14') {
                		$jawab=$p_no_nik;
                	} else if ($kdp=='15') {
                		$jawab=$p_no_nib; 
                	} else if ($kdp=='151') {
                		$jawab=$no_npwp;                 		
                	} else if ($kdp=='16') {
                		$jawab=$alamat ;
                	} else if ($kdp=='17') {
                		$jawab=$kelurahan ;
                	} else if ($kdp=='18') {
                		$jawab=$kecamatan ;                		
                	} else {
                		$jawab='' ;
                	}                	
              ?>
                          <tr>
                            <td width="5%" valign="top" style="text-align:center; font-size: 10pt; font-weight:normal;"><?php echo $no++; ?></td>
                            <td width="25%" valign="top" style="text-align:left; font-size: 10pt; font-weight:normal;"><?php echo $p['nama']; ?></td>
                            <td width="70%" valign="top" style="text-align:left; font-size: 12pt; font-weight:bold;"><?php echo $jawab ?></td>
                          </tr>  
                        </div>
                      </div>
                    </div>
              <?php } ?>
          </tbody>             



          <tbody>
                <tr>
                    <td align='center' style="font-weight: bold;background-color: <?php echo$_SESSION['warna_bag']; ?>;">B. </td>
                    <td colspan="2" style="font-weight: bold;text-align: left;background-color: <?php echo$_SESSION['warna_bag']; ?>;">Keanggotaan : </td>
                    <td align='right' style="font-weight: bold;background-color: <?php echo$_SESSION['warna_bag']; ?>;"><?php echo ""?></td>
                </tr>
            <?php 
            $no=1;
            $nol=0;
            //
            $data = mysqli_query($koneksi,"SELECT * FROM n_profil WHERE kd>'20' and kd<'30' order by kd ASC ");
            while($p = mysqli_fetch_array($data)){
            	$kdp=$p['kd'];
				$sql_11 = mysqli_query($koneksi, "SELECT count(angg_no) AS p_jangg_no FROM anggota WHERE hapus<>'HAPUS' ");
                	list($p_jangg_no) = mysqli_fetch_array($sql_11);

                $sql_21 = mysqli_query($koneksi, "SELECT COUNT(DISTINCT a.angg_no) AS jumlah_anggota_aktif 
                                                  FROM anggota a 
                                                  WHERE a.angg_no IN (SELECT kd FROM brg_mts_r) 
                                                  OR a.angg_no IN (SELECT angg_no FROM pinjaman)");
                list($jumlah_anggota_aktif) = mysqli_fetch_array($sql_21);

				$sql_10 = mysqli_query($koneksi, "SELECT sp AS k_sp FROM kdkanca WHERE kd='$kdc' ");
                	list($k_sp) = mysqli_fetch_array($sql_10);   
                	
				$sql_14 = mysqli_query($koneksi, "SELECT sum(awalk) AS tpk_awal,sum(mutasik) AS tpk_masuk,sum(mutasid) AS tpk_keluar,sum(akhirk) AS tpk_akhir FROM $tabel_tujuan WHERE noperk='31101' ");
                	list($tpk_awal) = mysqli_fetch_array($sql_14);  
                	$or_tpk_awal=$tpk_awal/$k_sp ;
                	
$sql_22 = mysqli_query($koneksi, "
  SELECT 
    COUNT(CASE WHEN total_setor >= sp_besar THEN angg_no END) AS sudah_lunas,
    COUNT(CASE WHEN total_setor < sp_besar AND total_setor > 0 THEN angg_no END) AS belum_lunas,
    COUNT(CASE WHEN total_setor = 0 THEN angg_no END) AS belum_bayar
  FROM (
    SELECT 
      a.angg_no,
      COALESCE(SUM(ast.setor) - SUM(ast.tarik), 0) AS total_setor,
      k.sp AS sp_besar
    FROM 
      anggota a
    LEFT JOIN 
      angg_simp_trans ast ON a.angg_no = ast.angg_no AND ast.kdj = '01'
    CROSS JOIN 
      (SELECT sp FROM kdkanca WHERE kd = '$kdc') k
    WHERE 
      a.hapus <> 'HAPUS'
    GROUP BY 
      a.angg_no, k.sp
  ) subquery
");
list($sudah_lunas, $belum_lunas, $belum_bayar) = mysqli_fetch_array($sql_22);

            $sql_41 = mysqli_query($koneksi, "
              SELECT COUNT(DISTINCT a.angg_no) AS p_jangg_no_w
              FROM anggota a
              JOIN (
                SELECT angg_no, SUM(setor) - SUM(tarik) AS saldo
                FROM angg_simp_trans WHERE kdj='02'
                GROUP BY angg_no
                HAVING SUM(setor) - SUM(tarik) > 1
              ) b ON a.angg_no = b.angg_no
              WHERE a.hapus <> 'HAPUS'
            ");
            list($p_jangg_no_w) = mysqli_fetch_array($sql_41);
            $belum_bayar_sw=$p_jangg_no-$p_jangg_no_w ;

				$sql_20 = mysqli_query($koneksi, "SELECT count(angg_no) AS j_jekel_laki FROM anggota WHERE jekel='1' and hapus<>'HAPUS' ");
                	list($j_jekel_laki) = mysqli_fetch_array($sql_20);
				$sql_21 = mysqli_query($koneksi, "SELECT count(angg_no) AS j_jekel_wnt FROM anggota WHERE jekel<>'1' and hapus<>'HAPUS' ");
                	list($j_jekel_wnt) = mysqli_fetch_array($sql_21);                	
                	
                	if ($kdp=='21')	{
                		$jawab=''.$p_jangg_no.' orang' ;	
                	} else if ($kdp=='22') {
                		$jawab=''.$jumlah_anggota_aktif.' orang';
                	} else if ($kdp=='23') {
                		$jawab=''.$sudah_lunas.' org' ;
                	} else if ($kdp=='24') {
                		$jawab=''.$belum_lunas.' org' ;
                	} else if ($kdp=='25') {
                		$jawab=''.$belum_bayar.' org' ; 
                	} else if ($kdp=='26') {
                		$jawab=''.$p_jangg_no_w.' org' ;
                	} else if ($kdp=='27') {
                		$jawab='Laki-Laki : '.$j_jekel_laki.' org & Perempuan : '.$j_jekel_wnt.' org' ;	
                	} else {
                		$jawab='' ;
                	}                	
              ?>
                          <tr>
                            <td width="5%" valign="top" style="text-align:center; font-size: 10pt; font-weight:normal;"><?php echo $no++; ?></td>
                            <td width="25%" valign="top" style="text-align:left; font-size: 10pt; font-weight:normal;"><?php echo $p['nama']; ?></td>
                            <td width="70%" valign="top" style="text-align:left; font-size: 11pt; font-weight:normal;"><?php echo $jawab ?></td>
                          </tr>  
                        </div>
                      </div>
                    </div>
              <?php } ?>
          </tbody>                       





          <tbody>
                <tr>
                    <td align='center' style="font-weight: bold;background-color: <?php echo$_SESSION['warna_bag']; ?>;">C. </td>
                    <td colspan="2" style="font-weight: bold;text-align: left;background-color: <?php echo$_SESSION['warna_bag']; ?>;">Struktur Organisasi : </td>
                    <td align='right' style="font-weight: bold;background-color: <?php echo$_SESSION['warna_bag']; ?>;"><?php echo ""?></td>
                </tr>
                 <tr>
                    <td align='center' style="font-weight: bold;">-</td>
                    <td colspan="2" style="font-weight: bold;text-align: left;">PENGURUS : </td>
                    <td align='right' style="font-weight: bold;"><?php echo ""?></td>
                </tr>           
            <?php 
            $no=1;
            $data = mysqli_query($koneksi,"SELECT * FROM n_profil WHERE kd>'30' and kd<'40' order by kd ASC ");
            while($p = mysqli_fetch_array($data)){
                $kdp=$p['kd'];
				$sql_k01 = mysqli_query($koneksi, "SELECT angg_no AS t_angg_01 FROM karyawan WHERE jabatan='01' ");
                	list($t_angg_01) = mysqli_fetch_array($sql_k01);                
				$sql_a01 = mysqli_query($koneksi, "SELECT nama AS nama_01 FROM anggota WHERE angg_no='$t_angg_01' ");
                	list($nama_01) = mysqli_fetch_array($sql_a01);
				$sql_k04 = mysqli_query($koneksi, "SELECT angg_no AS t_angg_04 FROM karyawan WHERE jabatan='04' ");
                	list($t_angg_04) = mysqli_fetch_array($sql_k04);                
				$sql_a04 = mysqli_query($koneksi, "SELECT nama AS nama_04 FROM anggota WHERE angg_no='$t_angg_04' ");
                	list($nama_04) = mysqli_fetch_array($sql_a04);
				$sql_k07 = mysqli_query($koneksi, "SELECT angg_no AS t_angg_07 FROM karyawan WHERE jabatan='07' ");
                	list($t_angg_07) = mysqli_fetch_array($sql_k07);                
				$sql_a07 = mysqli_query($koneksi, "SELECT nama AS nama_04 FROM anggota WHERE angg_no='$t_angg_07' ");
                	list($nama_07) = mysqli_fetch_array($sql_a07);
                	
                	if ($kdp=='31')	{
                		$jawab=$nama_01 ;	
                	} else if ($kdp=='32') {
                		$jawab=$nama_04 ;
                	} else if ($kdp=='33') {
                		$jawab=$nama_07 ;
                	} else {
                		$jawab='' ;
                	}                
              ?>
                          <tr>
                            <td width="5%" valign="top" style="text-align:center; font-size: 10pt; font-weight:normal;"><?php echo $no++; ?></td>
                            <td width="25%" valign="top" style="text-align:left; font-size: 10pt; font-weight:normal;"><?php echo $p['nama']; ?></td>
                            <td width="70%" valign="top" style="text-align:left; font-size: 11pt; font-weight:normal;"><?php echo $jawab ?></td>
                          </tr> 
                        </div>
                      </div>
                    </div>
              <?php } ?>
              
                 <tr>
                    <td align='center' style="font-weight: bold;">-</td>
                    <td colspan="2" style="font-weight: bold;text-align: left;">PENGAWAS : </td>
                    <td align='right' style="font-weight: bold;"><?php echo ""?></td>
                </tr>           
            <?php 
            $no=1;
            $data = mysqli_query($koneksi,"SELECT * FROM n_profil WHERE kd>'40' and kd<'50' order by kd ASC ");
            while($p = mysqli_fetch_array($data)){
                $kdp=$p['kd'];
				$sql_k10 = mysqli_query($koneksi, "SELECT angg_no AS t_angg_10 FROM karyawan WHERE jabatan='10' ");
                	list($t_angg_10) = mysqli_fetch_array($sql_k10);                
				$sql_a10 = mysqli_query($koneksi, "SELECT nama AS nama_10 FROM anggota WHERE angg_no='$t_angg_10' ");
                	list($nama_10) = mysqli_fetch_array($sql_a10);
				$sql_k11 = mysqli_query($koneksi, "SELECT angg_no AS t_angg_11 FROM karyawan WHERE jabatan='11' ");
                	list($t_angg_11) = mysqli_fetch_array($sql_k11);                
				$sql_a11 = mysqli_query($koneksi, "SELECT nama AS nama_11 FROM anggota WHERE angg_no='$t_angg_11' ");
                	list($nama_11) = mysqli_fetch_array($sql_a11);
				$sql_k12 = mysqli_query($koneksi, "SELECT angg_no AS t_angg_12 FROM karyawan WHERE jabatan='12' ");
                	list($t_angg_12) = mysqli_fetch_array($sql_k12);                
				$sql_a12 = mysqli_query($koneksi, "SELECT nama AS nama_12 FROM anggota WHERE angg_no='$t_angg_12' ");
                	list($nama_12) = mysqli_fetch_array($sql_a12);                	
                	
                	if ($kdp=='41')	{
                		$jawab=$nama_10 ;	
                	} else if ($kdp=='42') {
                		$jawab=$nama_11 ;
                	} else if ($kdp=='43') {
                		$jawab=$nama_12 ;
                	} else {
                		$jawab='' ;
                	}                
              ?>
                          <tr>
                            <td width="5%" valign="top" style="text-align:center; font-size: 10pt; font-weight:normal;"><?php echo $no++; ?></td>
                            <td width="25%" valign="top" style="text-align:left; font-size: 10pt; font-weight:normal;"><?php echo $p['nama']; ?></td>
                            <td width="70%" valign="top" style="text-align:left; font-size: 11pt; font-weight:normal;"><?php echo $jawab ?></td>
                          </tr>  
                        </div>
                      </div>
                    </div>
              <?php } ?>
              
              
                 <tr>
                    <td align='center' style="font-weight: bold;">-</td>
                    <td colspan="2" style="font-weight: bold;text-align: left;">PENGELOLA : </td>
                    <td align='right' style="font-weight: bold;"><?php echo ""?></td>
                </tr>           
            <?php 
            $no=1;
            $data = mysqli_query($koneksi,"SELECT * FROM n_profil WHERE kd>'50' and kd<'60' order by kd ASC ");
            while($p = mysqli_fetch_array($data)){
                $kdp=$p['kd'];
				$sql_k50 = mysqli_query($koneksi, "SELECT nama AS t_nama_manager FROM karyawan WHERE jabatan='Manager' ");
                	list($t_nama_manager) = mysqli_fetch_array($sql_k50);      
				$sql_k10 = mysqli_query($koneksi, "SELECT count(nama) AS j_nama_kar FROM karyawan WHERE ket<>'PP' and jabatan<>'Manager'");
                	list($j_nama_kar) = mysqli_fetch_array($sql_k10);
                	
                	if ($kdp=='51')	{
                		$jawab=$t_nama_manager ;	
                	} else if ($kdp=='52') {
                		$jawab=''.$j_nama_kar.' Karyawan' ;
                	} else {
                		$jawab='' ;
                	}            
              ?>
                          <tr>
                            <td width="5%" valign="top" style="text-align:center; font-size: 10pt; font-weight:normal;"><?php echo $no++; ?></td>
                            <td width="25%" valign="top" style="text-align:left; font-size: 10pt; font-weight:normal;"><?php echo $p['nama']; ?></td>
                            <td width="70%" valign="top" style="text-align:left; font-size: 11pt; font-weight:normal;"><?php echo $jawab ?></td>
                          </tr>
                        </div>
                      </div>
                    </div>
              <?php } ?>              
          </tbody>                       
          
          
          
          
          <tbody>
                <tr>
                    <td align='center' style="font-weight: bold;background-color: <?php echo$_SESSION['warna_bag']; ?>;">D. </td>
                    <td colspan="2" style="font-weight: bold;text-align: left;background-color: <?php echo$_SESSION['warna_bag']; ?>;">Kegiatan Usaha : </td>
                    <td align='right' style="font-weight: bold;background-color: <?php echo$_SESSION['warna_bag']; ?>;"><?php echo ""?></td>
                </tr>
            <?php 
            $no=1;
            $data = mysqli_query($koneksi,"SELECT * FROM n_profil WHERE kd>'60' and kd<'70' order by kd ASC ");
            while($p = mysqli_fetch_array($data)){
                $kdp=$p['kd'];
				$sql_k02 = mysqli_query($koneksi, "SELECT keterangan AS t_ket_02 FROM kd_unit WHERE kd='02' ");
                	list($t_ket_02) = mysqli_fetch_array($sql_k02);                
				$sql_k03 = mysqli_query($koneksi, "SELECT keterangan AS t_ket_03 FROM kd_unit WHERE kd='03' ");
                	list($t_ket_03) = mysqli_fetch_array($sql_k03);
				$sql_k04 = mysqli_query($koneksi, "SELECT keterangan AS t_ket_04 FROM kd_unit WHERE kd='04' ");
                	list($t_ket_04) = mysqli_fetch_array($sql_k04);
                	
                	if ($kdp=='61')	{
                		$jawab=$t_ket_02 ;	
                	} else if ($kdp=='62') {
                		$jawab=$t_ket_03 ;	
                	} else if ($kdp=='63') {
                		$jawab=$t_ket_04 ;	
                	} else {
                		$jawab='' ;
                	}                
              ?>
              
                          <tr>
                            <td width="5%" valign="top" style="text-align:center; font-size: 10pt; font-weight:normal;"><?php echo $no++; ?></td>
                            <td width="25%" valign="top" style="text-align:left; font-size: 10pt; font-weight:normal;"><?php echo $p['nama']; ?></td>
                            <td width="70%" valign="top" style="text-align:left; font-size: 11pt; font-weight:normal;"><?php echo $jawab ?></td>
                          </tr>  
                        </div>
                      </div>
                    </div>
              <?php } ?>
          </tbody>                                 
          
          
          
          
          <tbody>
                <tr>
                    <td align='center' style="font-weight: bold;background-color: <?php echo$_SESSION['warna_bag']; ?>;">E. </td>
                    <td colspan="2" style="font-weight: bold;text-align: left;background-color: <?php echo$_SESSION['warna_bag']; ?>;">Keuangan Perusahaan : </td>
                    <td align='right' style="font-weight: bold;background-color: <?php echo$_SESSION['warna_bag']; ?>;"><?php echo ""?></td>
                </tr>
            <?php 
            $no=1;
            $data = mysqli_query($koneksi,"SELECT * FROM n_profil WHERE kd>'70' and kd<'90' order by kd ASC ");
            while($p = mysqli_fetch_array($data)){
                $kdp=$p['kd'];
				$sql_74 = mysqli_query($koneksi, "SELECT sum(awald) AS tas_awal,sum(akhird) AS tas_akhir FROM $tabel_tujuan WHERE noperk<'20000' ");
                	list($tas_awal,$tas_akhir) = mysqli_fetch_array($sql_74);  
				$sql_75 = mysqli_query($koneksi, "SELECT sum(awalk) AS tmds_awal,sum(akhirk) AS tmds_akhir FROM $tabel_tujuan WHERE left(noperk,1)='3' and ry<>'xx' ");
                	list($tmds_awal,$tmds_akhir) = mysqli_fetch_array($sql_75); 
				$sql_76 = mysqli_query($koneksi, "SELECT sum(awalk) AS thtg_awal,sum(akhirk) AS thtg_akhir FROM $tabel_tujuan WHERE left(noperk,1)='2' and ry<>'xx' ");
                	list($thtg_awal,$thtg_akhir) = mysqli_fetch_array($sql_76); 
				$sql_77 = mysqli_query($koneksi, "SELECT sum(awalk) AS tshu_awal,sum(akhirk) AS tshu_akhir FROM $tabel_tujuan WHERE left(noperk,1)='3' and ry='xx' ");
                	list($tshu_awal,$tshu_akhir) = mysqli_fetch_array($sql_77);                 	
				$sql_78 = mysqli_query($koneksi, "SELECT sum(awalk) AS toms_awal,sum(akhirk) AS toms_akhir FROM $tabel_tujuan WHERE left(noperk,1)='4' ");
                	list($toms_awal,$toms_akhir) = mysqli_fetch_array($sql_78);      
                	
                	if ($kdp=='71')	{
                		$jawab='Ada - terlampir' ;	
                	} else if ($kdp=='72') {
                		$jawab='Ada - terlampir' ;	
                	} else if ($kdp=='73') {
                		$jawab='Ada - terlampir' ;	
                	} else if ($kdp=='74') {
                		$jawab='Ada - terlampir' ;
                	} else if ($kdp=='75') {
                		$jawab_a="Rp. " . number_format("$tas_akhir", 0, ",", ".") ;
                		$jawab_b="Rp. " . number_format("$tas_awal", 0, ",", ".") ;
                		$jawab=''.$jawab_a.',-  ------------------> Lap. Lalu '.$jawab_b.',-' ;
                	} else if ($kdp=='76') {
                		$jawab_a="Rp. " . number_format("$tmds_akhir", 0, ",", ".") ;
                		$jawab_b="Rp. " . number_format("$tmds_awal", 0, ",", ".") ;
                		$jawab=''.$jawab_a.',-  ------------------> Lap. Lalu '.$jawab_b.',-' ; 
                	} else if ($kdp=='77') {
                		$jawab_a="Rp. " . number_format("$thtg_akhir", 0, ",", ".") ;
                		$jawab_b="Rp. " . number_format("$thtg_awal", 0, ",", ".") ;
                		$jawab=''.$jawab_a.',-  ------------------> Lap. Lalu '.$jawab_b.',-' ;                     		
                	} else if ($kdp=='78') {
                        $jawab_a="Rp. " . number_format("$tshu_akhir", 0, ",", ".") ;
                		$jawab_b="Rp. " . number_format("$tshu_awal", 0, ",", ".") ;
                		$jawab=''.$jawab_a.',-  ------------------> Lap. Lalu '.$jawab_b.',-' ;                     		
                	} else if ($kdp=='79') {
                        $jawab_a="Rp. " . number_format("$toms_akhir", 0, ",", ".") ;
                		$jawab_b="Rp. " . number_format("$toms_awal", 0, ",", ".") ;
                		$jawab=''.$jawab_a.',-  ------------------> Lap. Lalu '.$jawab_b.',-' ;  
                		
                	} else if ($kdp=='73') {
                		$jawab='Ada - terlampir' ;                		
                	} else {
                		$jawab='' ;
                	}                
              ?>
                          <tr>
                            <td width="5%" valign="top" style="text-align:center; font-size: 10pt; font-weight:normal;"><?php echo $no++; ?></td>
                            <td width="25%" valign="top" style="text-align:left; font-size: 10pt; font-weight:normal;"><?php echo $p['nama']; ?></td>
                            <td width="70%" valign="top" style="text-align:left; font-size: 11pt; font-weight:normal;"><?php echo $jawab ?></td>
                          </tr>
                        </div>
                      </div>
                    </div>
              <?php } ?>
          </tbody>            













							
        </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>
