
<?php	
$data = mysqli_query ($koneksi, " select  *
										  
										  from 
										  siswa
										  where
										  id_siswa = $_GET[idsiswa]");
$row = mysqli_fetch_array ($data);
?>
 <div class='row'>
        <div class='col-md-12'>
             <div class="card">
             <div class="card-header">
            <div class='right'>
				     <button class='btn btn-success' onclick="frames['frameresult'].print()"><i class='fa fa-print'></i> Cetak</button>
                   <a href="?pg=transaksi" class='btn  btn-outline-danger'><i class='fa fa-times-circle'></i></a>
		  </div>			 
                  <h5 class="card-title"><i class="fas fa-graduation-cap"></i> Pembayaran</h5>
                </div>
				
           
           <div class='card-body'>
			<table class="table">
				<tr>
					<td style="width:10%;">
						NIS 
					</td>
					<td>
						: <?php echo $row['nis']; ?>
					</td>
				</tr>
				<tr>					
					<td>
						Nama
					</td>
					<td>
						: <?php echo $row['nama'] ; ?>
					</td>
				</tr>
				<tr>		
					<td>
						Kelas
					</td>
					<td>
						: <?php echo $row['id_kelas'] ; ?>
					</td>
				</tr>
			</table>
			<br>
			 <div class='table-responsive'>
                        <table style="font-size: 11px" id='example1' class='table table-bordered table-hover'>
                            <thead>
                            <tr>
                               
						<th width="5px">
							No
						</th>
						<th width="10%">
							Tanggal
						</th>
						<th>
							No Reff
						</th>
						<th>
							Pembayaran
						</th>
						<th width="10%">
							Untuk Bulan
						</th>
						<th width="10%">
							Nominal
						</th>
						
					</tr>
					</thead>
                        <tbody>
					<?php 
					include"fungsi.php";
						$no = 0;
							$data = mysqli_query ($koneksi, " SELECT  * FROM trx WHERE idsiswa='$_GET[idsiswa]' ORDER BY idt ASC ");								 
							while ($rw = mysqli_fetch_array ($data)){
								 $bulane=fetch($koneksi,'bulan',['bln' =>$rw['untuk']]);
								 $kodes=fetch($koneksi,'m_bayar',['kode' =>$rw['kode']]);
							$no++;
					?>
					<tr>
						<td>
							<?php echo $no ; ?>
						</td>
						<td>
							<?= $rw['tanggal'] ?>
						</td>
						<td>
							<?= $rw['bukti'] ?>
						</td>
						<td>
							<?= $kodes['nama_pembayaran'] ?>
						</td>
						<td>
							<?= $bulane['ket'] ?>
						</td>
						<td>
							<b>Rp <?= format_rupiah($kodes['besar']) ?></b>
						</td>
						
					</tr>
					<?php
				
						}
					?>
					 </tbody>
				</table>
				</div>
				</div>
				</div>
				<iframe id='loadframe' name='frameresult' src="sandik_bayar/cetakdetail.php?idsiswa=<?= $_GET['idsiswa'] ?>" style='display:none'></iframe>
 