Add Laporan Bulanan, Laporan By Kelurahan, laporan By Kecamatan, and Fix Some Bugs
This commit is contained in:
251
application/views/admin/lapbulpdf.php
Normal file
251
application/views/admin/lapbulpdf.php
Normal file
@@ -0,0 +1,251 @@
|
||||
<?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: 14px;
|
||||
}
|
||||
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: ' ';
|
||||
min-height: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
if($bulan==1){
|
||||
$bulantext = 'Januari';
|
||||
}elseif($bulan==1){
|
||||
$bulantext = 'Februari';
|
||||
}elseif($bulan==2){
|
||||
$bulantext = 'Februari';
|
||||
}elseif($bulan==3){
|
||||
$bulantext = 'Maret';
|
||||
}elseif($bulan==4){
|
||||
$bulantext = 'April';
|
||||
}elseif($bulan==5){
|
||||
$bulantext = 'Mei';
|
||||
}elseif($bulan==6){
|
||||
$bulantext = 'Juni';
|
||||
}elseif($bulan==7){
|
||||
$bulantext = 'Julai';
|
||||
}elseif($bulan==8){
|
||||
$bulantext = 'Agustus';
|
||||
}elseif($bulan==9){
|
||||
$bulantext = 'September';
|
||||
}elseif($bulan==10){
|
||||
$bulantext = 'Oktober';
|
||||
}elseif($bulan==11){
|
||||
$bulantext = 'November';
|
||||
}elseif($bulan==12){
|
||||
$bulantext = 'Desember';
|
||||
}
|
||||
?>
|
||||
<div class="spasi"> </div>
|
||||
<div class="judul">
|
||||
REKAP DATA UMKM BULAN <?php echo strtoupper($bulantext) ?> <?php echo $tahun ?> <br>
|
||||
KOTA MAGELANG
|
||||
</div>
|
||||
<div class="spasi"> </div>
|
||||
<?php if($msg!=='empty'){?>
|
||||
<div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">Jumlah UMKM</th>
|
||||
<th colspan="3">Omset/Bulan</th>
|
||||
<th colspan="3">Aset</th>
|
||||
<th colspan="6" >Jumlah Naker</th>
|
||||
<th colspan="9" >Klasifikasi</th>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<th rowspan="2">P</th>
|
||||
<th rowspan="2">J</th>
|
||||
<th rowspan="2">I</th>
|
||||
|
||||
<th rowspan="2">P</th>
|
||||
<th rowspan="2">J</th>
|
||||
<th rowspan="2">I</th>
|
||||
|
||||
<th rowspan="2">P</th>
|
||||
<th rowspan="2">J</th>
|
||||
<th rowspan="2">I</th>
|
||||
|
||||
<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>L</th>
|
||||
<th>P</th>
|
||||
|
||||
<th>L</th>
|
||||
<th>P</th>
|
||||
|
||||
<th>L</th>
|
||||
<th>P</th>
|
||||
|
||||
<th>MK</th>
|
||||
<th>K</th>
|
||||
<th>MN</th>
|
||||
|
||||
<th>MK</th>
|
||||
<th>K</th>
|
||||
<th>MN</th>
|
||||
|
||||
<th>MK</th>
|
||||
<th>K</th>
|
||||
<th>MN</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php echo $umkm_jen1 ?></td>
|
||||
<td><?php echo $umkm_jen2 ?></td>
|
||||
<td><?php echo $umkm_jen3 ?></td>
|
||||
|
||||
<td><?php echo rupiah($omset_bln_jen1) ?></td>
|
||||
<td><?php echo rupiah($omset_bln_jen2) ?></td>
|
||||
<td><?php echo rupiah($omset_bln_jen3) ?></td>
|
||||
|
||||
<td><?php echo rupiah($aset_jen1) ?></td>
|
||||
<td><?php echo rupiah($aset_jen2) ?></td>
|
||||
<td><?php echo rupiah($aset_jen3) ?></td>
|
||||
|
||||
<td><?php echo $naker_jen1_l ?></td>
|
||||
<td><?php echo $naker_jen1_p ?></td>
|
||||
|
||||
<td><?php echo $naker_jen2_l ?></td>
|
||||
<td><?php echo $naker_jen2_p ?></td>
|
||||
|
||||
<td><?php echo $naker_jen3_l ?></td>
|
||||
<td><?php echo $naker_jen3_p ?></td>
|
||||
|
||||
<td><?php echo $umkm_jen1_ket1?></td>
|
||||
<td><?php echo $umkm_jen1_ket2?></td>
|
||||
<td><?php echo $umkm_jen1_ket3?></td>
|
||||
<td><?php echo $umkm_jen2_ket1?></td>
|
||||
<td><?php echo $umkm_jen2_ket2?></td>
|
||||
<td><?php echo $umkm_jen2_ket3?></td>
|
||||
<td><?php echo $umkm_jen3_ket1?></td>
|
||||
<td><?php echo $umkm_jen3_ket2?></td>
|
||||
<td><?php echo $umkm_jen3_ket3?></td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="3">Total</th>
|
||||
<th colspan="3">Total</th>
|
||||
<th colspan="3">Total</th>
|
||||
<th colspan="6">Total</th>
|
||||
<th colspan="3">Mikro</th>
|
||||
<th colspan="3">Kecil</th>
|
||||
<th colspan="3">Menengah</th>
|
||||
</tr>
|
||||
<?php
|
||||
$umkm = $umkm_jen1+$umkm_jen2+$umkm_jen3;
|
||||
$omset = $omset_bln_jen1+$omset_bln_jen2+$omset_bln_jen3;
|
||||
|
||||
$naker = $naker_jen1_l+$naker_jen2_l+$naker_jen3_l;
|
||||
$naker = $naker+$naker_jen1_p+$naker_jen2_p+$naker_jen3_p;
|
||||
$aset = $aset_jen1+$aset_jen2+$aset_jen3;
|
||||
|
||||
$mikro = $umkm_jen1_ket1+$umkm_jen2_ket1+$umkm_jen3_ket1;
|
||||
$kecil = $umkm_jen1_ket2+$umkm_jen2_ket2+$umkm_jen3_ket2;
|
||||
$menengah = $umkm_jen1_ket3+$umkm_jen2_ket3+$umkm_jen3_ket3;
|
||||
?>
|
||||
<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 $naker ?></th>
|
||||
<th colspan="3"><?php echo $mikro ?></th>
|
||||
<th colspan="3"><?php echo $kecil ?></th>
|
||||
<th colspan="3"><?php echo $menengah ?></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php } else {?>
|
||||
<div>Tidak ada laporan yang sudah dibuat saat ini.</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<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>
|
||||
Reference in New Issue
Block a user