umkm-app/application/views/admin/lapkecpdf.php

238 lines
13 KiB
PHP
Raw Permalink Normal View History

<?php
function rupiah($angka){
$hasil_rupiah = "Rp " . number_format($angka,2,',','.');
return $hasil_rupiah;
}
?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" type="image/png" href="../../assets/images/favicon.png" />
<title>Aplikasi UMKM</title>
<style>
table{
border:solid 1px black;
padding-right:5px;
padding-left:5px;
margin-top:10px;
margin-bottom:20px;
text-align: center;
width:1500px;
font-size: 16px;
}
th{
padding-right:1px;
padding-left:1px;
padding-top:2px;
padding-bottom:2px;
border:solid 1px black;
}
thead{
background-color: #ccc;
}
td{
padding-right:1px;
padding-left:1px;
padding-top:2px;
padding-bottom:2px;
text-align: center;
border:solid 1px black;
}
.judul{
font-weight: bold;
text-align: center;
width: 1500px;
font-size: 20px;
}
.spasi{
height:40px;
content: '&nbsp;';
min-height: 40px;
}
</style>
</head>
<body>
<div class="spasi">&nbsp;</div>
<div class="judul">
REKAP DATA UMKM KECAMATAN <?php echo strtoupper($kecamatan) ?> <?php echo $tahun ?> <br>
KOTA MAGELANG
</div>
<div class="spasi">&nbsp;</div>
<?php if($msg!=='empty'){?>
<div>
<table>
<thead>
<tr>
<th rowspan="3">No</th>
<th rowspan="3">kelurahan</th>
<th rowspan="2" colspan="3">Jml Umkm</th>
<th rowspan="2" colspan="3">Omset/Bulan</th>
<th rowspan="2" colspan="3">Aset</th>
<th rowspan="1" colspan="6">Jml Naker</th>
<th rowspan="1" colspan="9">Klasifikasi</th>
</tr>
<tr>
<th colspan="2">P</th>
<th colspan="2">J</th>
<th colspan="2">I</th>
<th colspan="3">P</th>
<th colspan="3">J</th>
<th colspan="3">I</th>
</tr>
<tr>
<th>P</th>
<th>J</th>
<th>I</th>
<th>P</th>
<th>J</th>
<th>I</th>
<th>P</th>
<th>J</th>
<th>I</th>
<th>L</th>
<th>P</th>
<th>L</th>
<th>P</th>
<th>L</th>
<th>P</th>
<th>M</th>
<th>K</th>
<th>MN</th>
<th>M</th>
<th>K</th>
<th>MN</th>
<th>M</th>
<th>K</th>
<th>MN</th>
</tr>
</thead>
<tbody>
<?php
$no=0;
foreach($listlaporan as $laporan){
$no++;
?>
<tr>
<td><?php echo $no ?></td>
<td class="text-left"><?php echo $laporan['kelurahan'] ?></td>
<td><?php echo $laporan['umkm_jenis1'] ?></td>
<td><?php echo $laporan['umkm_jenis2'] ?></td>
<td><?php echo $laporan['umkm_jenis3'] ?></td>
<td><?php echo rupiah($laporan['omset_jenis1']) ?></td>
<td><?php echo rupiah($laporan['omset_jenis2']) ?></td>
<td><?php echo rupiah($laporan['omset_jenis3']) ?></td>
<td><?php echo rupiah($laporan['aset_jenis1']) ?></td>
<td><?php echo rupiah($laporan['aset_jenis2']) ?></td>
<td><?php echo rupiah($laporan['aset_jenis3']) ?></td>
<td><?php echo $laporan['karyawan_jen1_l'] ?></td>
<td><?php echo $laporan['karyawan_jen1_p'] ?></td>
<td><?php echo $laporan['karyawan_jen2_l'] ?></td>
<td><?php echo $laporan['karyawan_jen2_p'] ?></td>
<td><?php echo $laporan['karyawan_jen3_l'] ?></td>
<td><?php echo $laporan['karyawan_jen3_p'] ?></td>
<td><?php echo $laporan['umkm_jen1_kat1']?></td>
<td><?php echo $laporan['umkm_jen1_kat2']?></td>
<td><?php echo $laporan['umkm_jen1_kat3']?></td>
<td><?php echo $laporan['umkm_jen2_kat1']?></td>
<td><?php echo $laporan['umkm_jen2_kat2']?></td>
<td><?php echo $laporan['umkm_jen2_kat3']?></td>
<td><?php echo $laporan['umkm_jen3_kat1']?></td>
<td><?php echo $laporan['umkm_jen3_kat2']?></td>
<td><?php echo $laporan['umkm_jen3_kat3']?></td>
</tr>
<?php } ?>
</tbody>
<tfoot>
<tr>
<th colspan="2">Total</th>
<th><?php echo $umkm_jenis1 ?></th>
<th><?php echo $umkm_jenis2 ?></th>
<th><?php echo $umkm_jenis3 ?></th>
<th><?php echo rupiah($omset_jenis1) ?></th>
<th><?php echo rupiah($omset_jenis2) ?></th>
<th><?php echo rupiah($omset_jenis3) ?></th>
<th><?php echo rupiah($aset_jenis1) ?></th>
<th><?php echo rupiah($aset_jenis2) ?></th>
<th><?php echo rupiah($aset_jenis3) ?></th>
<th><?php echo $karyawan_jen1_l ?></th>
<th><?php echo $karyawan_jen1_p ?></th>
<th><?php echo $karyawan_jen2_l ?></th>
<th><?php echo $karyawan_jen2_p ?></th>
<th><?php echo $karyawan_jen3_l ?></th>
<th><?php echo $karyawan_jen3_p ?></th>
<th><?php echo $umkm_jen1_kat1 ?></th>
<th><?php echo $umkm_jen1_kat2 ?></th>
<th><?php echo $umkm_jen1_kat3 ?></th>
<th><?php echo $umkm_jen2_kat1 ?></th>
<th><?php echo $umkm_jen2_kat2 ?></th>
<th><?php echo $umkm_jen2_kat3 ?></th>
<th><?php echo $umkm_jen3_kat1 ?></th>
<th><?php echo $umkm_jen3_kat2 ?></th>
<th><?php echo $umkm_jen3_kat3 ?></th>
</tr>
<tr>
<th colspan="26" style="height:1px;">&nbsp;</th>
</tr>
<tr>
<th colspan="2" rowspan="2">Total</th>
<th colspan="3">Jml Umkm</th>
<th colspan="3">Omset/Bln</th>
<th colspan="3">Aset</th>
<th colspan="6">Naker</th>
<th colspan="3">Mikro</th>
<th colspan="3">Kecil</th>
<th colspan="3">Menengah</th>
</tr>
<tr>
<th colspan="3"><?php echo $umkm ?></th>
<th colspan="3"><?php echo rupiah($omset) ?></th>
<th colspan="3"><?php echo rupiah($aset) ?></th>
<th colspan="6"><?php echo $karyawan ?></th>
<th colspan="3"><?php echo $umkm_kat1 ?></th>
<th colspan="3"><?php echo $umkm_kat2 ?></th>
<th colspan="3"><?php echo $umkm_kat3 ?></th>
</tr>
</tfoot>
</table>
</div>
<?php } else {?>
<div>Tidak ada laporan yang sudah dibuat saat ini.</div>
<?php } ?>
</body>
<script>
var css = '@page { size: landscape; }',
head = document.head || document.getElementsByTagName('head')[0],
style = document.createElement('style');
style.type = 'text/css';
style.media = 'print';
if (style.styleSheet){
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
head.appendChild(style);
window.print();
</script>
</html>