<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>PPDB | Cetak Data Penyerahan Berkas</title>
	<link rel="icon" href="../../images/logo-smk.png" type="image/x-icon" />
</head>

<?php
$set =  $this->db->get("setting")->row();
?>


<body onload="window.print()">

	<style>
		table {
			border-collapse: collapse;
		}

	</style>

	<div style="width:800px; margin:auto; border:2px solid #000; padding:8px;">
		<table width="100%" border="0">
			<tr>
				<td width="15%" align="right"><img src="../../images/logo-smk.png" width="60"></td>
				<td>
					<div style="text-align:center"><b>SALIN FAKTUR PEMBAYARAN</b></div>
					<div style="text-align:center"><b>PENERIMAAN PESERTA DIDIK BARU (PPDB) TP.
							<?php echo $data->tahun_pelajaran ?> </b></div>
					<div style="text-align:center"><b><?php echo $set->sekolah ?> </b></div>
					<div style="text-align:center"><small>Website : <?php echo $set->website ?> - Tlp./WA : <?php echo $set->tlp?></small></div>
				</td>
				<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				</td>
				<!--<td width="15%"><canvas id="qr"></canvas></td>-->
			</tr>
		</table>

		<hr size="3px" color="#0000">


		<div style="width:750px; margin:auto; border:0px dashed; #000; padding:0px;">
			<table style="width: 100%; font-size: 12px; border-collapse: collapse;">
				<tbody>
				<tr>
						<td style="width: 12.7794%;">No. Pendaftaran</td>
						<td style="width: 2.4412%;">:</td>
						<td style="width: 92.8944%;" colspan="3"><b><?= $data->no_pendaftaran ?></b></td>
						<td style="width: 19.885%;" align="right"><?= $data->gelombang ?></td>
					</tr>
					<tr>
						<td style="width: 12.7794%;">Nama Lengkap</td>
						<td style="width: 2.4412%;">:</td>
						<td style="width: 92.6496%;" colspan="4"><b><?= $data->nama_lengkap ?></b></td>
					</tr>
					<tr>
						<td style="width: 12.7794%;">Sekolah Asal</td>
						<td style="width: 2.4412%;">:</td>
						<td style="width: 92.6496%;" colspan="4"><?= $data->sekolah_asal ?></td>
					</tr>
					<tr>
						<td style="width: 12.7794%;">Komp. Diminati</td>
						<td style="width: 2.4412%;">:</td>
						<td style="width: 92.6496%;" colspan="4"><?= $data->kompetensi ?></td>
					</tr>
					<tr>
						<td style="width: 12.7794%;">Biaya PPDB</td>
						<td style="width: 2.4412%;">:</td>
						<td style="width: 13.2712%;">Rp. <?= number_format($data->biaya) ?>,-</td>
						<td style="width: 10.8827%;">Jumlah Potongan* : </td>
						<td style="width: 19.9454%;">Rp. <?php  echo number_format($data->pot_gel + $data->pot_dp + $data->pot_yatim + $data->pot_spp + $data->pot_kembar + $data->pot_yayasan +  $data->pot_sktm + $data->pot_lain, 0, ',', '.'); ?>,-<br></td>
						<td style="width: 19.885%;"><br></td>
					</tr>
				</tbody>
			</table>
		</div>
		<div style="width: 780px;  padding: 10px; float: left">
			<table style="width: 100%; border-collapse: collapse; font-size: 13px;">
				<tbody>
					<tr style="border-top: 1px solid black; border-bottom: 1px solid black; ">
						<td style="width: 5.2857%;"><b>NO.</b></td>
						<td style="width: 14.2857%;"><b>TGL. REKAP</b></td>
						<td style="width: 14.2857%;"><b>NO. TRANSAKSI</b></td>
						<td style="width: 14.2857%;"><b>URAIAN</b></td>
						<td style="width: 14.2857%;"><b>BAYAR</b></td>
						<td style="width: 14.2857%;"><b>OPERATOR</b></td>
						<td style="width: 14.2857%;"><b>PARAF</b></td>
					</tr>
                    <?php 
                    $no=0;
                    foreach ($datatrx as  $value) {
                    $no++;
                    
                    ?>
					<tr style="border-top: 1px solid black; border-bottom: 1px solid black; ">
						<td style="width: 5.2857%;"><?= $no ?><br></td>
						<td style="width: 14.2857%;"><?php $timestamp = strtotime($value->tgl_bayar);

// Menggunakan date() untuk mengonversi UNIX timestamp ke dalam format yang diinginkan
$tanggal_bayar = date("d-M-Y", $timestamp);

// Menampilkan tanggal yang sudah diubah formatnya
echo $tanggal_bayar; ?><br></td>
						<td style="width: 14.2857%;"><?= $value->no_trans ?><br></td>
						<td style="width: 14.2857%;"><?= $value->angsuran ?><br></td>
						<td style="width: 14.2857%; ">Rp. <?= number_format($value->bayar) ?>,-<br></td>
						<td style="width: 14.2857%;"><?= $value->operator ?><br></td>
						<td style="width: 14.2857%;"><?= $no ?><br></td>
					</tr>
                    <?php } ?>					
				</tbody>
			</table>
			<i><small>Ket. : *Ketentuan berlaku</small></i><br>
		</div>
		
		<div style="width: 220px;  float: left">
			<p>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; Pembayar,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
				&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</p>
			<p><br></p>
			<p>&nbsp; ( ............................ )</p>
		</div>

		<div style="width: 310px; border:1px solid; padding: 10px; float: left;margin-top:5px">
			<table style="width: 100%;">
				<tbody>
					<tr>
						<td style="width: 30.3333%; text-align: right;"><b>Total Keseluruhan<b></td>
						<td style="width: 4.4659%; text-align: center;"><b>: Rp.</b></td>
						<td style="width: 15.0097%;  text-align: right;"><b><?= number_format($data->ketentuan) ?></b>,-</td>
					</tr>
					<tr>
						<td style="width: 30.3333%; text-align: right;"><b>Total Bayar</b></td>
						<td style="width: 4.4659%; text-align: center;"><b>: Rp.</b></td>
						<td style="width: 15.0097%;  text-align: right;"><b><?= number_format($total) ?></b>,-</td>
					</tr>
					<tr>
						<td style="width: 30.3333%; text-align: right;"><b>Sisa Angsuran</b></td>
						<td style="width: 4.4659%; text-align: center;"><b>: Rp.</b></td>
						<td style="width: 15.0097%;  text-align: right;"><b><?= number_format($data->ketentuan -  $total) ?></b>,-</td>
					</tr>
				</tbody>
			</table>
		</div>



		<div style="clear:both"></div>
	</div>

</body>

</html>
