<!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=utf-8" />
    <link href="<?php echo $base?>bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="<?php echo $base?>font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <link href="<?php echo $base?>plugins/jvectormap/jquery-jvectormap-1.2.2.css" rel="stylesheet" type="text/css" />
    <link href="<?php echo $base?>dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
    <link href="<?php echo $base?>dist/css/skins/_all-skins.min.css" rel="stylesheet" type="text/css" />
    
	<script src="<?php echo $base?>plugins/jQuery/jQuery-2.1.4.min.js"></script>
    <script src="<?php echo $base?>bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <script src='<?php echo $base?>plugins/fastclick/fastclick.min.js'></script>
    <script src="<?php echo $base?>dist/js/app.min.js" type="text/javascript"></script>
    
    <script src="<?php echo $base?>dist/js/demo.js" type="text/javascript"></script>
<title>Untitled Document</title>

</head>
	<style type="text/css" media="print">
    @page 
    {
        size: auto;   /* auto is the initial value */
        margin: 0mm;  /* this affects the margin in the printer settings */
    }
	</style>
<body style="font-size:10px">
	<?php
	include "config/session.php";
		session_start();

        include "php_class/class_mysql.php";
        include "php_class/class_mahasiswa.php";
        include "php_class/class_transaksi.php";	
		include "php_class/class_grup.php";
		include "php_class/class_template.php";
		include "php_class/class_setting_laporan.php";
		include "php_class/class_dosen.php";
		include "terbilang.php";
		$DataDosen = new dataDosen;
		$DataSetLaporan = new DataSetLaporan;
		$dataTemplate = new DataTemplate;
		$datagrup = new DataGrup;
		$DataMahasiswa = new DataMahasiswa;     
        $DataTransaksi = new DataTransaksi;
		$idgrup = $_GET['idgrup'];
        $id = $_GET['npm'];
		
    ?>

<table width="100%" border="0" style="margin-top:10px;">
  <tr>
    <td width="12%" rowspan="3" style="padding-left:30px;"><img src="pict/logo.png" height="40" width="40"></td>
    <td width="68%" style="font-weight:bold; padding-left:30px;">UNIVERSITAS WARMADEWA</td>
    <td width="20%">&nbsp;</td>
  </tr>
  <tr>
    <td style="font-weight:bold; padding-left:30px;">FAKULTAS EKONOMI</td>
    <td style="padding-right:30px;"><div align="right">Arsip</div></td>
  </tr>
  <tr>
    <td style="font-weight:bold; padding-left:30px;">KLAS R. SORE - EKSEKUTIF </td>
    <td style="padding-right:30px;"><div align="right">No. <?php echo $noArsip?></div></td>
  </tr>
</table>
<table width="100%" border="0" style="font-weight:bold;">
  <tr>
    <td><div align="center">KWITANSI</div></td>
  </tr>
  <tr>
<?php 
	$JumlahData = $datagrup->get_detil('',$a,'jumlah', $idgrup);
		$nama2 = '';
		for ($a=2;$a<=$JumlahData;$a++){
			$namaTrx = $datagrup->get_detil('NamaTRX',$a,'', $idgrup);
			$nama2 = $nama2. ", ". $namaTrx;
		}
		if ($JumlahData > 1 ) {
		$Nama1 = $datagrup->get_detil('NamaTRX',1,'', $idgrup);
		$Namatotal = $Nama1.$nama2;
		}else{
		$Namatotal = $datagrup->get_detil('NamaTRX',1,'', $idgrup);	
			}
  ?>
      <td><div align="center">Pembayaran <?php echo $Namatotal; ?></div></td>
  </tr>
</table>

<?php 

	$NPM = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('NPM', $id);
	$nama = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Nama', $id);
	$Jurusan = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Jurusan', $id);
	$tempatLahir = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('TempatLahir', $id);
	$tgl = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('TglLahir', $id);
	$jenisKelamin = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('JenisKelamin', $id);
	$agama = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Agama', $id);
	$alamat = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Alamat', $id);
	$notelp = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('NoTelp', $id);
	$email = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Email', $id);
	$asalSekolah = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('AsalSekolah', $id);
	$statusPerkawinan = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('StatusPerkawinan', $id);
	$statusPekerjaan = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('StatusPekerjaan', $id);
	$perusahaan = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Perusahaan', $id);
	$jabatan = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Jabatan', $id);
	$alamatPerusahaan = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('AlamatPerusahaan', $id);
	$statusMahasiswa = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('StatusMahasiswa', $id);
	$perguruanTinggiAsal = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('PerguruanTinggiAsal', $id);
	$programStudi = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('ProgramStudi', $id);
	$jenjang = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Jenjang', $id);
	$sks = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('SKSDiakui', $id);
	$kdJurusan =  substr($NPM, 2, 2);
	
	if ($kdJurusan == "31"){
		$Jurusan = "IESP";	
	}elseif ($kdJurusan == "32"){
		$Jurusan = "MANAJEMEN";
	} elseif ($kdJurusan == "33"){
		$Jurusan = "AKUNTANSI";	
	}

?>

<table width="100%" border="0" style="border-collapse:collapse; ">
  <tr>
    <td width="21%" style="padding-left:30px;">Sudah terima dari</td>
    <td width="2%">&nbsp;</td>
    <td colspan="5">&nbsp;</td>
  </tr>
  <tr>
    <td style="padding-left:30px;">Nama</td>
    <td>:</td>
    <td colspan="5"><?php echo $nama ?></td>
  </tr>
  <tr>
    <td style="padding-left:30px;">NPM</td>
    <td>:</td>
    <td colspan="5"><?php echo $NPM ?></td>
  </tr>
  <tr>
    <td style="padding-left:30px;">Jurusan / Prodi</td>
    <td>:</td>
    <td colspan="5"><?php echo $Jurusan?></td>
  </tr>
  <tr>
    <td style="padding-left:30px;">Alamat / No. Telp.</td>
    <td>:</td>
    <td colspan="5"><?php echo $alamat?> / <?php echo $notelp?></td>
  </tr>
  <tr>
    <td style="padding-left:30px;">Buat Pembayaran</td>
    <td>:</td>
    <td width="4%"></td>
    <td width="53%"></td>
    <td width="3%"></td>
    <td width="9%"></td>
    <td width="8%"></td>
  </tr>
  <?php 
	$total = 0;
	$Nomer = 0;

	$JumlahData = $datagrup->get_detil('',$a,'jumlah', $idgrup);
		for ($a=1;$a<=$JumlahData;$a++){
			$ID = $datagrup->get_detil('idTemplate', $a,'', $idgrup);
			$tglInput = $datagrup->get_detil('TglInput',$a,'', $idgrup);
			$namaTrx = $datagrup->get_detil('NamaTRX',$a,'', $idgrup);
			$BiayaTrx = $dataTemplate->get_template_single_by_id('BiayaNonReguler', $ID);
			$total = $total + $BiayaTrx;
 
			$Nomer = $Nomer + 1;
			
  ?>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td width="4%"><div align="right"><?php echo $Nomer?>. </div></td>
    <td width="53%"> <?php echo $namaTrx ?></td>
    <td width="3%">Rp.</td>
    <td><?php echo number_format($BiayaTrx)?></td>
    <td>&nbsp;</td>
  </tr>
  <?php } ?>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td style="padding-right:5px"><div align="right">Jumlah</div></td>
    <td style="border-top:solid thin #000">Rp.</td>
    <td style="border-top:solid thin #000"><?php echo number_format($total)?></td>
    <td >&nbsp;</td>
  </tr>
</table>
<div style="padding-left:30px;">
<?php 

	$nilai = $total;
        
	 echo "Terbilang : "; 	
     echo terbilang($nilai, $style=3);
	 echo " Rupiah";

?>
</div>
<?php 
	$tanggal = date('d');
	$bulan = date('m'); 
	$tahun = date('Y');
	
	if ($bulan == '01'){
		$bulans = 'Januari';
	}elseif ($bulan == '02'){ 
		$bulans = 'Februari';
	}elseif ($bulan == '03'){
		$bulans = 'Maret';
	}elseif ($bulan == '04'){
		$bulans = 'April';
	}elseif ($bulan == '05'){
		$bulans	= 'Mei';
	}elseif ($bulan == '06'){
		$bulans = 'Juni';	
	}elseif ($bulan == '07'){
		$bulans = 'Juli';	
	}elseif ($bulan == '08'){
		$bulans = 'Agustus';	
	}elseif ($bulan == '09'){
		$bulans = 'September';	
	}elseif ($bulan == '10'){
		$bulans = 'Oktober';
	}elseif ($bulan == '11'){
		$bulans ==	'November';
	}elseif ($bulan == '12'){
		$bulans = 'Desember';	
	}
	
	$Namabd = $dataTemplate->get_template_single_by_id('NamaBendahara', $NoId);
	$idDosen = $dataTemplate->get_template_single_by_id('idBendahara', $NoId);
	$NIPbd = $DataDosen->get_operator_single_by_id('NIP', $idDosen);
 
?>
<table width="100%" border="0" style="border-collapse:collapse;">
  <tr>
    <td width="70%">&nbsp;</td>
    <td width="30%"><div align="center">Denpasar, <?php echo $tanggal."-".$bulans."-".$tahun ?></div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="center">Bendahara</div></td>
  </tr>
  <tr>
    <td height="25">&nbsp;</td>
    <td><div align="center"></div></td>
  </tr>
  <tr >
    <td><div style="padding-left:30px;">operator : <?php echo $_SESSION['NamaOperator'];?></div></td>
    <td><div align="center"><?php echo $Namabd ?></div></td>
  </tr>
  <tr>
    <td><div style="padding-left:30px;"><?php echo date('d-m-Y')?></div></td>
    <td><div align="center">NIP. <?php echo $NIPbd ?></div></td>
  </tr>
  <tr style="padding-bottom:15px;">
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>

</table>








<table width="100%" border="0" style=" border-top:solid thin #000;">
  <tr height="15px">
    <td style="font-weight:bold; padding-left:30px;"></td>
    <td style="padding-right:30px;"><div align="right"></div></td>
    <td></td>
  </tr>
  <tr>
    <td width="12%" rowspan="3" style="padding-left:30px;"><img src="pict/logo.png" height="40" width="40"></td>
    <td width="68%" style="font-weight:bold; padding-left:30px;">UNIVERSITAS WARMADEWA</td>
    <td width="20%">&nbsp;</td>
  </tr>
  <tr>
    <td style="font-weight:bold; padding-left:30px;">FAKULTAS EKONOMI</td>
    <td style="padding-right:30px;"><div align="right">Arsip</div></td>
  </tr>
  <tr>
    <td style="font-weight:bold; padding-left:30px;">KLAS R. SORE - EKSEKUTIF</td>
    <td style="padding-right:30px;"><div align="right">No. <?php echo $noArsip?></div></td>
  </tr>
</table>
<table width="100%" border="0" style="font-weight:bold;">
  <tr>
    <td><div align="center">KWITANSI</div></td>
  </tr>
  <tr>
<?php 
	$JumlahData = $datagrup->get_detil('',$a,'jumlah', $idgrup);
		$nama2 = '';
		for ($a=2;$a<=$JumlahData;$a++){
			$namaTrx = $datagrup->get_detil('NamaTRX',$a,'', $idgrup);
			$nama2 = $nama2. ", ". $namaTrx;
		}
		if ($JumlahData > 1 ) {
		$Nama1 = $datagrup->get_detil('NamaTRX',1,'', $idgrup);
		$Namatotal = $Nama1.$nama2;
		}else{
		$Namatotal = $datagrup->get_detil('NamaTRX',1,'', $idgrup);	
			}
  ?>
    <td><div align="center">Pembayaran <?php echo $Namatotal; ?></div></td>
  </tr>
</table>

<?php 

	$NPM = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('NPM', $id);
	$nama = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Nama', $id);
	$Jurusan = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Jurusan', $id);
	$tempatLahir = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('TempatLahir', $id);
	$tgl = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('TglLahir', $id);
	$jenisKelamin = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('JenisKelamin', $id);
	$agama = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Agama', $id);
	$alamat = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Alamat', $id);
	$notelp = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('NoTelp', $id);
	$email = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Email', $id);
	$asalSekolah = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('AsalSekolah', $id);
	$statusPerkawinan = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('StatusPerkawinan', $id);
	$statusPekerjaan = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('StatusPekerjaan', $id);
	$perusahaan = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Perusahaan', $id);
	$jabatan = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Jabatan', $id);
	$alamatPerusahaan = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('AlamatPerusahaan', $id);
	$statusMahasiswa = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('StatusMahasiswa', $id);
	$perguruanTinggiAsal = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('PerguruanTinggiAsal', $id);
	$programStudi = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('ProgramStudi', $id);
	$jenjang = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Jenjang', $id);
	$sks = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('SKSDiakui', $id);
	$kdJurusan =  substr($NPM, 2, 2);
	
	if ($kdJurusan == "31"){
		$Jurusan = "IESP";	
	}elseif ($kdJurusan == "32"){
		$Jurusan = "MANAJEMEN";
	} elseif ($kdJurusan == "33"){
		$Jurusan = "AKUNTANSI";	
	}

?>

<table width="100%" border="0" style="border-collapse:collapse; ">
  <tr>
    <td width="21%" style="padding-left:30px;">Sudah terima dari</td>
    <td width="2%">&nbsp;</td>
    <td colspan="5">&nbsp;</td>
  </tr>
  <tr>
    <td style="padding-left:30px;">Nama</td>
    <td>:</td>
    <td colspan="5"><?php echo $nama ?></td>
  </tr>
  <tr>
    <td style="padding-left:30px;">NPM</td>
    <td>:</td>
    <td colspan="5"><?php echo $NPM ?></td>
  </tr>
  <tr>
    <td style="padding-left:30px;">Jurusan / Prodi</td>
    <td>:</td>
    <td colspan="5"><?php echo $Jurusan?></td>
  </tr>
  <tr>
    <td style="padding-left:30px;">Alamat / No. Telp.</td>
    <td>:</td>
    <td colspan="5"><?php echo $alamat?> / <?php echo $notelp?></td>
  </tr>
  <tr>
    <td style="padding-left:30px;">Buat Pembayaran</td>
    <td>:</td>
    <td width="4%"></td>
    <td width="53%"></td>
    <td width="3%"></td>
    <td width="9%"></td>
    <td width="8%"></td>
  </tr>
  <?php 
	$total = 0;
	$Nomer = 0;
	$JumlahData = $datagrup->get_detil('',$a,'jumlah', $idgrup);
		for ($a=1;$a<=$JumlahData;$a++){
			$ID = $datagrup->get_detil('idTemplate', $a,'', $idgrup);
			$tglInput = $datagrup->get_detil('TglInput',$a,'', $idgrup);
			$namaTrx = $datagrup->get_detil('NamaTRX',$a,'', $idgrup);
			$BiayaTrx = $dataTemplate->get_template_single_by_id('BiayaNonReguler', $ID);
			$total = $total + $BiayaTrx;
 
			$Nomer = $Nomer + 1;
  ?>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td width="4%"><div align="right"><?php echo $Nomer?>. </div></td>
    <td width="53%"> <?php echo $namaTrx ?></td>
    <td width="3%">Rp.</td>
    <td><?php echo number_format($BiayaTrx)?></td>
    <td>&nbsp;</td>
  </tr>
  <?php } ?>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td style="padding-right:5px"><div align="right">Jumlah</div></td>
    <td style="border-top:solid thin #000">Rp.</td>
    <td style="border-top:solid thin #000"><?php echo number_format($total)?></td>
    <td >&nbsp;</td>
  </tr>
</table>
<div style="padding-left:30px;">
<?php 

	$nilai = $total;
        
	 echo "Terbilang : "; 	
     echo terbilang($nilai, $style=3);
	 echo " Rupiah";

?>
</div>
<?php 
	$tanggal = date('d');
	$bulan = date('m'); 
	$tahun = date('Y');
	
	if ($bulan == '01'){
		$bulans = 'Januari';
	}elseif ($bulan == '02'){ 
		$bulans = 'Februari';
	}elseif ($bulan == '03'){
		$bulans = 'Maret';
	}elseif ($bulan == '04'){
		$bulans = 'April';
	}elseif ($bulan == '05'){
		$bulans	= 'Mei';
	}elseif ($bulan == '06'){
		$bulans = 'Juni';	
	}elseif ($bulan == '07'){
		$bulans = 'Juli';	
	}elseif ($bulan == '08'){
		$bulans = 'Agustus';	
	}elseif ($bulan == '09'){
		$bulans = 'September';	
	}elseif ($bulan == '10'){
		$bulans = 'Oktober';
	}elseif ($bulan == '11'){
		$bulans ==	'November';
	}elseif ($bulan == '12'){
		$bulans = 'Desember';	
	}
	
	$Namabd = $DataSetLaporan->get_setting('nama');
	$NIPbd = $DataSetLaporan->get_setting('nip');
 
?>
<table width="100%" border="0" style="border-collapse:collapse;">
  <tr>
    <td width="70%">&nbsp;</td>
    <td width="30%"><div align="center">Denpasar, <?php echo $tanggal."-".$bulans."-".$tahun ?></div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="center">Bendahara</div></td>
  </tr>
  <tr>
    <td height="25">&nbsp;</td>
    <td><div align="center"></div></td>
  </tr>
  <tr >
    <td><div style="padding-left:30px;">operator : <?php echo $_SESSION['NamaOperator'];?></div></td>
    <td><div align="center"><?php echo $Namabd ?></div></td>
  </tr>
  <tr>
    <td><div style="padding-left:30px;"><?php echo date('d-m-Y')?></div></td>
    <td><div align="center">NIK. <?php echo $NIPbd ?></div></td>
  </tr>
  <tr style="padding-bottom:15px;">
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>










<table width="100%" border="0" style=" border-top:solid thin #000;">
  <tr height="15px">
    <td style="font-weight:bold; padding-left:30px;"></td>
    <td style="padding-right:30px;"><div align="right"></div></td>
    <td></td>
  </tr>
  <tr>
    <td width="12%" rowspan="3" style="padding-left:30px;"><img src="pict/logo.png" height="40" width="40"></td>
    <td width="68%" style="font-weight:bold; padding-left:30px;">UNIVERSITAS WARMADEWA</td>
    <td width="20%">&nbsp;</td>
  </tr>
  <tr>
    <td style="font-weight:bold; padding-left:30px;">FAKULTAS EKONOMI</td>
    <td style="padding-right:30px;"><div align="right">Arsip</div></td>
  </tr>
  <tr>
    <td style="font-weight:bold; padding-left:30px;">KLAS R. SORE - EKSEKUTIF</td>
    <td style="padding-right:30px;"><div align="right">No. <?php echo $noArsip?></div></td>
  </tr>
</table>
<table width="100%" border="0" style="font-weight:bold;">
  <tr>
    <td><div align="center">KWITANSI</div></td>
  </tr>
  <tr>
<?php 
	$JumlahData = $datagrup->get_detil('',$a,'jumlah', $idgrup);
		$nama2 = '';
		for ($a=2;$a<=$JumlahData;$a++){
			$namaTrx = $datagrup->get_detil('NamaTRX',$a,'', $idgrup);
			$nama2 = $nama2. ", ". $namaTrx;
		}
		if ($JumlahData > 1 ) {
		$Nama1 = $datagrup->get_detil('NamaTRX',1,'', $idgrup);
		$Namatotal = $Nama1.$nama2;
		}else{
		$Namatotal = $datagrup->get_detil('NamaTRX',1,'', $idgrup);	
			}
  ?>
    <td><div align="center">Pembayaran <?php echo $Namatotal; ?></div></td>
  </tr>
</table>

<?php 

	$NPM = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('NPM', $id);
	$nama = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Nama', $id);
	$Jurusan = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Jurusan', $id);
	$tempatLahir = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('TempatLahir', $id);
	$tgl = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('TglLahir', $id);
	$jenisKelamin = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('JenisKelamin', $id);
	$agama = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Agama', $id);
	$alamat = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Alamat', $id);
	$notelp = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('NoTelp', $id);
	$email = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Email', $id);
	$asalSekolah = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('AsalSekolah', $id);
	$statusPerkawinan = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('StatusPerkawinan', $id);
	$statusPekerjaan = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('StatusPekerjaan', $id);
	$perusahaan = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Perusahaan', $id);
	$jabatan = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Jabatan', $id);
	$alamatPerusahaan = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('AlamatPerusahaan', $id);
	$statusMahasiswa = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('StatusMahasiswa', $id);
	$perguruanTinggiAsal = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('PerguruanTinggiAsal', $id);
	$programStudi = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('ProgramStudi', $id);
	$jenjang = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('Jenjang', $id);
	$sks = $DataMahasiswa->get_mahasiswa_single_by_npm_trx('SKSDiakui', $id);
		$kdJurusan =  substr($NPM, 2, 2);
	
	if ($kdJurusan == "31"){
		$Jurusan = "IESP";	
	}elseif ($kdJurusan == "32"){
		$Jurusan = "MANAJEMEN";
	} elseif ($kdJurusan == "33"){
		$Jurusan = "AKUNTANSI";	
	}

?>

<table width="100%" border="0" style="border-collapse:collapse; ">
  <tr>
    <td width="21%" style="padding-left:30px;">Sudah terima dari</td>
    <td width="2%">&nbsp;</td>
    <td colspan="5">&nbsp;</td>
  </tr>
  <tr>
    <td style="padding-left:30px;">Nama</td>
    <td>:</td>
    <td colspan="5"><?php echo $nama ?></td>
  </tr>
  <tr>
    <td style="padding-left:30px;">NPM</td>
    <td>:</td>
    <td colspan="5"><?php echo $NPM ?></td>
  </tr>
  <tr>
    <td style="padding-left:30px;">Jurusan / Prodi</td>
    <td>:</td>
    <td colspan="5"><?php echo $Jurusan?></td>
  </tr>
  <tr>
    <td style="padding-left:30px;">Alamat / No. Telp.</td>
    <td>:</td>
    <td colspan="5"><?php echo $alamat?> / <?php echo $notelp?></td>
  </tr>
  <tr>
    <td style="padding-left:30px;">Buat Pembayaran</td>
    <td>:</td>
    <td width="4%"></td>
    <td width="53%"></td>
    <td width="3%"></td>
    <td width="9%"></td>
    <td width="8%"></td>
  </tr>
  <?php 
	$total = 0;
	$Nomer = 0;
	$JumlahData = $datagrup->get_detil('',$a,'jumlah', $idgrup);
		for ($a=1;$a<=$JumlahData;$a++){
			$ID = $datagrup->get_detil('idTemplate', $a,'', $idgrup);
			$tglInput = $datagrup->get_detil('TglInput',$a,'', $idgrup);
			$namaTrx = $datagrup->get_detil('NamaTRX',$a,'', $idgrup);
			$BiayaTrx = $dataTemplate->get_template_single_by_id('BiayaNonReguler', $ID);
			$total = $total + $BiayaTrx;
 
			$Nomer = $Nomer + 1;
  ?>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td width="4%"><div align="right"><?php echo $Nomer?>. </div></td>
    <td width="53%"> <?php echo $namaTrx ?></td>
    <td width="3%">Rp.</td>
    <td><?php echo number_format($BiayaTrx)?></td>
    <td>&nbsp;</td>
  </tr>
<?php } ?>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td style="padding-right:5px"><div align="right">Jumlah</div></td>
    <td style="border-top:solid thin #000">Rp.</td>
    <td style="border-top:solid thin #000"><?php echo number_format($total)?></td>
    <td >&nbsp;</td>
  </tr>
</table>
<div style="padding-left:30px;">
<?php 

	$nilai = $total;
        
	 echo "Terbilang : "; 	
     echo terbilang($nilai, $style=3);
	 echo " Rupiah";

?>
</div>
<?php 
	$tanggal = date('d');
	$bulan = date('m'); 
	$tahun = date('Y');
	
	if ($bulan == '01'){
		$bulans = 'Januari';
	}elseif ($bulan == '02'){ 
		$bulans = 'Februari';
	}elseif ($bulan == '03'){
		$bulans = 'Maret';
	}elseif ($bulan == '04'){
		$bulans = 'April';
	}elseif ($bulan == '05'){
		$bulans	= 'Mei';
	}elseif ($bulan == '06'){
		$bulans = 'Juni';	
	}elseif ($bulan == '07'){
		$bulans = 'Juli';	
	}elseif ($bulan == '08'){
		$bulans = 'Agustus';	
	}elseif ($bulan == '09'){
		$bulans = 'September';	
	}elseif ($bulan == '10'){
		$bulans = 'Oktober';
	}elseif ($bulan == '11'){
		$bulans ==	'November';
	}elseif ($bulan == '12'){
		$bulans = 'Desember';	
	}
	
	$Namabd = $DataSetLaporan->get_setting('nama');
	$NIPbd = $DataSetLaporan->get_setting('nip');
 
?>
<table width="100%" border="0" style="border-collapse:collapse">
  <tr>
    <td width="70%">&nbsp;</td>
    <td width="30%"><div align="center">Denpasar, <?php echo $tanggal."-".$bulans."-".$tahun ?></div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="center">Bendahara</div></td>
  </tr>
  <tr>
    <td height="25">&nbsp;</td>
    <td><div align="center"></div></td>
  </tr>
  <tr >
    <td><div style="padding-left:30px;">operator : <?php echo $_SESSION['NamaOperator'];?></div></td>
    <td><div align="center"><?php echo $Namabd ?></div></td>
  </tr>
  <tr>
    <td><div style="padding-left:30px;"><?php echo date('d-m-Y')?></div></td>
    <td><div align="center">NIK. <?php echo $NIPbd ?></div></td>
  </tr>
</table>

</body>
</html>