300 lines
19 KiB
PHP
300 lines
19 KiB
PHP
<?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: ' ';
|
|
min-height: 40px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="spasi"> </div>
|
|
<div class="judul">
|
|
REKAP DATA UMKM KELURAHAN <?php echo strtoupper($kelurahan) ?> <?php echo $tahun ?> <br>
|
|
KOTA MAGELANG
|
|
</div>
|
|
<div class="spasi"> </div>
|
|
<?php if($msg!=='empty'){?>
|
|
<div>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th class="align-middle" rowspan="3">No</th>
|
|
<th class="align-middle" rowspan="3">kelurahan</th>
|
|
<th class="align-middle" rowspan="2" colspan="3">Jml Umkm</th>
|
|
<th class="align-middle" rowspan="2" colspan="3">Omset/Bulan</th>
|
|
<th class="align-middle" rowspan="2" colspan="3">Aset</th>
|
|
<th class="align-middle" rowspan="1" colspan="6">Jml Naker</th>
|
|
<th class="align-middle" 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;"> </th>
|
|
</tr>
|
|
<tr>
|
|
<th colspan="2" rowspan="2"><badge>Total</badge></th>
|
|
<th colspan="3"><badge>Jml Umkm</badge></th>
|
|
<th colspan="3"><badge>Omset/Bln</badge></th>
|
|
<th colspan="3"><badge>Aset</badge></th>
|
|
<th colspan="6"><badge>Naker</badge></th>
|
|
<th colspan="3"><badge>Mikro</badge></th>
|
|
<th colspan="3"><badge>Kecil</badge></th>
|
|
<th colspan="3"><badge>Menengah</badge></th>
|
|
</tr>
|
|
<tr>
|
|
<th colspan="3"><badge><?php echo $umkm ?></badge></th>
|
|
<th colspan="3"><badge><?php echo rupiah($omset) ?></badge></th>
|
|
<th colspan="3"><badge><?php echo rupiah($aset) ?></badge></th>
|
|
<th colspan="6"><badge><?php echo $karyawan ?></badge></th>
|
|
<th colspan="3"><badge><?php echo $umkm_kat1 ?></badge></th>
|
|
<th colspan="3"><badge><?php echo $umkm_kat2 ?></badge></th>
|
|
<th colspan="3"><badge><?php echo $umkm_kat3 ?></badge></th>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
<div class="spasi"> </div>
|
|
<div class="spasi"> </div>
|
|
<div class="judul" style="font-size:16px;text-align:left;">Daftar UMKM <?php echo $kelurahan ?> Tahun <?php echo $tahun ?></div>
|
|
<div class="spasi"> </div>
|
|
<div>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th class="align-middle" rowspan="2">No</th>
|
|
<th class="align-middle" rowspan="2">Nama UMKM</th>
|
|
<th class="align-middle" rowspan="2">Pemilik</th>
|
|
<th class="align-middle" rowspan="2">Kelurahan</th>
|
|
<th class="align-middle" rowspan="2">Alamat</th>
|
|
<th class="align-middle" rowspan="2">Telp</th>
|
|
<th class="align-middle" rowspan="2">Deskripsi</th>
|
|
|
|
<th class="align-middle" rowspan="2">Jenis</th>
|
|
<th class="align-middle" rowspan="2">Omset/Bulan</th>
|
|
<th class="align-middle" rowspan="2">Aset</th>
|
|
<th class="align-middle" colspan="2">Naker</th>
|
|
<th class="align-middle" rowspan="2">Skala Usaha</th>
|
|
</tr>
|
|
<tr>
|
|
<th>L</th>
|
|
<th>P</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$no=0;
|
|
foreach($umkmlist as $umkm){
|
|
$no++;
|
|
$usaha = $this->UmkmModel->getUmkmsById($umkm->id_umkm);
|
|
$jenis = $this->JenisModel->getJenisById($umkm->id_jenis);
|
|
$kategori = $this->KategoriModel->getKategoriById($umkm->id_kategori);
|
|
$listomset = $this->AbsensiModel->getAbsensiByTahunAndUmkmId($umkm->tahun,$umkm->id_umkm);
|
|
$ttl_omset=0;
|
|
foreach($listomset as $oms){
|
|
$ttl_omset = $ttl_omset+$oms->omset;
|
|
}
|
|
$r_omset = $ttl_omset/12;
|
|
?>
|
|
<tr>
|
|
<td><?php echo $no ?></td>
|
|
<td style="text-align:left;" class="text-left text-nowrap"><?php echo $usaha->nama?></td>
|
|
<td style="text-align:left;" class="text-left text-nowrap"><?php echo $umkm->nama?></td>
|
|
<td style="text-align:left;" class="text-left"><?php echo $umkm->kelurahan ?></td>
|
|
<td style="text-align:left;" class="text-left"><?php echo $usaha->alamat ?></td>
|
|
<td><?php echo $usaha->telp ?></td>
|
|
<td style="text-align:left;" class="text-left"><?php echo $usaha->deskripsi ?></td>
|
|
<td style="text-align:left;"><?php echo $jenis->jenis ?></td>
|
|
<td style="text-align:left;" class="text-left"><?php echo rupiah($r_omset) ?></td>
|
|
<td style="text-align:left;" class="text-left"><?php echo rupiah($umkm->aset) ?></td>
|
|
<td><?php echo $umkm->karyawan_l ?></td>
|
|
<td><?php echo $umkm->karyawan_p ?></td>
|
|
<td><?php echo $kategori->kategori ?></td>
|
|
</tr>
|
|
<?php } ?>
|
|
</tbody>
|
|
</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>
|