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

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

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Laporan Detail Registrasi</title>
	<style>
		@page {
			size: landscape;
		}

		body {
			text-align: center;
		}

		table {
			width: 100%;
			border-collapse: collapse;
			margin-bottom: 20px;
		}

		table th,
		table td {
			padding: 8px;
			text-align: left;
			/* border-bottom: 1px solid #ddd; */


		}

		table th {
			background-color: #f2f2f2;
			font-size: 12px;
		}

		tbody tr:nth-child(even) {
			background-color: #f2f2f2;
		}

		tfoot {
			font-weight: bold;
		}

		tfoot:last-child {
			display: table-footer-group;
		}

		.additional-info {
			text-align: right;
			margin-top: 50px;
		}

	</style>
</head>

<body onload="window.print()">
	<table width="100%" border="0">
		<tr>
			
		<td>
				<div style="text-align:center"><b>LAPORAN REGISTRASI PPDB BERDASARKAN NOMOR PENDAFTARAN</b></div>
				<div style="text-align:center"><b>PENERIMAAN PESERTA DIDIK BARU (PPDB) TP.
						<?php echo $tp ?> </b></div>
				<div style="text-align:center"><b><?= $set->sekolah ?></b></div>
				<div style="text-align:center"><small><?= $set->alamat ?>, Tlp./WA : <?= $set->tlp ?></small></div>
			</td>
			
			<!--<td width="15%"><canvas id="qr"></canvas></td>-->
		</tr>
	</table>


	<table style="width: 100%; font-size:10px;">
		<tbody>
			<tr style="border-top: 1px solid #ddd;border-left: 1px solid #ddd;border-right: 1px solid #ddd; align-text:center;">
				<td style="border-top: 1px solid #ddd;border-left: 1px solid #ddd;border-right: 1px solid #ddd;border-bottom:1px solid #ddd; text-align: center;" rowspan="2">No.</td>
				<td style="border-top: 1px solid #ddd;border-left: 1px solid #ddd;border-right: 1px solid #ddd;border-bottom:1px solid #ddd; text-align: center;" rowspan="2">No. Pend</td>
				<td style="border-top: 1px solid #ddd;border-left: 1px solid #ddd;border-right: 1px solid #ddd;border-bottom:1px solid #ddd; text-align: center;" rowspan="2">Tgl. Rekap</td>
				<td style="border-top: 1px solid #ddd;border-left: 1px solid #ddd;border-right: 1px solid #ddd;border-bottom:1px solid #ddd; text-align: center;" rowspan="2">Nama</td>
				<td style="border-top: 1px solid #ddd;border-left: 1px solid #ddd;border-right: 1px solid #ddd;border-bottom:1px solid #ddd; text-align: center;" rowspan="2">Sekolah Asal</td>
				<td style="border-top: 1px solid #ddd;border-left: 1px solid #ddd;border-right: 1px solid #ddd;border-bottom:1px solid #ddd; text-align: center;" rowspan="2">Komp.</td>
				<td style="border-top: 1px solid #ddd;border-left: 1px solid #ddd;border-right: 1px solid #ddd;border-bottom:1px solid #ddd; text-align: center;" colspan="3">Ketentuan</td>
				<td style="border-top: 1px solid #ddd;border-left: 1px solid #ddd;border-right: 1px solid #ddd;border-bottom:1px solid #ddd; text-align: center;" rowspan="2">Angsuran</td>
				<td style="border-top: 1px solid #ddd;border-left: 1px solid #ddd;border-right: 1px solid #ddd;border-bottom:1px solid #ddd; text-align: center;" rowspan="2">Dibayarkan</td>
				<td style="border-top: 1px solid #ddd;border-left: 1px solid #ddd;border-right: 1px solid #ddd;border-bottom:1px solid #ddd; text-align: center;" rowspan="2">Operator</td>
			</tr>
			<tr style="border-top: 1px solid #ddd;border-left: 1px solid #ddd;border-right: 1px solid #ddd;">
				<td style="border-top: 1px solid #ddd;border-left: 1px solid #ddd;border-right: 1px solid #ddd;border-bottom:1px solid #ddd; text-align: center;">Biaya</td>
				<td style="border-top: 1px solid #ddd;border-left: 1px solid #ddd;border-right: 1px solid #ddd;border-bottom:1px solid #ddd; text-align: center;">Potongan</td>
				<td style="border-top: 1px solid #ddd;border-left: 1px solid #ddd;border-right: 1px solid #ddd;border-bottom:1px solid #ddd; text-align: center;">Jumlah</td>
			</tr>
            <?php 
            $no = 0;
            $totalBayar = 0;
            
            foreach ($data->result() as  $value) {
            $no++;
            $totalBayar += $value->bayar;
            
            ?>
			<tr style="border-top: 0px solid #ddd;border-left: 1px solid #ddd;border-right: 1px solid #ddd; ">
				<td style=""><?= $no ?><br></td>
				<td style=""><?= $value->no_pendaftaran ?><br></td>
				<td style=""><?= date('d-M-Y', strtotime($value->tgl_bayar)) ?><br></td>
				<td style=""><?= $value->nama_lengkap ?><br></td>
				<td style=""><?= $value->sekolah_asal ?><br></td>
				<td style=""><?= $value->kd_kompetensi ?><br></td>
				<td style=""><?= "Rp. ".number_format($value->biaya) ?>,-<br></td>
				<td style=""><?= "Rp. ".number_format($value->pot_gel + $value->pot_dp + $value->pot_yatim + $value->pot_spp + $value->pot_yayasan +  $value->pot_sktm + $value->pot_lain) ?>,-<br></td>
				<td style=""><?= "Rp. ".number_format($value->ketentuan) ?>,-<br></td>
				<td style=""><?= $value->angsuran ?><br></td>
				<td style=""><?= "Rp. ".number_format($value->bayar) ?>,-<br></td>
				<td style=""><?= $value->operator ?><br></td>
			</tr>
            <?php 
             }
            ?>
			<tr style="border-top: 1px solid #ddd; ">
				<td style="" colspan="9"><br></td>
				<td style="border-top: 1px solid #ddd;border-left: 1px solid #ddd;border-bottom:1px solid #ddd;text-align: right;"><b>TOTAL :</b><br></td>
				<td style="border-top: 1px solid #ddd;border-right: 1px solid #ddd;border-bottom:1px solid #ddd;"><b><?= "Rp. ".number_format($totalBayar) ?>,-</b><br></td>
				<td style=""><br></td>
			</tr>
		</tbody>
	</table>
	<table>
		<tfoot>

		</tfoot>
	</table>
	<table style="width: 100%;">
		<?php 
    $setting = $this->db->get("setting")->row();
    ?>
		<tbody style="font-size : 12px;">
			<tr style="border-bottom:0px;">
				<td style="width: 25.0000%; border-bottom:0px;"><br></td>
				<td style="width: 25.0000%;  border-bottom:0px;"><br></td>
				<td style="width: 25.0000%; border-bottom:0px;"><br></td>
				<td style="width: 25.0000%; border-bottom:0px;">Depok, <?php echo date('d-M-Y') ?></td>
			</tr>
			<tr style="null">
				<td style="width: 25.0000%; border-bottom:0px;">Ketua YPI Al Muhtadin,<br></td>
				<td style="width: 25.0000%; border-bottom:0px;">Kepala Sekolah,<br></td>
				<td style="width: 25.0000%; border-bottom:0px;">Ketua PPDB,<br></td>
				<td style="width: 25.0000%; border-bottom:0px;">Bendahara,</td>
			</tr>
			<tr>
				<td style="width: 25.0000%; border-bottom:0px;"><br><br><br></td>
				<td style="width: 25.0000%; border-bottom:0px;"><br></td>
				<td style="width: 25.0000%; border-bottom:0px;"><br></td>
				<td style="width: 25.0000%; border-bottom:0px;"><br></td>
			</tr>
			<tr>
				<td style="width: 25.0000%; border-bottom:0px;"><?= $setting->ketua_yayasan ?></td>
				<td style="width: 25.0000%; border-bottom:0px;"><?= $setting->kepsek ?></td>
				<td style="width: 25.0000%; border-bottom:0px;"><?= $setting->ketua_ppdb ?></td>
				<td style="width: 25.0000%; border-bottom:0px;"><?= $setting->bendahara ?></td>
			</tr>
		</tbody>
	</table>



</body>

</html>
