
<!DOCTYPE html>
<html>
<head>
  <title>Cetak Transaksi Penerimaan Zakat</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 
    session_start();
    include '../koneksi.php';
    include '../fungsi_indotgl.php';
    include 'fungsi_penyedut.php' ;

    $kdc        =$_SESSION['kdc'];
    $kel        =$_SESSION['kelurahan'];
    $tgambar    =$_SESSION['logo_kop'];

    $tgl    =date('Y-m-d') ;
    $bln    = date('m');
    $bulan  =($bln) ;
    $tgl_indo=tgl_indo($tgl);
    
        $tgl_d = $_GET['tgl_dr'];
        $tgl_s = $_GET['tgl_sd'];
        $tid = $_GET['tid'];

        $sql2 = mysqli_query($koneksi, "SELECT kota,keuangan,gambar FROM kdkanca WHERE kd='$kdc'");
        list($kota,$keuangan,$gambar) = mysqli_fetch_array($sql2);
        $jabatan='Petugas';
        
        $trans = mysqli_query($koneksi,"select * from anggota_trans_ao where id='$tid'");
        $t = mysqli_fetch_assoc($trans);   
        
        $angg = mysqli_query($koneksi,"select * from anggota where angg_no='$t[angg_no]'");
        $a = mysqli_fetch_assoc($angg);       
        
    $nawal = mysqli_query($koneksi,"select * from nawal where noperk='$t[kdj]'");
        $n = mysqli_fetch_assoc($nawal);    
    $perk = str_replace('Pend. ', '', $n['perk']);  
    
    $terbilang = terbilang($t['masuk']);
    
    ?>  
    
<div>
  <img src="../gambar/<?php echo $gambar ?>" style="width: 400px; height: auto;">
</div>    
   

	<table border="0" width="100%" style="border-collapse:collapse;">
    	<tr class="tableheader">
            <tr class="tr-title">
              <thead>
							<tr>
						    	<td colspan="5" style="border-top: 1px solid black; border-bottom: 1px solid black; border-right: 4px solid white; text-align:center;">TANDA TERIMA </td>					
							</tr>   
              </thead> 
            </tr>
        </tr>    
<tr> 
  <th width="30%" style="font-weight: normal; text-align:left;">Diterima dari</th> 
  <th width="1%">:</th> 
  <td><strong><?php echo $a['nama']; ?></strong></td> 
</tr>
<tr> 
  <th width="30%" style="font-weight: normal; text-align:left;">Alamat</th> 
  <th width="1%">:</th> 
  <td><strong><?php echo $a['alamat']; ?>, RT <?php echo $a['rt']; ?>, RW <?php echo $a['rw']; ?>, Kel <?php echo $a['kel']; ?></strong></td> 
</tr>
<tr> 
  <th width="30%" style="font-weight: normal; text-align:left;">Uang Sejumlah</th> 
  <th width="1%">:</th> 
  <td><strong><?php echo "Rp.  " . number_format("$t[masuk]", 0, ",", ".").",-"; ?></strong></td> 
</tr>
<tr> 
  <th width="30%" style="font-weight: normal; text-align:left;">Kegunaan</th> 
  <th width="1%">:</th> 
  <td><strong>Dana <?php echo $perk; ?></strong></td> 
</tr>



          <tbody>
          </tbody>
							<tr>
						    	<td colspan="5" style="border-top: 1px solid black; border-bottom: 1px solid black; border-right: 4px solid white; text-align:center;"><?php echo $terbilang ?> </td>																																									

							</tr>                  
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
        </table>
        
            <br />
            <div>
                <?php echo $kota ; ?>, <?php echo $tgl_indo ; ?>
            </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>