Add Laporan Bulanan, Laporan By Kelurahan, laporan By Kecamatan, and Fix Some Bugs
parent
4a12d026fd
commit
b42ee3ba25
|
@ -49,6 +49,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||
| Examples: my-controller/index -> my_controller/index
|
||||
| my-controller/my-method -> my_controller/my_method
|
||||
*/
|
||||
|
||||
$route['default_controller'] = 'Login';
|
||||
$route['404_override'] = '';
|
||||
$route['translate_uri_dashes'] = FALSE;
|
||||
$route['admin'] = 'admin/Dashboard';
|
||||
$route['user'] = 'user/Dashboard';
|
||||
|
|
|
@ -0,0 +1,169 @@
|
|||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class LapbulPdf extends CI_Controller {
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
parent::__construct();
|
||||
$this->load->model("UserModel");
|
||||
$this->load->model("LaporanModel");
|
||||
$this->load->model("KategoriModel");
|
||||
$this->load->model("JenisModel");
|
||||
|
||||
if($this->UserModel->isNotLogin()) {
|
||||
redirect(site_url('login'));
|
||||
} elseif(!($this->UserModel->isAdmin())) {
|
||||
redirect(site_url('dashboard'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
if($this->input->get()){
|
||||
$get = $this->input->get();
|
||||
$month = $get['bulan'];
|
||||
$year = $get['tahun'];
|
||||
} else {
|
||||
redirect(site_url('admin/laporanbulanan'));
|
||||
die();
|
||||
}
|
||||
//cek ada laporan tahunan atau tidak
|
||||
$countlaporan = $this->LaporanModel->getLaporanCount();
|
||||
if($countlaporan>0){
|
||||
|
||||
//cek ada laporan bulanan atau tidak
|
||||
$countlaporanbulan = $this->LaporanModel->getLaporanCountByYear($year);
|
||||
if($countlaporanbulan>0){
|
||||
|
||||
$data['tahun'] = $year;
|
||||
$data['bulan'] = $month;
|
||||
|
||||
|
||||
$omset_jen1=0;
|
||||
$omset_jen2=0;
|
||||
$omset_jen3=0;
|
||||
|
||||
$umkm_jen1=0;
|
||||
$umkm_jen2=0;
|
||||
$umkm_jen3=0;
|
||||
|
||||
$umkm_jen1_ket1=0;
|
||||
$umkm_jen1_ket2=0;
|
||||
$umkm_jen1_ket3=0;
|
||||
$umkm_jen2_ket1=0;
|
||||
$umkm_jen2_ket2=0;
|
||||
$umkm_jen2_ket3=0;
|
||||
$umkm_jen3_ket1=0;
|
||||
$umkm_jen3_ket2=0;
|
||||
$umkm_jen3_ket3=0;
|
||||
|
||||
$aset_jen1=0;
|
||||
$aset_jen2=0;
|
||||
$aset_jen3=0;
|
||||
$naker_jen1_l=0;
|
||||
$naker_jen1_p=0;
|
||||
$naker_jen2_l=0;
|
||||
$naker_jen2_p=0;
|
||||
$naker_jen3_l=0;
|
||||
$naker_jen3_p=0;
|
||||
|
||||
$lap_kelurahan = $this->LaporanModel->getKelurahanByBulanAndYear($month,$year);
|
||||
|
||||
foreach($lap_kelurahan as $kelurahan){
|
||||
$laporan = $this->LaporanModel->getLaporanByBulanByYearByKelurahan($month,$year,$kelurahan->kelurahan);
|
||||
$umkm_jen1= $umkm_jen1+$laporan->umkm_jen1_kat1+$laporan->umkm_jen1_kat2+$laporan->umkm_jen1_kat3;
|
||||
$umkm_jen2= $umkm_jen2+$laporan->umkm_jen2_kat1+$laporan->umkm_jen2_kat2+$laporan->umkm_jen2_kat3;
|
||||
$umkm_jen3= $umkm_jen3+$laporan->umkm_jen3_kat1+$laporan->umkm_jen3_kat2+$laporan->umkm_jen3_kat3;
|
||||
$omset_jen1= $omset_jen1+$laporan->omset_jenis1;
|
||||
$omset_jen2= $omset_jen2+$laporan->omset_jenis2;
|
||||
$omset_jen3= $omset_jen3+$laporan->omset_jenis3;
|
||||
$aset_jen1= $aset_jen1+$laporan->aset_jenis1;
|
||||
$aset_jen2= $aset_jen2+$laporan->aset_jenis2;
|
||||
$aset_jen3= $aset_jen3+$laporan->aset_jenis3;
|
||||
$naker_jen1_l = $naker_jen1_l + $laporan->karyawan_jen1_l;
|
||||
$naker_jen1_p = $naker_jen1_p + $laporan->karyawan_jen1_p;
|
||||
$naker_jen2_l = $naker_jen2_l + $laporan->karyawan_jen2_l;
|
||||
$naker_jen2_p = $naker_jen2_p + $laporan->karyawan_jen2_p;
|
||||
$naker_jen3_l = $naker_jen3_l + $laporan->karyawan_jen3_l;
|
||||
$naker_jen3_p = $naker_jen3_p + $laporan->karyawan_jen3_p;
|
||||
|
||||
$umkm_jen1_ket1=$umkm_jen1_ket1+$laporan->umkm_jen1_kat1;
|
||||
$umkm_jen1_ket2=$umkm_jen1_ket2+$laporan->umkm_jen1_kat2;
|
||||
$umkm_jen1_ket3=$umkm_jen1_ket3+$laporan->umkm_jen1_kat3;
|
||||
$umkm_jen2_ket1=$umkm_jen2_ket1+$laporan->umkm_jen2_kat1;
|
||||
$umkm_jen2_ket2=$umkm_jen2_ket2+$laporan->umkm_jen2_kat2;
|
||||
$umkm_jen2_ket3=$umkm_jen2_ket3+$laporan->umkm_jen2_kat3;
|
||||
$umkm_jen3_ket1=$umkm_jen3_ket1+$laporan->umkm_jen3_kat1;
|
||||
$umkm_jen3_ket2=$umkm_jen3_ket2+$laporan->umkm_jen3_kat2;
|
||||
$umkm_jen3_ket3=$umkm_jen3_ket3+$laporan->umkm_jen3_kat3;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$data['umkm_jen1_ket1']=$umkm_jen1_ket1;
|
||||
$data['umkm_jen1_ket2']=$umkm_jen1_ket2;
|
||||
$data['umkm_jen1_ket3']=$umkm_jen1_ket3;
|
||||
$data['umkm_jen2_ket1']=$umkm_jen2_ket1;
|
||||
$data['umkm_jen2_ket2']=$umkm_jen2_ket2;
|
||||
$data['umkm_jen2_ket3']=$umkm_jen2_ket3;
|
||||
$data['umkm_jen3_ket1']=$umkm_jen3_ket1;
|
||||
$data['umkm_jen3_ket2']=$umkm_jen3_ket2;
|
||||
$data['umkm_jen3_ket3']=$umkm_jen3_ket3;
|
||||
|
||||
|
||||
$omset_bln_jen1= $omset_jen1;
|
||||
$omset_bln_jen2= $omset_jen2;
|
||||
$omset_bln_jen3= $omset_jen3;
|
||||
|
||||
|
||||
|
||||
$data['umkm_jen1']=$umkm_jen1;
|
||||
$data['umkm_jen2']=$umkm_jen2;
|
||||
$data['umkm_jen3']=$umkm_jen3;
|
||||
|
||||
$data['omset_bln_jen1'] = $omset_bln_jen1;
|
||||
$data['omset_bln_jen2'] = $omset_bln_jen2;
|
||||
$data['omset_bln_jen3'] = $omset_bln_jen3;
|
||||
|
||||
$data['aset_jen1'] = $aset_jen1;
|
||||
$data['aset_jen2'] = $aset_jen2;
|
||||
$data['aset_jen3'] = $aset_jen3;
|
||||
$data['naker_jen1_l'] = $naker_jen1_l;
|
||||
$data['naker_jen1_p'] = $naker_jen1_p;
|
||||
$data['naker_jen2_l'] = $naker_jen2_l;
|
||||
$data['naker_jen2_p'] = $naker_jen2_p;
|
||||
$data['naker_jen3_l'] = $naker_jen3_l;
|
||||
$data['naker_jen3_p'] = $naker_jen3_p;
|
||||
|
||||
//komulatif
|
||||
$data['omset_1'] = $omset_bln_jen1+$omset_bln_jen2+$omset_bln_jen3;
|
||||
$data['aset_1'] = $aset_jen1+$aset_jen2+$aset_jen3;
|
||||
$data['umkm_1'] = $umkm_jen1+$umkm_jen2+$umkm_jen3;
|
||||
$naker_1 = $naker_jen1_l+$naker_jen2_l+$naker_jen3_l;
|
||||
$data['naker_1'] = $naker_1+$naker_jen1_p+$naker_jen2_p+$naker_jen3_p;
|
||||
$data['mikro_1'] = $umkm_jen1_ket1+$umkm_jen2_ket1+$umkm_jen3_ket1;
|
||||
$data['kecil_1'] = $umkm_jen1_ket2+$umkm_jen2_ket2+$umkm_jen3_ket2;
|
||||
$data['menengah_1'] = $umkm_jen1_ket3+$umkm_jen2_ket3+$umkm_jen3_ket3;
|
||||
|
||||
$data['msg'] = 'found';
|
||||
}
|
||||
} else {
|
||||
$data['msg'] = 'empty';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$data['user_logged'] = $this->session->userdata('user_logged');
|
||||
|
||||
$this->load->view('admin/lapbulpdf',$data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,169 @@
|
|||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class LapbulXls extends CI_Controller {
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
parent::__construct();
|
||||
$this->load->model("UserModel");
|
||||
$this->load->model("LaporanModel");
|
||||
$this->load->model("KategoriModel");
|
||||
$this->load->model("JenisModel");
|
||||
|
||||
if($this->UserModel->isNotLogin()) {
|
||||
redirect(site_url('login'));
|
||||
} elseif(!($this->UserModel->isAdmin())) {
|
||||
redirect(site_url('dashboard'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
if($this->input->get()){
|
||||
$get = $this->input->get();
|
||||
$month = $get['bulan'];
|
||||
$year = $get['tahun'];
|
||||
} else {
|
||||
redirect(site_url('admin/laporanbulanan'));
|
||||
die();
|
||||
}
|
||||
//cek ada laporan tahunan atau tidak
|
||||
$countlaporan = $this->LaporanModel->getLaporanCount();
|
||||
if($countlaporan>0){
|
||||
|
||||
//cek ada laporan bulanan atau tidak
|
||||
$countlaporanbulan = $this->LaporanModel->getLaporanCountByYear($year);
|
||||
if($countlaporanbulan>0){
|
||||
|
||||
$data['tahun'] = $year;
|
||||
$data['bulan'] = $month;
|
||||
|
||||
|
||||
$omset_jen1=0;
|
||||
$omset_jen2=0;
|
||||
$omset_jen3=0;
|
||||
|
||||
$umkm_jen1=0;
|
||||
$umkm_jen2=0;
|
||||
$umkm_jen3=0;
|
||||
|
||||
$umkm_jen1_ket1=0;
|
||||
$umkm_jen1_ket2=0;
|
||||
$umkm_jen1_ket3=0;
|
||||
$umkm_jen2_ket1=0;
|
||||
$umkm_jen2_ket2=0;
|
||||
$umkm_jen2_ket3=0;
|
||||
$umkm_jen3_ket1=0;
|
||||
$umkm_jen3_ket2=0;
|
||||
$umkm_jen3_ket3=0;
|
||||
|
||||
$aset_jen1=0;
|
||||
$aset_jen2=0;
|
||||
$aset_jen3=0;
|
||||
$naker_jen1_l=0;
|
||||
$naker_jen1_p=0;
|
||||
$naker_jen2_l=0;
|
||||
$naker_jen2_p=0;
|
||||
$naker_jen3_l=0;
|
||||
$naker_jen3_p=0;
|
||||
|
||||
$lap_kelurahan = $this->LaporanModel->getKelurahanByBulanAndYear($month,$year);
|
||||
|
||||
foreach($lap_kelurahan as $kelurahan){
|
||||
$laporan = $this->LaporanModel->getLaporanByBulanByYearByKelurahan($month,$year,$kelurahan->kelurahan);
|
||||
$umkm_jen1= $umkm_jen1+$laporan->umkm_jen1_kat1+$laporan->umkm_jen1_kat2+$laporan->umkm_jen1_kat3;
|
||||
$umkm_jen2= $umkm_jen2+$laporan->umkm_jen2_kat1+$laporan->umkm_jen2_kat2+$laporan->umkm_jen2_kat3;
|
||||
$umkm_jen3= $umkm_jen3+$laporan->umkm_jen3_kat1+$laporan->umkm_jen3_kat2+$laporan->umkm_jen3_kat3;
|
||||
$omset_jen1= $omset_jen1+$laporan->omset_jenis1;
|
||||
$omset_jen2= $omset_jen2+$laporan->omset_jenis2;
|
||||
$omset_jen3= $omset_jen3+$laporan->omset_jenis3;
|
||||
$aset_jen1= $aset_jen1+$laporan->aset_jenis1;
|
||||
$aset_jen2= $aset_jen2+$laporan->aset_jenis2;
|
||||
$aset_jen3= $aset_jen3+$laporan->aset_jenis3;
|
||||
$naker_jen1_l = $naker_jen1_l + $laporan->karyawan_jen1_l;
|
||||
$naker_jen1_p = $naker_jen1_p + $laporan->karyawan_jen1_p;
|
||||
$naker_jen2_l = $naker_jen2_l + $laporan->karyawan_jen2_l;
|
||||
$naker_jen2_p = $naker_jen2_p + $laporan->karyawan_jen2_p;
|
||||
$naker_jen3_l = $naker_jen3_l + $laporan->karyawan_jen3_l;
|
||||
$naker_jen3_p = $naker_jen3_p + $laporan->karyawan_jen3_p;
|
||||
|
||||
$umkm_jen1_ket1=$umkm_jen1_ket1+$laporan->umkm_jen1_kat1;
|
||||
$umkm_jen1_ket2=$umkm_jen1_ket2+$laporan->umkm_jen1_kat2;
|
||||
$umkm_jen1_ket3=$umkm_jen1_ket3+$laporan->umkm_jen1_kat3;
|
||||
$umkm_jen2_ket1=$umkm_jen2_ket1+$laporan->umkm_jen2_kat1;
|
||||
$umkm_jen2_ket2=$umkm_jen2_ket2+$laporan->umkm_jen2_kat2;
|
||||
$umkm_jen2_ket3=$umkm_jen2_ket3+$laporan->umkm_jen2_kat3;
|
||||
$umkm_jen3_ket1=$umkm_jen3_ket1+$laporan->umkm_jen3_kat1;
|
||||
$umkm_jen3_ket2=$umkm_jen3_ket2+$laporan->umkm_jen3_kat2;
|
||||
$umkm_jen3_ket3=$umkm_jen3_ket3+$laporan->umkm_jen3_kat3;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$data['umkm_jen1_ket1']=$umkm_jen1_ket1;
|
||||
$data['umkm_jen1_ket2']=$umkm_jen1_ket2;
|
||||
$data['umkm_jen1_ket3']=$umkm_jen1_ket3;
|
||||
$data['umkm_jen2_ket1']=$umkm_jen2_ket1;
|
||||
$data['umkm_jen2_ket2']=$umkm_jen2_ket2;
|
||||
$data['umkm_jen2_ket3']=$umkm_jen2_ket3;
|
||||
$data['umkm_jen3_ket1']=$umkm_jen3_ket1;
|
||||
$data['umkm_jen3_ket2']=$umkm_jen3_ket2;
|
||||
$data['umkm_jen3_ket3']=$umkm_jen3_ket3;
|
||||
|
||||
|
||||
$omset_bln_jen1= $omset_jen1;
|
||||
$omset_bln_jen2= $omset_jen2;
|
||||
$omset_bln_jen3= $omset_jen3;
|
||||
|
||||
|
||||
|
||||
$data['umkm_jen1']=$umkm_jen1;
|
||||
$data['umkm_jen2']=$umkm_jen2;
|
||||
$data['umkm_jen3']=$umkm_jen3;
|
||||
|
||||
$data['omset_bln_jen1'] = $omset_bln_jen1;
|
||||
$data['omset_bln_jen2'] = $omset_bln_jen2;
|
||||
$data['omset_bln_jen3'] = $omset_bln_jen3;
|
||||
|
||||
$data['aset_jen1'] = $aset_jen1;
|
||||
$data['aset_jen2'] = $aset_jen2;
|
||||
$data['aset_jen3'] = $aset_jen3;
|
||||
$data['naker_jen1_l'] = $naker_jen1_l;
|
||||
$data['naker_jen1_p'] = $naker_jen1_p;
|
||||
$data['naker_jen2_l'] = $naker_jen2_l;
|
||||
$data['naker_jen2_p'] = $naker_jen2_p;
|
||||
$data['naker_jen3_l'] = $naker_jen3_l;
|
||||
$data['naker_jen3_p'] = $naker_jen3_p;
|
||||
|
||||
//komulatif
|
||||
$data['omset_1'] = $omset_bln_jen1+$omset_bln_jen2+$omset_bln_jen3;
|
||||
$data['aset_1'] = $aset_jen1+$aset_jen2+$aset_jen3;
|
||||
$data['umkm_1'] = $umkm_jen1+$umkm_jen2+$umkm_jen3;
|
||||
$naker_1 = $naker_jen1_l+$naker_jen2_l+$naker_jen3_l;
|
||||
$data['naker_1'] = $naker_1+$naker_jen1_p+$naker_jen2_p+$naker_jen3_p;
|
||||
$data['mikro_1'] = $umkm_jen1_ket1+$umkm_jen2_ket1+$umkm_jen3_ket1;
|
||||
$data['kecil_1'] = $umkm_jen1_ket2+$umkm_jen2_ket2+$umkm_jen3_ket2;
|
||||
$data['menengah_1'] = $umkm_jen1_ket3+$umkm_jen2_ket3+$umkm_jen3_ket3;
|
||||
|
||||
$data['msg'] = 'found';
|
||||
}
|
||||
} else {
|
||||
$data['msg'] = 'empty';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$data['user_logged'] = $this->session->userdata('user_logged');
|
||||
|
||||
$this->load->view('admin/lapbulxls',$data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,239 @@
|
|||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class LapkecPdf extends CI_Controller {
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
parent::__construct();
|
||||
$this->load->model("UserModel");
|
||||
$this->load->model("LaporanModel");
|
||||
$this->load->model("KategoriModel");
|
||||
$this->load->model("JenisModel");
|
||||
|
||||
if($this->UserModel->isNotLogin()) {
|
||||
redirect(site_url('login'));
|
||||
} elseif(!($this->UserModel->isAdmin())) {
|
||||
redirect(site_url('dashboard'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
if($this->input->get()){
|
||||
$get = $this->input->get();
|
||||
$kecamatan = $get['kecamatan'];
|
||||
} else {
|
||||
$kecamatan = 'Magelang Selatan';
|
||||
}
|
||||
|
||||
//cek ada laporan atau tidak
|
||||
$countlaporan = $this->LaporanModel->getLaporanCount();
|
||||
if($countlaporan>0){
|
||||
$year = $this->LaporanModel->getLastYearLaporan()->tahun;
|
||||
} else {
|
||||
redirect(site_url('admin/laporan'));die();
|
||||
}
|
||||
|
||||
//cek ada laporan kecamatan atau tidak
|
||||
$countlaporankec = $this->LaporanModel->getCountByTahunByKecamatan($year,$kecamatan);
|
||||
if($countlaporankec>0){
|
||||
$data['msg'] = 'found';
|
||||
$listkel = $this->LaporanModel->getKelurahanByTahunAndKecamatan($year,$kecamatan);
|
||||
foreach($listkel as $kel){
|
||||
$listlapkel = $this->LaporanModel->getLaporanByTahunAndKelurahan($year,$kel->kelurahan);
|
||||
$lap[$kel->kelurahan]['kelurahan']='';
|
||||
$lap[$kel->kelurahan]['aset']=0;
|
||||
$lap[$kel->kelurahan]['omset']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jenis1']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jenis2']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jenis3']=0;
|
||||
$lap[$kel->kelurahan]['omset_jenis1']=0;
|
||||
$lap[$kel->kelurahan]['omset_jenis2']=0;
|
||||
$lap[$kel->kelurahan]['omset_jenis3']=0;
|
||||
$lap[$kel->kelurahan]['aset_jenis1']=0;
|
||||
$lap[$kel->kelurahan]['aset_jenis2']=0;
|
||||
$lap[$kel->kelurahan]['aset_jenis3']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jen1_l']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jen2_l']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jen3_l']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jen1_p']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jen2_p']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jen3_p']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen1_kat1']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen1_kat2']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen1_kat3']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen2_kat1']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen2_kat2']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen2_kat3']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen3_kat1']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen3_kat2']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen3_kat3']=0;
|
||||
foreach($listlapkel as $lapkel){
|
||||
$lap[$kel->kelurahan]['kelurahan']=$lapkel->kelurahan;
|
||||
$lap[$lapkel->kelurahan]['aset']=$lapkel->aset;
|
||||
$lap[$lapkel->kelurahan]['omset']=$lap[$lapkel->kelurahan]['omset']+$lapkel->omset;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jenis1']=$lapkel->karyawan_jenis1;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jenis2']=$lapkel->karyawan_jenis2;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jenis3']=$lapkel->karyawan_jenis3;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis1']=$lap[$lapkel->kelurahan]['omset_jenis1']+$lapkel->omset_jenis1;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis2']=$lap[$lapkel->kelurahan]['omset_jenis2']+$lapkel->omset_jenis2;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis3']=$lap[$lapkel->kelurahan]['omset_jenis3']+$lapkel->omset_jenis3;
|
||||
$lap[$lapkel->kelurahan]['aset_jenis1']=$lapkel->aset_jenis1;
|
||||
$lap[$lapkel->kelurahan]['aset_jenis2']=$lapkel->aset_jenis2;
|
||||
$lap[$lapkel->kelurahan]['aset_jenis3']=$lapkel->aset_jenis3;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen1_l']=$lapkel->karyawan_jen1_l;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen2_l']=$lapkel->karyawan_jen2_l;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen3_l']=$lapkel->karyawan_jen3_l;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen1_p']=$lapkel->karyawan_jen1_p;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen2_p']=$lapkel->karyawan_jen2_p;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen3_p']=$lapkel->karyawan_jen3_p;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen1_kat1']=$lapkel->umkm_jen1_kat1;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen1_kat2']=$lapkel->umkm_jen1_kat2;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen1_kat3']=$lapkel->umkm_jen1_kat3;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen2_kat1']=$lapkel->umkm_jen2_kat1;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen2_kat2']=$lapkel->umkm_jen2_kat2;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen2_kat3']=$lapkel->umkm_jen2_kat3;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen3_kat1']=$lapkel->umkm_jen3_kat1;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen3_kat2']=$lapkel->umkm_jen3_kat2;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen3_kat3']=$lapkel->umkm_jen3_kat3;
|
||||
if($lapkel->bulan==12){
|
||||
$lap[$lapkel->kelurahan]['omset'] = $lap[$lapkel->kelurahan]['omset']/12;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis1'] = $lap[$lapkel->kelurahan]['omset_jenis1']/12;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis2'] = $lap[$lapkel->kelurahan]['omset_jenis2']/12;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis3'] = $lap[$lapkel->kelurahan]['omset_jenis3']/12;
|
||||
$lap[$lapkel->kelurahan]['umkm_jenis1'] = $lap[$lapkel->kelurahan]['umkm_jen1_kat1']+$lap[$lapkel->kelurahan]['umkm_jen1_kat2']+$lap[$lapkel->kelurahan]['umkm_jen1_kat3'];
|
||||
$lap[$lapkel->kelurahan]['umkm_jenis2'] = $lap[$lapkel->kelurahan]['umkm_jen2_kat1']+$lap[$lapkel->kelurahan]['umkm_jen2_kat2']+$lap[$lapkel->kelurahan]['umkm_jen2_kat3'];
|
||||
$lap[$lapkel->kelurahan]['umkm_jenis3'] = $lap[$lapkel->kelurahan]['umkm_jen3_kat1']+$lap[$lapkel->kelurahan]['umkm_jen3_kat2']+$lap[$lapkel->kelurahan]['umkm_jen3_kat3'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$aset=0;
|
||||
$omset=0;
|
||||
$karyawan_jenis1=0;
|
||||
$karyawan_jenis2=0;
|
||||
$karyawan_jenis3=0;
|
||||
$omset_jenis1=0;
|
||||
$omset_jenis2=0;
|
||||
$omset_jenis3=0;
|
||||
$aset_jenis1=0;
|
||||
$aset_jenis2=0;
|
||||
$aset_jenis3=0;
|
||||
$karyawan_jen1_l=0;
|
||||
$karyawan_jen2_l=0;
|
||||
$karyawan_jen3_l=0;
|
||||
$karyawan_jen1_p=0;
|
||||
$karyawan_jen2_p=0;
|
||||
$karyawan_jen3_p=0;
|
||||
$umkm_jen1_kat1=0;
|
||||
$umkm_jen1_kat2=0;
|
||||
$umkm_jen1_kat3=0;
|
||||
$umkm_jen2_kat1=0;
|
||||
$umkm_jen2_kat2=0;
|
||||
$umkm_jen2_kat3=0;
|
||||
$umkm_jen3_kat1=0;
|
||||
$umkm_jen3_kat2=0;
|
||||
$umkm_jen3_kat3=0;
|
||||
$umkm_jenis1=0;
|
||||
$umkm_jenis2=0;
|
||||
$umkm_jenis3=0;
|
||||
|
||||
foreach($lap as $laporan){
|
||||
$aset=$aset+$laporan['aset'];
|
||||
$omset=$omset+$laporan['omset'];
|
||||
$karyawan_jenis1=$karyawan_jenis1+$laporan['karyawan_jenis1'];
|
||||
$karyawan_jenis2=$karyawan_jenis2+$laporan['karyawan_jenis2'];
|
||||
$karyawan_jenis3=$karyawan_jenis3+$laporan['karyawan_jenis3'];
|
||||
$omset_jenis1=$omset_jenis1+$laporan['omset_jenis1'];
|
||||
$omset_jenis2=$omset_jenis2+$laporan['omset_jenis2'];
|
||||
$omset_jenis3=$omset_jenis3+$laporan['omset_jenis3'];
|
||||
$aset_jenis1=$aset_jenis1+$laporan['aset_jenis1'];
|
||||
$aset_jenis2=$aset_jenis2+$laporan['aset_jenis2'];
|
||||
$aset_jenis3=$aset_jenis3+$laporan['aset_jenis3'];
|
||||
$karyawan_jen1_l=$karyawan_jen1_l+$laporan['karyawan_jen1_l'];
|
||||
$karyawan_jen2_l=$karyawan_jen2_l+$laporan['karyawan_jen2_l'];
|
||||
$karyawan_jen3_l=$karyawan_jen3_l+$laporan['karyawan_jen3_l'];
|
||||
$karyawan_jen1_p=$karyawan_jen1_p+$laporan['karyawan_jen1_p'];
|
||||
$karyawan_jen2_p=$karyawan_jen2_p+$laporan['karyawan_jen2_p'];
|
||||
$karyawan_jen3_p=$karyawan_jen3_p+$laporan['karyawan_jen3_p'];
|
||||
$umkm_jen1_kat1=$umkm_jen1_kat1+$laporan['umkm_jen1_kat1'];
|
||||
$umkm_jen1_kat2=$umkm_jen1_kat2+$laporan['umkm_jen1_kat2'];
|
||||
$umkm_jen1_kat3=$umkm_jen1_kat3+$laporan['umkm_jen1_kat3'];
|
||||
$umkm_jen2_kat1=$umkm_jen2_kat1+$laporan['umkm_jen2_kat1'];
|
||||
$umkm_jen2_kat2=$umkm_jen2_kat2+$laporan['umkm_jen2_kat2'];
|
||||
$umkm_jen2_kat3=$umkm_jen2_kat3+$laporan['umkm_jen2_kat3'];
|
||||
$umkm_jen3_kat1=$umkm_jen3_kat1+$laporan['umkm_jen3_kat1'];
|
||||
$umkm_jen3_kat2=$umkm_jen3_kat2+$laporan['umkm_jen3_kat2'];
|
||||
$umkm_jen3_kat3=$umkm_jen3_kat3+$laporan['umkm_jen3_kat3'];
|
||||
$umkm_jenis1=$umkm_jenis1+$laporan['umkm_jenis1'];
|
||||
$umkm_jenis2=$umkm_jenis2+$laporan['umkm_jenis2'];
|
||||
$umkm_jenis3=$umkm_jenis3+$laporan['umkm_jenis3'];
|
||||
|
||||
$umkm = $umkm_jen1_kat1+$umkm_jen1_kat2+$umkm_jen1_kat3+$umkm_jen2_kat1+$umkm_jen2_kat2+$umkm_jen2_kat3+$umkm_jen3_kat1+$umkm_jen3_kat2+$umkm_jen3_kat3;
|
||||
$karyawan = $karyawan_jenis1+$karyawan_jenis2+$karyawan_jenis3;
|
||||
$umkm_kat1 = $umkm_jen1_kat1+$umkm_jen1_kat1+$umkm_jen1_kat1;
|
||||
$umkm_kat2 = $umkm_jen1_kat2+$umkm_jen1_kat2+$umkm_jen1_kat2;
|
||||
$umkm_kat3 = $umkm_jen1_kat3+$umkm_jen1_kat3+$umkm_jen1_kat3;
|
||||
}
|
||||
|
||||
$data['listlaporan']=$lap;
|
||||
$data['aset']=$aset;
|
||||
$data['omset']=$omset;
|
||||
$data['karyawan_jenis1']=$karyawan_jenis1;
|
||||
$data['karyawan_jenis2']=$karyawan_jenis2;
|
||||
$data['karyawan_jenis3']=$karyawan_jenis3;
|
||||
$data['omset_jenis1']=$omset_jenis1;
|
||||
$data['omset_jenis2']=$omset_jenis2;
|
||||
$data['omset_jenis3']=$omset_jenis3;
|
||||
$data['aset_jenis1']=$aset_jenis1;
|
||||
$data['aset_jenis2']=$aset_jenis2;
|
||||
$data['aset_jenis3']=$aset_jenis3;
|
||||
$data['karyawan_jen1_l']=$karyawan_jen1_l;
|
||||
$data['karyawan_jen2_l']=$karyawan_jen2_l;
|
||||
$data['karyawan_jen3_l']=$karyawan_jen3_l;
|
||||
$data['karyawan_jen1_p']=$karyawan_jen1_p;
|
||||
$data['karyawan_jen2_p']=$karyawan_jen2_p;
|
||||
$data['karyawan_jen3_p']=$karyawan_jen3_p;
|
||||
$data['umkm_jen1_kat1']=$umkm_jen1_kat1;
|
||||
$data['umkm_jen1_kat2']=$umkm_jen1_kat2;
|
||||
$data['umkm_jen1_kat3']=$umkm_jen1_kat3;
|
||||
$data['umkm_jen2_kat1']=$umkm_jen2_kat1;
|
||||
$data['umkm_jen2_kat2']=$umkm_jen2_kat2;
|
||||
$data['umkm_jen2_kat3']=$umkm_jen2_kat3;
|
||||
$data['umkm_jen3_kat1']=$umkm_jen3_kat1;
|
||||
$data['umkm_jen3_kat2']=$umkm_jen3_kat2;
|
||||
$data['umkm_jen3_kat3']=$umkm_jen3_kat3;
|
||||
$data['umkm_jenis1']=$umkm_jenis1;
|
||||
$data['umkm_jenis2']=$umkm_jenis2;
|
||||
$data['umkm_jenis3']=$umkm_jenis3;
|
||||
|
||||
$data['umkm']= $umkm;
|
||||
$data['karyawan']= $karyawan;
|
||||
$data['umkm_kat1']= $umkm_kat1;
|
||||
$data['umkm_kat2']= $umkm_kat2;
|
||||
$data['umkm_kat3']= $umkm_kat3;
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
$data['msg'] = 'empty';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$data['user_logged'] = $this->session->userdata('user_logged');
|
||||
|
||||
$data['kecamatan'] = $kecamatan;
|
||||
$data['tahun'] = $year;
|
||||
|
||||
$this->load->view('admin/lapkecpdf',$data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,239 @@
|
|||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class LapkecXls extends CI_Controller {
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
parent::__construct();
|
||||
$this->load->model("UserModel");
|
||||
$this->load->model("LaporanModel");
|
||||
$this->load->model("KategoriModel");
|
||||
$this->load->model("JenisModel");
|
||||
|
||||
if($this->UserModel->isNotLogin()) {
|
||||
redirect(site_url('login'));
|
||||
} elseif(!($this->UserModel->isAdmin())) {
|
||||
redirect(site_url('dashboard'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
if($this->input->get()){
|
||||
$get = $this->input->get();
|
||||
$kecamatan = $get['kecamatan'];
|
||||
} else {
|
||||
$kecamatan = 'Magelang Selatan';
|
||||
}
|
||||
|
||||
//cek ada laporan atau tidak
|
||||
$countlaporan = $this->LaporanModel->getLaporanCount();
|
||||
if($countlaporan>0){
|
||||
$year = $this->LaporanModel->getLastYearLaporan()->tahun;
|
||||
} else {
|
||||
redirect(site_url('admin/laporan'));die();
|
||||
}
|
||||
|
||||
//cek ada laporan kecamatan atau tidak
|
||||
$countlaporankec = $this->LaporanModel->getCountByTahunByKecamatan($year,$kecamatan);
|
||||
if($countlaporankec>0){
|
||||
$data['msg'] = 'found';
|
||||
$listkel = $this->LaporanModel->getKelurahanByTahunAndKecamatan($year,$kecamatan);
|
||||
foreach($listkel as $kel){
|
||||
$listlapkel = $this->LaporanModel->getLaporanByTahunAndKelurahan($year,$kel->kelurahan);
|
||||
$lap[$kel->kelurahan]['kelurahan']='';
|
||||
$lap[$kel->kelurahan]['aset']=0;
|
||||
$lap[$kel->kelurahan]['omset']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jenis1']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jenis2']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jenis3']=0;
|
||||
$lap[$kel->kelurahan]['omset_jenis1']=0;
|
||||
$lap[$kel->kelurahan]['omset_jenis2']=0;
|
||||
$lap[$kel->kelurahan]['omset_jenis3']=0;
|
||||
$lap[$kel->kelurahan]['aset_jenis1']=0;
|
||||
$lap[$kel->kelurahan]['aset_jenis2']=0;
|
||||
$lap[$kel->kelurahan]['aset_jenis3']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jen1_l']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jen2_l']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jen3_l']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jen1_p']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jen2_p']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jen3_p']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen1_kat1']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen1_kat2']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen1_kat3']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen2_kat1']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen2_kat2']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen2_kat3']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen3_kat1']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen3_kat2']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen3_kat3']=0;
|
||||
foreach($listlapkel as $lapkel){
|
||||
$lap[$kel->kelurahan]['kelurahan']=$lapkel->kelurahan;
|
||||
$lap[$lapkel->kelurahan]['aset']=$lapkel->aset;
|
||||
$lap[$lapkel->kelurahan]['omset']=$lap[$lapkel->kelurahan]['omset']+$lapkel->omset;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jenis1']=$lapkel->karyawan_jenis1;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jenis2']=$lapkel->karyawan_jenis2;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jenis3']=$lapkel->karyawan_jenis3;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis1']=$lap[$lapkel->kelurahan]['omset_jenis1']+$lapkel->omset_jenis1;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis2']=$lap[$lapkel->kelurahan]['omset_jenis2']+$lapkel->omset_jenis2;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis3']=$lap[$lapkel->kelurahan]['omset_jenis3']+$lapkel->omset_jenis3;
|
||||
$lap[$lapkel->kelurahan]['aset_jenis1']=$lapkel->aset_jenis1;
|
||||
$lap[$lapkel->kelurahan]['aset_jenis2']=$lapkel->aset_jenis2;
|
||||
$lap[$lapkel->kelurahan]['aset_jenis3']=$lapkel->aset_jenis3;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen1_l']=$lapkel->karyawan_jen1_l;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen2_l']=$lapkel->karyawan_jen2_l;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen3_l']=$lapkel->karyawan_jen3_l;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen1_p']=$lapkel->karyawan_jen1_p;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen2_p']=$lapkel->karyawan_jen2_p;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen3_p']=$lapkel->karyawan_jen3_p;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen1_kat1']=$lapkel->umkm_jen1_kat1;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen1_kat2']=$lapkel->umkm_jen1_kat2;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen1_kat3']=$lapkel->umkm_jen1_kat3;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen2_kat1']=$lapkel->umkm_jen2_kat1;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen2_kat2']=$lapkel->umkm_jen2_kat2;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen2_kat3']=$lapkel->umkm_jen2_kat3;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen3_kat1']=$lapkel->umkm_jen3_kat1;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen3_kat2']=$lapkel->umkm_jen3_kat2;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen3_kat3']=$lapkel->umkm_jen3_kat3;
|
||||
if($lapkel->bulan==12){
|
||||
$lap[$lapkel->kelurahan]['omset'] = $lap[$lapkel->kelurahan]['omset']/12;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis1'] = $lap[$lapkel->kelurahan]['omset_jenis1']/12;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis2'] = $lap[$lapkel->kelurahan]['omset_jenis2']/12;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis3'] = $lap[$lapkel->kelurahan]['omset_jenis3']/12;
|
||||
$lap[$lapkel->kelurahan]['umkm_jenis1'] = $lap[$lapkel->kelurahan]['umkm_jen1_kat1']+$lap[$lapkel->kelurahan]['umkm_jen1_kat2']+$lap[$lapkel->kelurahan]['umkm_jen1_kat3'];
|
||||
$lap[$lapkel->kelurahan]['umkm_jenis2'] = $lap[$lapkel->kelurahan]['umkm_jen2_kat1']+$lap[$lapkel->kelurahan]['umkm_jen2_kat2']+$lap[$lapkel->kelurahan]['umkm_jen2_kat3'];
|
||||
$lap[$lapkel->kelurahan]['umkm_jenis3'] = $lap[$lapkel->kelurahan]['umkm_jen3_kat1']+$lap[$lapkel->kelurahan]['umkm_jen3_kat2']+$lap[$lapkel->kelurahan]['umkm_jen3_kat3'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$aset=0;
|
||||
$omset=0;
|
||||
$karyawan_jenis1=0;
|
||||
$karyawan_jenis2=0;
|
||||
$karyawan_jenis3=0;
|
||||
$omset_jenis1=0;
|
||||
$omset_jenis2=0;
|
||||
$omset_jenis3=0;
|
||||
$aset_jenis1=0;
|
||||
$aset_jenis2=0;
|
||||
$aset_jenis3=0;
|
||||
$karyawan_jen1_l=0;
|
||||
$karyawan_jen2_l=0;
|
||||
$karyawan_jen3_l=0;
|
||||
$karyawan_jen1_p=0;
|
||||
$karyawan_jen2_p=0;
|
||||
$karyawan_jen3_p=0;
|
||||
$umkm_jen1_kat1=0;
|
||||
$umkm_jen1_kat2=0;
|
||||
$umkm_jen1_kat3=0;
|
||||
$umkm_jen2_kat1=0;
|
||||
$umkm_jen2_kat2=0;
|
||||
$umkm_jen2_kat3=0;
|
||||
$umkm_jen3_kat1=0;
|
||||
$umkm_jen3_kat2=0;
|
||||
$umkm_jen3_kat3=0;
|
||||
$umkm_jenis1=0;
|
||||
$umkm_jenis2=0;
|
||||
$umkm_jenis3=0;
|
||||
|
||||
foreach($lap as $laporan){
|
||||
$aset=$aset+$laporan['aset'];
|
||||
$omset=$omset+$laporan['omset'];
|
||||
$karyawan_jenis1=$karyawan_jenis1+$laporan['karyawan_jenis1'];
|
||||
$karyawan_jenis2=$karyawan_jenis2+$laporan['karyawan_jenis2'];
|
||||
$karyawan_jenis3=$karyawan_jenis3+$laporan['karyawan_jenis3'];
|
||||
$omset_jenis1=$omset_jenis1+$laporan['omset_jenis1'];
|
||||
$omset_jenis2=$omset_jenis2+$laporan['omset_jenis2'];
|
||||
$omset_jenis3=$omset_jenis3+$laporan['omset_jenis3'];
|
||||
$aset_jenis1=$aset_jenis1+$laporan['aset_jenis1'];
|
||||
$aset_jenis2=$aset_jenis2+$laporan['aset_jenis2'];
|
||||
$aset_jenis3=$aset_jenis3+$laporan['aset_jenis3'];
|
||||
$karyawan_jen1_l=$karyawan_jen1_l+$laporan['karyawan_jen1_l'];
|
||||
$karyawan_jen2_l=$karyawan_jen2_l+$laporan['karyawan_jen2_l'];
|
||||
$karyawan_jen3_l=$karyawan_jen3_l+$laporan['karyawan_jen3_l'];
|
||||
$karyawan_jen1_p=$karyawan_jen1_p+$laporan['karyawan_jen1_p'];
|
||||
$karyawan_jen2_p=$karyawan_jen2_p+$laporan['karyawan_jen2_p'];
|
||||
$karyawan_jen3_p=$karyawan_jen3_p+$laporan['karyawan_jen3_p'];
|
||||
$umkm_jen1_kat1=$umkm_jen1_kat1+$laporan['umkm_jen1_kat1'];
|
||||
$umkm_jen1_kat2=$umkm_jen1_kat2+$laporan['umkm_jen1_kat2'];
|
||||
$umkm_jen1_kat3=$umkm_jen1_kat3+$laporan['umkm_jen1_kat3'];
|
||||
$umkm_jen2_kat1=$umkm_jen2_kat1+$laporan['umkm_jen2_kat1'];
|
||||
$umkm_jen2_kat2=$umkm_jen2_kat2+$laporan['umkm_jen2_kat2'];
|
||||
$umkm_jen2_kat3=$umkm_jen2_kat3+$laporan['umkm_jen2_kat3'];
|
||||
$umkm_jen3_kat1=$umkm_jen3_kat1+$laporan['umkm_jen3_kat1'];
|
||||
$umkm_jen3_kat2=$umkm_jen3_kat2+$laporan['umkm_jen3_kat2'];
|
||||
$umkm_jen3_kat3=$umkm_jen3_kat3+$laporan['umkm_jen3_kat3'];
|
||||
$umkm_jenis1=$umkm_jenis1+$laporan['umkm_jenis1'];
|
||||
$umkm_jenis2=$umkm_jenis2+$laporan['umkm_jenis2'];
|
||||
$umkm_jenis3=$umkm_jenis3+$laporan['umkm_jenis3'];
|
||||
|
||||
$umkm = $umkm_jen1_kat1+$umkm_jen1_kat2+$umkm_jen1_kat3+$umkm_jen2_kat1+$umkm_jen2_kat2+$umkm_jen2_kat3+$umkm_jen3_kat1+$umkm_jen3_kat2+$umkm_jen3_kat3;
|
||||
$karyawan = $karyawan_jenis1+$karyawan_jenis2+$karyawan_jenis3;
|
||||
$umkm_kat1 = $umkm_jen1_kat1+$umkm_jen1_kat1+$umkm_jen1_kat1;
|
||||
$umkm_kat2 = $umkm_jen1_kat2+$umkm_jen1_kat2+$umkm_jen1_kat2;
|
||||
$umkm_kat3 = $umkm_jen1_kat3+$umkm_jen1_kat3+$umkm_jen1_kat3;
|
||||
}
|
||||
|
||||
$data['listlaporan']=$lap;
|
||||
$data['aset']=$aset;
|
||||
$data['omset']=$omset;
|
||||
$data['karyawan_jenis1']=$karyawan_jenis1;
|
||||
$data['karyawan_jenis2']=$karyawan_jenis2;
|
||||
$data['karyawan_jenis3']=$karyawan_jenis3;
|
||||
$data['omset_jenis1']=$omset_jenis1;
|
||||
$data['omset_jenis2']=$omset_jenis2;
|
||||
$data['omset_jenis3']=$omset_jenis3;
|
||||
$data['aset_jenis1']=$aset_jenis1;
|
||||
$data['aset_jenis2']=$aset_jenis2;
|
||||
$data['aset_jenis3']=$aset_jenis3;
|
||||
$data['karyawan_jen1_l']=$karyawan_jen1_l;
|
||||
$data['karyawan_jen2_l']=$karyawan_jen2_l;
|
||||
$data['karyawan_jen3_l']=$karyawan_jen3_l;
|
||||
$data['karyawan_jen1_p']=$karyawan_jen1_p;
|
||||
$data['karyawan_jen2_p']=$karyawan_jen2_p;
|
||||
$data['karyawan_jen3_p']=$karyawan_jen3_p;
|
||||
$data['umkm_jen1_kat1']=$umkm_jen1_kat1;
|
||||
$data['umkm_jen1_kat2']=$umkm_jen1_kat2;
|
||||
$data['umkm_jen1_kat3']=$umkm_jen1_kat3;
|
||||
$data['umkm_jen2_kat1']=$umkm_jen2_kat1;
|
||||
$data['umkm_jen2_kat2']=$umkm_jen2_kat2;
|
||||
$data['umkm_jen2_kat3']=$umkm_jen2_kat3;
|
||||
$data['umkm_jen3_kat1']=$umkm_jen3_kat1;
|
||||
$data['umkm_jen3_kat2']=$umkm_jen3_kat2;
|
||||
$data['umkm_jen3_kat3']=$umkm_jen3_kat3;
|
||||
$data['umkm_jenis1']=$umkm_jenis1;
|
||||
$data['umkm_jenis2']=$umkm_jenis2;
|
||||
$data['umkm_jenis3']=$umkm_jenis3;
|
||||
|
||||
$data['umkm']= $umkm;
|
||||
$data['karyawan']= $karyawan;
|
||||
$data['umkm_kat1']= $umkm_kat1;
|
||||
$data['umkm_kat2']= $umkm_kat2;
|
||||
$data['umkm_kat3']= $umkm_kat3;
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
$data['msg'] = 'empty';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$data['user_logged'] = $this->session->userdata('user_logged');
|
||||
|
||||
$data['kecamatan'] = $kecamatan;
|
||||
$data['tahun'] = $year;
|
||||
|
||||
$this->load->view('admin/lapkecxls',$data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,245 @@
|
|||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class LapkelPdf extends CI_Controller {
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
parent::__construct();
|
||||
$this->load->model("UserModel");
|
||||
$this->load->model("LaporanModel");
|
||||
$this->load->model("KategoriModel");
|
||||
$this->load->model("JenisModel");
|
||||
$this->load->model("KelurahanModel");
|
||||
$this->load->model("AbsensiModel");
|
||||
$this->load->model("UmkmModel");
|
||||
|
||||
if($this->UserModel->isNotLogin()) {
|
||||
redirect(site_url('login'));
|
||||
} elseif(!($this->UserModel->isAdmin())) {
|
||||
redirect(site_url('dashboard'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
if($this->input->get()){
|
||||
$get = $this->input->get();
|
||||
$kelurahan = $get['kelurahan'];
|
||||
} else {
|
||||
$kelurahan = 'Rejowinangun Selatan';
|
||||
}
|
||||
|
||||
//cek ada laporan atau tidak
|
||||
$countlaporan = $this->LaporanModel->getLaporanCount();
|
||||
if($countlaporan>0){
|
||||
$year = $this->LaporanModel->getLastYearLaporan()->tahun;
|
||||
} else {
|
||||
redirect(site_url('admin/laporan'));die();
|
||||
}
|
||||
|
||||
//cek ada laporan kelurahan atau tidak
|
||||
$countlaporankel = $this->LaporanModel->getCountByTahunByKelurahan($year,$kelurahan);
|
||||
if($countlaporankel>0){
|
||||
$data['msg'] = 'found';
|
||||
$listlapkel = $this->LaporanModel->getLaporanByTahunAndKelurahan($year,$kelurahan);
|
||||
$lap[$kelurahan]['kelurahan']='';
|
||||
$lap[$kelurahan]['aset']=0;
|
||||
$lap[$kelurahan]['omset']=0;
|
||||
$lap[$kelurahan]['karyawan_jenis1']=0;
|
||||
$lap[$kelurahan]['karyawan_jenis2']=0;
|
||||
$lap[$kelurahan]['karyawan_jenis3']=0;
|
||||
$lap[$kelurahan]['omset_jenis1']=0;
|
||||
$lap[$kelurahan]['omset_jenis2']=0;
|
||||
$lap[$kelurahan]['omset_jenis3']=0;
|
||||
$lap[$kelurahan]['aset_jenis1']=0;
|
||||
$lap[$kelurahan]['aset_jenis2']=0;
|
||||
$lap[$kelurahan]['aset_jenis3']=0;
|
||||
$lap[$kelurahan]['karyawan_jen1_l']=0;
|
||||
$lap[$kelurahan]['karyawan_jen2_l']=0;
|
||||
$lap[$kelurahan]['karyawan_jen3_l']=0;
|
||||
$lap[$kelurahan]['karyawan_jen1_p']=0;
|
||||
$lap[$kelurahan]['karyawan_jen2_p']=0;
|
||||
$lap[$kelurahan]['karyawan_jen3_p']=0;
|
||||
$lap[$kelurahan]['umkm_jen1_kat1']=0;
|
||||
$lap[$kelurahan]['umkm_jen1_kat2']=0;
|
||||
$lap[$kelurahan]['umkm_jen1_kat3']=0;
|
||||
$lap[$kelurahan]['umkm_jen2_kat1']=0;
|
||||
$lap[$kelurahan]['umkm_jen2_kat2']=0;
|
||||
$lap[$kelurahan]['umkm_jen2_kat3']=0;
|
||||
$lap[$kelurahan]['umkm_jen3_kat1']=0;
|
||||
$lap[$kelurahan]['umkm_jen3_kat2']=0;
|
||||
$lap[$kelurahan]['umkm_jen3_kat3']=0;
|
||||
foreach($listlapkel as $lapkel){
|
||||
$lap[$kelurahan]['kelurahan']=$lapkel->kelurahan;
|
||||
$lap[$lapkel->kelurahan]['aset']=$lapkel->aset;
|
||||
$lap[$lapkel->kelurahan]['omset']=$lap[$lapkel->kelurahan]['omset']+$lapkel->omset;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jenis1']=$lapkel->karyawan_jenis1;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jenis2']=$lapkel->karyawan_jenis2;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jenis3']=$lapkel->karyawan_jenis3;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis1']=$lap[$lapkel->kelurahan]['omset_jenis1']+$lapkel->omset_jenis1;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis2']=$lap[$lapkel->kelurahan]['omset_jenis2']+$lapkel->omset_jenis2;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis3']=$lap[$lapkel->kelurahan]['omset_jenis3']+$lapkel->omset_jenis3;
|
||||
$lap[$lapkel->kelurahan]['aset_jenis1']=$lapkel->aset_jenis1;
|
||||
$lap[$lapkel->kelurahan]['aset_jenis2']=$lapkel->aset_jenis2;
|
||||
$lap[$lapkel->kelurahan]['aset_jenis3']=$lapkel->aset_jenis3;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen1_l']=$lapkel->karyawan_jen1_l;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen2_l']=$lapkel->karyawan_jen2_l;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen3_l']=$lapkel->karyawan_jen3_l;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen1_p']=$lapkel->karyawan_jen1_p;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen2_p']=$lapkel->karyawan_jen2_p;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen3_p']=$lapkel->karyawan_jen3_p;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen1_kat1']=$lapkel->umkm_jen1_kat1;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen1_kat2']=$lapkel->umkm_jen1_kat2;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen1_kat3']=$lapkel->umkm_jen1_kat3;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen2_kat1']=$lapkel->umkm_jen2_kat1;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen2_kat2']=$lapkel->umkm_jen2_kat2;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen2_kat3']=$lapkel->umkm_jen2_kat3;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen3_kat1']=$lapkel->umkm_jen3_kat1;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen3_kat2']=$lapkel->umkm_jen3_kat2;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen3_kat3']=$lapkel->umkm_jen3_kat3;
|
||||
if($lapkel->bulan==12){
|
||||
$lap[$lapkel->kelurahan]['omset'] = $lap[$lapkel->kelurahan]['omset']/12;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis1'] = $lap[$lapkel->kelurahan]['omset_jenis1']/12;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis2'] = $lap[$lapkel->kelurahan]['omset_jenis2']/12;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis3'] = $lap[$lapkel->kelurahan]['omset_jenis3']/12;
|
||||
$lap[$lapkel->kelurahan]['umkm_jenis1'] = $lap[$lapkel->kelurahan]['umkm_jen1_kat1']+$lap[$lapkel->kelurahan]['umkm_jen1_kat2']+$lap[$lapkel->kelurahan]['umkm_jen1_kat3'];
|
||||
$lap[$lapkel->kelurahan]['umkm_jenis2'] = $lap[$lapkel->kelurahan]['umkm_jen2_kat1']+$lap[$lapkel->kelurahan]['umkm_jen2_kat2']+$lap[$lapkel->kelurahan]['umkm_jen2_kat3'];
|
||||
$lap[$lapkel->kelurahan]['umkm_jenis3'] = $lap[$lapkel->kelurahan]['umkm_jen3_kat1']+$lap[$lapkel->kelurahan]['umkm_jen3_kat2']+$lap[$lapkel->kelurahan]['umkm_jen3_kat3'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$aset=0;
|
||||
$omset=0;
|
||||
$karyawan_jenis1=0;
|
||||
$karyawan_jenis2=0;
|
||||
$karyawan_jenis3=0;
|
||||
$omset_jenis1=0;
|
||||
$omset_jenis2=0;
|
||||
$omset_jenis3=0;
|
||||
$aset_jenis1=0;
|
||||
$aset_jenis2=0;
|
||||
$aset_jenis3=0;
|
||||
$karyawan_jen1_l=0;
|
||||
$karyawan_jen2_l=0;
|
||||
$karyawan_jen3_l=0;
|
||||
$karyawan_jen1_p=0;
|
||||
$karyawan_jen2_p=0;
|
||||
$karyawan_jen3_p=0;
|
||||
$umkm_jen1_kat1=0;
|
||||
$umkm_jen1_kat2=0;
|
||||
$umkm_jen1_kat3=0;
|
||||
$umkm_jen2_kat1=0;
|
||||
$umkm_jen2_kat2=0;
|
||||
$umkm_jen2_kat3=0;
|
||||
$umkm_jen3_kat1=0;
|
||||
$umkm_jen3_kat2=0;
|
||||
$umkm_jen3_kat3=0;
|
||||
$umkm_jenis1=0;
|
||||
$umkm_jenis2=0;
|
||||
$umkm_jenis3=0;
|
||||
|
||||
foreach($lap as $laporan){
|
||||
$aset=$aset+$laporan['aset'];
|
||||
$omset=$omset+$laporan['omset'];
|
||||
$karyawan_jenis1=$karyawan_jenis1+$laporan['karyawan_jenis1'];
|
||||
$karyawan_jenis2=$karyawan_jenis2+$laporan['karyawan_jenis2'];
|
||||
$karyawan_jenis3=$karyawan_jenis3+$laporan['karyawan_jenis3'];
|
||||
$omset_jenis1=$omset_jenis1+$laporan['omset_jenis1'];
|
||||
$omset_jenis2=$omset_jenis2+$laporan['omset_jenis2'];
|
||||
$omset_jenis3=$omset_jenis3+$laporan['omset_jenis3'];
|
||||
$aset_jenis1=$aset_jenis1+$laporan['aset_jenis1'];
|
||||
$aset_jenis2=$aset_jenis2+$laporan['aset_jenis2'];
|
||||
$aset_jenis3=$aset_jenis3+$laporan['aset_jenis3'];
|
||||
$karyawan_jen1_l=$karyawan_jen1_l+$laporan['karyawan_jen1_l'];
|
||||
$karyawan_jen2_l=$karyawan_jen2_l+$laporan['karyawan_jen2_l'];
|
||||
$karyawan_jen3_l=$karyawan_jen3_l+$laporan['karyawan_jen3_l'];
|
||||
$karyawan_jen1_p=$karyawan_jen1_p+$laporan['karyawan_jen1_p'];
|
||||
$karyawan_jen2_p=$karyawan_jen2_p+$laporan['karyawan_jen2_p'];
|
||||
$karyawan_jen3_p=$karyawan_jen3_p+$laporan['karyawan_jen3_p'];
|
||||
$umkm_jen1_kat1=$umkm_jen1_kat1+$laporan['umkm_jen1_kat1'];
|
||||
$umkm_jen1_kat2=$umkm_jen1_kat2+$laporan['umkm_jen1_kat2'];
|
||||
$umkm_jen1_kat3=$umkm_jen1_kat3+$laporan['umkm_jen1_kat3'];
|
||||
$umkm_jen2_kat1=$umkm_jen2_kat1+$laporan['umkm_jen2_kat1'];
|
||||
$umkm_jen2_kat2=$umkm_jen2_kat2+$laporan['umkm_jen2_kat2'];
|
||||
$umkm_jen2_kat3=$umkm_jen2_kat3+$laporan['umkm_jen2_kat3'];
|
||||
$umkm_jen3_kat1=$umkm_jen3_kat1+$laporan['umkm_jen3_kat1'];
|
||||
$umkm_jen3_kat2=$umkm_jen3_kat2+$laporan['umkm_jen3_kat2'];
|
||||
$umkm_jen3_kat3=$umkm_jen3_kat3+$laporan['umkm_jen3_kat3'];
|
||||
$umkm_jenis1=$umkm_jenis1+$laporan['umkm_jenis1'];
|
||||
$umkm_jenis2=$umkm_jenis2+$laporan['umkm_jenis2'];
|
||||
$umkm_jenis3=$umkm_jenis3+$laporan['umkm_jenis3'];
|
||||
|
||||
$umkm = $umkm_jen1_kat1+$umkm_jen1_kat2+$umkm_jen1_kat3+$umkm_jen2_kat1+$umkm_jen2_kat2+$umkm_jen2_kat3+$umkm_jen3_kat1+$umkm_jen3_kat2+$umkm_jen3_kat3;
|
||||
$karyawan = $karyawan_jenis1+$karyawan_jenis2+$karyawan_jenis3;
|
||||
$umkm_kat1 = $umkm_jen1_kat1+$umkm_jen1_kat1+$umkm_jen1_kat1;
|
||||
$umkm_kat2 = $umkm_jen1_kat2+$umkm_jen1_kat2+$umkm_jen1_kat2;
|
||||
$umkm_kat3 = $umkm_jen1_kat3+$umkm_jen1_kat3+$umkm_jen1_kat3;
|
||||
}
|
||||
|
||||
$data['listlaporan']=$lap;
|
||||
$data['aset']=$aset;
|
||||
$data['omset']=$omset;
|
||||
$data['karyawan_jenis1']=$karyawan_jenis1;
|
||||
$data['karyawan_jenis2']=$karyawan_jenis2;
|
||||
$data['karyawan_jenis3']=$karyawan_jenis3;
|
||||
$data['omset_jenis1']=$omset_jenis1;
|
||||
$data['omset_jenis2']=$omset_jenis2;
|
||||
$data['omset_jenis3']=$omset_jenis3;
|
||||
$data['aset_jenis1']=$aset_jenis1;
|
||||
$data['aset_jenis2']=$aset_jenis2;
|
||||
$data['aset_jenis3']=$aset_jenis3;
|
||||
$data['karyawan_jen1_l']=$karyawan_jen1_l;
|
||||
$data['karyawan_jen2_l']=$karyawan_jen2_l;
|
||||
$data['karyawan_jen3_l']=$karyawan_jen3_l;
|
||||
$data['karyawan_jen1_p']=$karyawan_jen1_p;
|
||||
$data['karyawan_jen2_p']=$karyawan_jen2_p;
|
||||
$data['karyawan_jen3_p']=$karyawan_jen3_p;
|
||||
$data['umkm_jen1_kat1']=$umkm_jen1_kat1;
|
||||
$data['umkm_jen1_kat2']=$umkm_jen1_kat2;
|
||||
$data['umkm_jen1_kat3']=$umkm_jen1_kat3;
|
||||
$data['umkm_jen2_kat1']=$umkm_jen2_kat1;
|
||||
$data['umkm_jen2_kat2']=$umkm_jen2_kat2;
|
||||
$data['umkm_jen2_kat3']=$umkm_jen2_kat3;
|
||||
$data['umkm_jen3_kat1']=$umkm_jen3_kat1;
|
||||
$data['umkm_jen3_kat2']=$umkm_jen3_kat2;
|
||||
$data['umkm_jen3_kat3']=$umkm_jen3_kat3;
|
||||
$data['umkm_jenis1']=$umkm_jenis1;
|
||||
$data['umkm_jenis2']=$umkm_jenis2;
|
||||
$data['umkm_jenis3']=$umkm_jenis3;
|
||||
|
||||
$data['umkm']= $umkm;
|
||||
$data['karyawan']= $karyawan;
|
||||
$data['umkm_kat1']= $umkm_kat1;
|
||||
$data['umkm_kat2']= $umkm_kat2;
|
||||
$data['umkm_kat3']= $umkm_kat3;
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
$data['msg'] = 'empty';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$data['user_logged'] = $this->session->userdata('user_logged');
|
||||
|
||||
|
||||
$umkmlist = $this->AbsensiModel->getDesemberAbsensiByYearAndByKelurahan($year,$kelurahan);
|
||||
//var_dump($umkmlist);die();
|
||||
$data['umkmlist'] = $umkmlist;
|
||||
|
||||
$data['kelurahan'] = $kelurahan;
|
||||
$data['tahun'] = $year;
|
||||
|
||||
$this->load->view('admin/lapkelpdf',$data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,245 @@
|
|||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class LapkelXls extends CI_Controller {
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
parent::__construct();
|
||||
$this->load->model("UserModel");
|
||||
$this->load->model("LaporanModel");
|
||||
$this->load->model("KategoriModel");
|
||||
$this->load->model("JenisModel");
|
||||
$this->load->model("KelurahanModel");
|
||||
$this->load->model("AbsensiModel");
|
||||
$this->load->model("UmkmModel");
|
||||
|
||||
if($this->UserModel->isNotLogin()) {
|
||||
redirect(site_url('login'));
|
||||
} elseif(!($this->UserModel->isAdmin())) {
|
||||
redirect(site_url('dashboard'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
if($this->input->get()){
|
||||
$get = $this->input->get();
|
||||
$kelurahan = $get['kelurahan'];
|
||||
} else {
|
||||
$kelurahan = 'Rejowinangun Selatan';
|
||||
}
|
||||
|
||||
//cek ada laporan atau tidak
|
||||
$countlaporan = $this->LaporanModel->getLaporanCount();
|
||||
if($countlaporan>0){
|
||||
$year = $this->LaporanModel->getLastYearLaporan()->tahun;
|
||||
} else {
|
||||
redirect(site_url('admin/laporan'));die();
|
||||
}
|
||||
|
||||
//cek ada laporan kelurahan atau tidak
|
||||
$countlaporankel = $this->LaporanModel->getCountByTahunByKelurahan($year,$kelurahan);
|
||||
if($countlaporankel>0){
|
||||
$data['msg'] = 'found';
|
||||
$listlapkel = $this->LaporanModel->getLaporanByTahunAndKelurahan($year,$kelurahan);
|
||||
$lap[$kelurahan]['kelurahan']='';
|
||||
$lap[$kelurahan]['aset']=0;
|
||||
$lap[$kelurahan]['omset']=0;
|
||||
$lap[$kelurahan]['karyawan_jenis1']=0;
|
||||
$lap[$kelurahan]['karyawan_jenis2']=0;
|
||||
$lap[$kelurahan]['karyawan_jenis3']=0;
|
||||
$lap[$kelurahan]['omset_jenis1']=0;
|
||||
$lap[$kelurahan]['omset_jenis2']=0;
|
||||
$lap[$kelurahan]['omset_jenis3']=0;
|
||||
$lap[$kelurahan]['aset_jenis1']=0;
|
||||
$lap[$kelurahan]['aset_jenis2']=0;
|
||||
$lap[$kelurahan]['aset_jenis3']=0;
|
||||
$lap[$kelurahan]['karyawan_jen1_l']=0;
|
||||
$lap[$kelurahan]['karyawan_jen2_l']=0;
|
||||
$lap[$kelurahan]['karyawan_jen3_l']=0;
|
||||
$lap[$kelurahan]['karyawan_jen1_p']=0;
|
||||
$lap[$kelurahan]['karyawan_jen2_p']=0;
|
||||
$lap[$kelurahan]['karyawan_jen3_p']=0;
|
||||
$lap[$kelurahan]['umkm_jen1_kat1']=0;
|
||||
$lap[$kelurahan]['umkm_jen1_kat2']=0;
|
||||
$lap[$kelurahan]['umkm_jen1_kat3']=0;
|
||||
$lap[$kelurahan]['umkm_jen2_kat1']=0;
|
||||
$lap[$kelurahan]['umkm_jen2_kat2']=0;
|
||||
$lap[$kelurahan]['umkm_jen2_kat3']=0;
|
||||
$lap[$kelurahan]['umkm_jen3_kat1']=0;
|
||||
$lap[$kelurahan]['umkm_jen3_kat2']=0;
|
||||
$lap[$kelurahan]['umkm_jen3_kat3']=0;
|
||||
foreach($listlapkel as $lapkel){
|
||||
$lap[$kelurahan]['kelurahan']=$lapkel->kelurahan;
|
||||
$lap[$lapkel->kelurahan]['aset']=$lapkel->aset;
|
||||
$lap[$lapkel->kelurahan]['omset']=$lap[$lapkel->kelurahan]['omset']+$lapkel->omset;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jenis1']=$lapkel->karyawan_jenis1;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jenis2']=$lapkel->karyawan_jenis2;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jenis3']=$lapkel->karyawan_jenis3;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis1']=$lap[$lapkel->kelurahan]['omset_jenis1']+$lapkel->omset_jenis1;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis2']=$lap[$lapkel->kelurahan]['omset_jenis2']+$lapkel->omset_jenis2;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis3']=$lap[$lapkel->kelurahan]['omset_jenis3']+$lapkel->omset_jenis3;
|
||||
$lap[$lapkel->kelurahan]['aset_jenis1']=$lapkel->aset_jenis1;
|
||||
$lap[$lapkel->kelurahan]['aset_jenis2']=$lapkel->aset_jenis2;
|
||||
$lap[$lapkel->kelurahan]['aset_jenis3']=$lapkel->aset_jenis3;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen1_l']=$lapkel->karyawan_jen1_l;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen2_l']=$lapkel->karyawan_jen2_l;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen3_l']=$lapkel->karyawan_jen3_l;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen1_p']=$lapkel->karyawan_jen1_p;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen2_p']=$lapkel->karyawan_jen2_p;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen3_p']=$lapkel->karyawan_jen3_p;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen1_kat1']=$lapkel->umkm_jen1_kat1;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen1_kat2']=$lapkel->umkm_jen1_kat2;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen1_kat3']=$lapkel->umkm_jen1_kat3;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen2_kat1']=$lapkel->umkm_jen2_kat1;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen2_kat2']=$lapkel->umkm_jen2_kat2;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen2_kat3']=$lapkel->umkm_jen2_kat3;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen3_kat1']=$lapkel->umkm_jen3_kat1;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen3_kat2']=$lapkel->umkm_jen3_kat2;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen3_kat3']=$lapkel->umkm_jen3_kat3;
|
||||
if($lapkel->bulan==12){
|
||||
$lap[$lapkel->kelurahan]['omset'] = $lap[$lapkel->kelurahan]['omset']/12;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis1'] = $lap[$lapkel->kelurahan]['omset_jenis1']/12;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis2'] = $lap[$lapkel->kelurahan]['omset_jenis2']/12;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis3'] = $lap[$lapkel->kelurahan]['omset_jenis3']/12;
|
||||
$lap[$lapkel->kelurahan]['umkm_jenis1'] = $lap[$lapkel->kelurahan]['umkm_jen1_kat1']+$lap[$lapkel->kelurahan]['umkm_jen1_kat2']+$lap[$lapkel->kelurahan]['umkm_jen1_kat3'];
|
||||
$lap[$lapkel->kelurahan]['umkm_jenis2'] = $lap[$lapkel->kelurahan]['umkm_jen2_kat1']+$lap[$lapkel->kelurahan]['umkm_jen2_kat2']+$lap[$lapkel->kelurahan]['umkm_jen2_kat3'];
|
||||
$lap[$lapkel->kelurahan]['umkm_jenis3'] = $lap[$lapkel->kelurahan]['umkm_jen3_kat1']+$lap[$lapkel->kelurahan]['umkm_jen3_kat2']+$lap[$lapkel->kelurahan]['umkm_jen3_kat3'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$aset=0;
|
||||
$omset=0;
|
||||
$karyawan_jenis1=0;
|
||||
$karyawan_jenis2=0;
|
||||
$karyawan_jenis3=0;
|
||||
$omset_jenis1=0;
|
||||
$omset_jenis2=0;
|
||||
$omset_jenis3=0;
|
||||
$aset_jenis1=0;
|
||||
$aset_jenis2=0;
|
||||
$aset_jenis3=0;
|
||||
$karyawan_jen1_l=0;
|
||||
$karyawan_jen2_l=0;
|
||||
$karyawan_jen3_l=0;
|
||||
$karyawan_jen1_p=0;
|
||||
$karyawan_jen2_p=0;
|
||||
$karyawan_jen3_p=0;
|
||||
$umkm_jen1_kat1=0;
|
||||
$umkm_jen1_kat2=0;
|
||||
$umkm_jen1_kat3=0;
|
||||
$umkm_jen2_kat1=0;
|
||||
$umkm_jen2_kat2=0;
|
||||
$umkm_jen2_kat3=0;
|
||||
$umkm_jen3_kat1=0;
|
||||
$umkm_jen3_kat2=0;
|
||||
$umkm_jen3_kat3=0;
|
||||
$umkm_jenis1=0;
|
||||
$umkm_jenis2=0;
|
||||
$umkm_jenis3=0;
|
||||
|
||||
foreach($lap as $laporan){
|
||||
$aset=$aset+$laporan['aset'];
|
||||
$omset=$omset+$laporan['omset'];
|
||||
$karyawan_jenis1=$karyawan_jenis1+$laporan['karyawan_jenis1'];
|
||||
$karyawan_jenis2=$karyawan_jenis2+$laporan['karyawan_jenis2'];
|
||||
$karyawan_jenis3=$karyawan_jenis3+$laporan['karyawan_jenis3'];
|
||||
$omset_jenis1=$omset_jenis1+$laporan['omset_jenis1'];
|
||||
$omset_jenis2=$omset_jenis2+$laporan['omset_jenis2'];
|
||||
$omset_jenis3=$omset_jenis3+$laporan['omset_jenis3'];
|
||||
$aset_jenis1=$aset_jenis1+$laporan['aset_jenis1'];
|
||||
$aset_jenis2=$aset_jenis2+$laporan['aset_jenis2'];
|
||||
$aset_jenis3=$aset_jenis3+$laporan['aset_jenis3'];
|
||||
$karyawan_jen1_l=$karyawan_jen1_l+$laporan['karyawan_jen1_l'];
|
||||
$karyawan_jen2_l=$karyawan_jen2_l+$laporan['karyawan_jen2_l'];
|
||||
$karyawan_jen3_l=$karyawan_jen3_l+$laporan['karyawan_jen3_l'];
|
||||
$karyawan_jen1_p=$karyawan_jen1_p+$laporan['karyawan_jen1_p'];
|
||||
$karyawan_jen2_p=$karyawan_jen2_p+$laporan['karyawan_jen2_p'];
|
||||
$karyawan_jen3_p=$karyawan_jen3_p+$laporan['karyawan_jen3_p'];
|
||||
$umkm_jen1_kat1=$umkm_jen1_kat1+$laporan['umkm_jen1_kat1'];
|
||||
$umkm_jen1_kat2=$umkm_jen1_kat2+$laporan['umkm_jen1_kat2'];
|
||||
$umkm_jen1_kat3=$umkm_jen1_kat3+$laporan['umkm_jen1_kat3'];
|
||||
$umkm_jen2_kat1=$umkm_jen2_kat1+$laporan['umkm_jen2_kat1'];
|
||||
$umkm_jen2_kat2=$umkm_jen2_kat2+$laporan['umkm_jen2_kat2'];
|
||||
$umkm_jen2_kat3=$umkm_jen2_kat3+$laporan['umkm_jen2_kat3'];
|
||||
$umkm_jen3_kat1=$umkm_jen3_kat1+$laporan['umkm_jen3_kat1'];
|
||||
$umkm_jen3_kat2=$umkm_jen3_kat2+$laporan['umkm_jen3_kat2'];
|
||||
$umkm_jen3_kat3=$umkm_jen3_kat3+$laporan['umkm_jen3_kat3'];
|
||||
$umkm_jenis1=$umkm_jenis1+$laporan['umkm_jenis1'];
|
||||
$umkm_jenis2=$umkm_jenis2+$laporan['umkm_jenis2'];
|
||||
$umkm_jenis3=$umkm_jenis3+$laporan['umkm_jenis3'];
|
||||
|
||||
$umkm = $umkm_jen1_kat1+$umkm_jen1_kat2+$umkm_jen1_kat3+$umkm_jen2_kat1+$umkm_jen2_kat2+$umkm_jen2_kat3+$umkm_jen3_kat1+$umkm_jen3_kat2+$umkm_jen3_kat3;
|
||||
$karyawan = $karyawan_jenis1+$karyawan_jenis2+$karyawan_jenis3;
|
||||
$umkm_kat1 = $umkm_jen1_kat1+$umkm_jen1_kat1+$umkm_jen1_kat1;
|
||||
$umkm_kat2 = $umkm_jen1_kat2+$umkm_jen1_kat2+$umkm_jen1_kat2;
|
||||
$umkm_kat3 = $umkm_jen1_kat3+$umkm_jen1_kat3+$umkm_jen1_kat3;
|
||||
}
|
||||
|
||||
$data['listlaporan']=$lap;
|
||||
$data['aset']=$aset;
|
||||
$data['omset']=$omset;
|
||||
$data['karyawan_jenis1']=$karyawan_jenis1;
|
||||
$data['karyawan_jenis2']=$karyawan_jenis2;
|
||||
$data['karyawan_jenis3']=$karyawan_jenis3;
|
||||
$data['omset_jenis1']=$omset_jenis1;
|
||||
$data['omset_jenis2']=$omset_jenis2;
|
||||
$data['omset_jenis3']=$omset_jenis3;
|
||||
$data['aset_jenis1']=$aset_jenis1;
|
||||
$data['aset_jenis2']=$aset_jenis2;
|
||||
$data['aset_jenis3']=$aset_jenis3;
|
||||
$data['karyawan_jen1_l']=$karyawan_jen1_l;
|
||||
$data['karyawan_jen2_l']=$karyawan_jen2_l;
|
||||
$data['karyawan_jen3_l']=$karyawan_jen3_l;
|
||||
$data['karyawan_jen1_p']=$karyawan_jen1_p;
|
||||
$data['karyawan_jen2_p']=$karyawan_jen2_p;
|
||||
$data['karyawan_jen3_p']=$karyawan_jen3_p;
|
||||
$data['umkm_jen1_kat1']=$umkm_jen1_kat1;
|
||||
$data['umkm_jen1_kat2']=$umkm_jen1_kat2;
|
||||
$data['umkm_jen1_kat3']=$umkm_jen1_kat3;
|
||||
$data['umkm_jen2_kat1']=$umkm_jen2_kat1;
|
||||
$data['umkm_jen2_kat2']=$umkm_jen2_kat2;
|
||||
$data['umkm_jen2_kat3']=$umkm_jen2_kat3;
|
||||
$data['umkm_jen3_kat1']=$umkm_jen3_kat1;
|
||||
$data['umkm_jen3_kat2']=$umkm_jen3_kat2;
|
||||
$data['umkm_jen3_kat3']=$umkm_jen3_kat3;
|
||||
$data['umkm_jenis1']=$umkm_jenis1;
|
||||
$data['umkm_jenis2']=$umkm_jenis2;
|
||||
$data['umkm_jenis3']=$umkm_jenis3;
|
||||
|
||||
$data['umkm']= $umkm;
|
||||
$data['karyawan']= $karyawan;
|
||||
$data['umkm_kat1']= $umkm_kat1;
|
||||
$data['umkm_kat2']= $umkm_kat2;
|
||||
$data['umkm_kat3']= $umkm_kat3;
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
$data['msg'] = 'empty';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$data['user_logged'] = $this->session->userdata('user_logged');
|
||||
|
||||
|
||||
$umkmlist = $this->AbsensiModel->getDesemberAbsensiByYearAndByKelurahan($year,$kelurahan);
|
||||
//var_dump($umkmlist);die();
|
||||
$data['umkmlist'] = $umkmlist;
|
||||
|
||||
$data['kelurahan'] = $kelurahan;
|
||||
$data['tahun'] = $year;
|
||||
|
||||
$this->load->view('admin/lapkelxls',$data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,225 @@
|
|||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class LaporanBulanan extends CI_Controller {
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
parent::__construct();
|
||||
$this->load->model("UserModel");
|
||||
$this->load->model("LaporanModel");
|
||||
$this->load->model("KategoriModel");
|
||||
$this->load->model("JenisModel");
|
||||
|
||||
if($this->UserModel->isNotLogin()) {
|
||||
redirect(site_url('login'));
|
||||
} elseif(!($this->UserModel->isAdmin())) {
|
||||
redirect(site_url('dashboard'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
//cek ada laporan tahunan atau tidak
|
||||
$countlaporan = $this->LaporanModel->getLaporanCount();
|
||||
if($countlaporan>0){
|
||||
$year = $this->LaporanModel->getLastYearLaporan()->tahun;
|
||||
|
||||
//cek ada laporan bulanan atau tidak
|
||||
$countlaporanbulan = $this->LaporanModel->getLaporanCountByYear($year);
|
||||
if($countlaporanbulan>0){
|
||||
|
||||
$data['tahun'] = $year;
|
||||
|
||||
if($this->input->post()){
|
||||
$post = $this->input->post();
|
||||
$month = $post['bulan'];
|
||||
} else {
|
||||
$month = $this->LaporanModel->getLastMonthLaporan($year)->bulan;
|
||||
}
|
||||
|
||||
|
||||
$data['bulan'] = $month;
|
||||
|
||||
|
||||
$omset_jen1=0;
|
||||
$omset_jen2=0;
|
||||
$omset_jen3=0;
|
||||
|
||||
$umkm_jen1=0;
|
||||
$umkm_jen2=0;
|
||||
$umkm_jen3=0;
|
||||
|
||||
$umkm_jen1_ket1=0;
|
||||
$umkm_jen1_ket2=0;
|
||||
$umkm_jen1_ket3=0;
|
||||
$umkm_jen2_ket1=0;
|
||||
$umkm_jen2_ket2=0;
|
||||
$umkm_jen2_ket3=0;
|
||||
$umkm_jen3_ket1=0;
|
||||
$umkm_jen3_ket2=0;
|
||||
$umkm_jen3_ket3=0;
|
||||
|
||||
$aset_jen1=0;
|
||||
$aset_jen2=0;
|
||||
$aset_jen3=0;
|
||||
$naker_jen1_l=0;
|
||||
$naker_jen1_p=0;
|
||||
$naker_jen2_l=0;
|
||||
$naker_jen2_p=0;
|
||||
$naker_jen3_l=0;
|
||||
$naker_jen3_p=0;
|
||||
|
||||
$lap_kelurahan = $this->LaporanModel->getKelurahanByBulanAndYear($month,$year);
|
||||
|
||||
foreach($lap_kelurahan as $kelurahan){
|
||||
$laporan = $this->LaporanModel->getLaporanByBulanByYearByKelurahan($month,$year,$kelurahan->kelurahan);
|
||||
$umkm_jen1= $umkm_jen1+$laporan->umkm_jen1_kat1+$laporan->umkm_jen1_kat2+$laporan->umkm_jen1_kat3;
|
||||
$umkm_jen2= $umkm_jen2+$laporan->umkm_jen2_kat1+$laporan->umkm_jen2_kat2+$laporan->umkm_jen2_kat3;
|
||||
$umkm_jen3= $umkm_jen3+$laporan->umkm_jen3_kat1+$laporan->umkm_jen3_kat2+$laporan->umkm_jen3_kat3;
|
||||
$omset_jen1= $omset_jen1+$laporan->omset_jenis1;
|
||||
$omset_jen2= $omset_jen2+$laporan->omset_jenis2;
|
||||
$omset_jen3= $omset_jen3+$laporan->omset_jenis3;
|
||||
$aset_jen1= $aset_jen1+$laporan->aset_jenis1;
|
||||
$aset_jen2= $aset_jen2+$laporan->aset_jenis2;
|
||||
$aset_jen3= $aset_jen3+$laporan->aset_jenis3;
|
||||
$naker_jen1_l = $naker_jen1_l + $laporan->karyawan_jen1_l;
|
||||
$naker_jen1_p = $naker_jen1_p + $laporan->karyawan_jen1_p;
|
||||
$naker_jen2_l = $naker_jen2_l + $laporan->karyawan_jen2_l;
|
||||
$naker_jen2_p = $naker_jen2_p + $laporan->karyawan_jen2_p;
|
||||
$naker_jen3_l = $naker_jen3_l + $laporan->karyawan_jen3_l;
|
||||
$naker_jen3_p = $naker_jen3_p + $laporan->karyawan_jen3_p;
|
||||
|
||||
$umkm_jen1_ket1=$umkm_jen1_ket1+$laporan->umkm_jen1_kat1;
|
||||
$umkm_jen1_ket2=$umkm_jen1_ket2+$laporan->umkm_jen1_kat2;
|
||||
$umkm_jen1_ket3=$umkm_jen1_ket3+$laporan->umkm_jen1_kat3;
|
||||
$umkm_jen2_ket1=$umkm_jen2_ket1+$laporan->umkm_jen2_kat1;
|
||||
$umkm_jen2_ket2=$umkm_jen2_ket2+$laporan->umkm_jen2_kat2;
|
||||
$umkm_jen2_ket3=$umkm_jen2_ket3+$laporan->umkm_jen2_kat3;
|
||||
$umkm_jen3_ket1=$umkm_jen3_ket1+$laporan->umkm_jen3_kat1;
|
||||
$umkm_jen3_ket2=$umkm_jen3_ket2+$laporan->umkm_jen3_kat2;
|
||||
$umkm_jen3_ket3=$umkm_jen3_ket3+$laporan->umkm_jen3_kat3;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$data['umkm_jen1_ket1']=$umkm_jen1_ket1;
|
||||
$data['umkm_jen1_ket2']=$umkm_jen1_ket2;
|
||||
$data['umkm_jen1_ket3']=$umkm_jen1_ket3;
|
||||
$data['umkm_jen2_ket1']=$umkm_jen2_ket1;
|
||||
$data['umkm_jen2_ket2']=$umkm_jen2_ket2;
|
||||
$data['umkm_jen2_ket3']=$umkm_jen2_ket3;
|
||||
$data['umkm_jen3_ket1']=$umkm_jen3_ket1;
|
||||
$data['umkm_jen3_ket2']=$umkm_jen3_ket2;
|
||||
$data['umkm_jen3_ket3']=$umkm_jen3_ket3;
|
||||
|
||||
|
||||
$omset_bln_jen1= $omset_jen1;
|
||||
$omset_bln_jen2= $omset_jen2;
|
||||
$omset_bln_jen3= $omset_jen3;
|
||||
|
||||
|
||||
|
||||
$data['umkm_jen1']=$umkm_jen1;
|
||||
$data['umkm_jen2']=$umkm_jen2;
|
||||
$data['umkm_jen3']=$umkm_jen3;
|
||||
|
||||
$data['omset_bln_jen1'] = $omset_bln_jen1;
|
||||
$data['omset_bln_jen2'] = $omset_bln_jen2;
|
||||
$data['omset_bln_jen3'] = $omset_bln_jen3;
|
||||
|
||||
$data['aset_jen1'] = $aset_jen1;
|
||||
$data['aset_jen2'] = $aset_jen2;
|
||||
$data['aset_jen3'] = $aset_jen3;
|
||||
$data['naker_jen1_l'] = $naker_jen1_l;
|
||||
$data['naker_jen1_p'] = $naker_jen1_p;
|
||||
$data['naker_jen2_l'] = $naker_jen2_l;
|
||||
$data['naker_jen2_p'] = $naker_jen2_p;
|
||||
$data['naker_jen3_l'] = $naker_jen3_l;
|
||||
$data['naker_jen3_p'] = $naker_jen3_p;
|
||||
|
||||
//komulatif
|
||||
$data['omset_1'] = $omset_bln_jen1+$omset_bln_jen2+$omset_bln_jen3;
|
||||
$data['aset_1'] = $aset_jen1+$aset_jen2+$aset_jen3;
|
||||
$data['umkm_1'] = $umkm_jen1+$umkm_jen2+$umkm_jen3;
|
||||
$naker_1 = $naker_jen1_l+$naker_jen2_l+$naker_jen3_l;
|
||||
$data['naker_1'] = $naker_1+$naker_jen1_p+$naker_jen2_p+$naker_jen3_p;
|
||||
$data['mikro_1'] = $umkm_jen1_ket1+$umkm_jen2_ket1+$umkm_jen3_ket1;
|
||||
$data['kecil_1'] = $umkm_jen1_ket2+$umkm_jen2_ket2+$umkm_jen3_ket2;
|
||||
$data['menengah_1'] = $umkm_jen1_ket3+$umkm_jen2_ket3+$umkm_jen3_ket3;
|
||||
|
||||
$data['msg'] = 'found';
|
||||
}
|
||||
} else {
|
||||
$data['msg'] = 'empty';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$data['user_logged'] = $this->session->userdata('user_logged');
|
||||
|
||||
$bulanlist = array(
|
||||
array(
|
||||
'bulan'=>'1',
|
||||
'text'=>'Januari'
|
||||
),
|
||||
array(
|
||||
'bulan'=>'2',
|
||||
'text'=>'Februari'
|
||||
),
|
||||
array(
|
||||
'bulan'=>'3',
|
||||
'text'=>'Maret'
|
||||
),
|
||||
array(
|
||||
'bulan'=>'4',
|
||||
'text'=>'April'
|
||||
),
|
||||
array(
|
||||
'bulan'=>'5',
|
||||
'text'=>'Mei'
|
||||
),
|
||||
array(
|
||||
'bulan'=>'6',
|
||||
'text'=>'Juni'
|
||||
),
|
||||
array(
|
||||
'bulan'=>'7',
|
||||
'text'=>'Juli'
|
||||
),
|
||||
array(
|
||||
'bulan'=>'8',
|
||||
'text'=>'Agustus'
|
||||
),
|
||||
array(
|
||||
'bulan'=>'9',
|
||||
'text'=>'September'
|
||||
),
|
||||
array(
|
||||
'bulan'=>'10',
|
||||
'text'=>'Oktober'
|
||||
),
|
||||
array(
|
||||
'bulan'=>'11',
|
||||
'text'=>'November'
|
||||
),
|
||||
array(
|
||||
'bulan'=>'12',
|
||||
'text'=>'Desember'
|
||||
)
|
||||
);
|
||||
|
||||
$data['bulan_list']= $bulanlist;
|
||||
|
||||
$this->load->view('admin/laporanbulanan',$data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,255 @@
|
|||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class LaporanKecamatan extends CI_Controller {
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
parent::__construct();
|
||||
$this->load->model("UserModel");
|
||||
$this->load->model("LaporanModel");
|
||||
$this->load->model("KategoriModel");
|
||||
$this->load->model("JenisModel");
|
||||
|
||||
if($this->UserModel->isNotLogin()) {
|
||||
redirect(site_url('login'));
|
||||
} elseif(!($this->UserModel->isAdmin())) {
|
||||
redirect(site_url('dashboard'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
if($this->input->post()){
|
||||
$post = $this->input->post();
|
||||
$kecamatan = $post['kecamatan'];
|
||||
} else {
|
||||
$kecamatan = 'Magelang Selatan';
|
||||
}
|
||||
|
||||
//cek ada laporan atau tidak
|
||||
$countlaporan = $this->LaporanModel->getLaporanCount();
|
||||
if($countlaporan>0){
|
||||
$year = $this->LaporanModel->getLastYearLaporan()->tahun;
|
||||
} else {
|
||||
redirect(site_url('admin/laporan'));die();
|
||||
}
|
||||
|
||||
//cek ada laporan kecamatan atau tidak
|
||||
$countlaporankec = $this->LaporanModel->getCountByTahunByKecamatan($year,$kecamatan);
|
||||
if($countlaporankec>0){
|
||||
$data['msg'] = 'found';
|
||||
$listkel = $this->LaporanModel->getKelurahanByTahunAndKecamatan($year,$kecamatan);
|
||||
foreach($listkel as $kel){
|
||||
$listlapkel = $this->LaporanModel->getLaporanByTahunAndKelurahan($year,$kel->kelurahan);
|
||||
$lap[$kel->kelurahan]['kelurahan']='';
|
||||
$lap[$kel->kelurahan]['aset']=0;
|
||||
$lap[$kel->kelurahan]['omset']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jenis1']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jenis2']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jenis3']=0;
|
||||
$lap[$kel->kelurahan]['omset_jenis1']=0;
|
||||
$lap[$kel->kelurahan]['omset_jenis2']=0;
|
||||
$lap[$kel->kelurahan]['omset_jenis3']=0;
|
||||
$lap[$kel->kelurahan]['aset_jenis1']=0;
|
||||
$lap[$kel->kelurahan]['aset_jenis2']=0;
|
||||
$lap[$kel->kelurahan]['aset_jenis3']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jen1_l']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jen2_l']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jen3_l']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jen1_p']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jen2_p']=0;
|
||||
$lap[$kel->kelurahan]['karyawan_jen3_p']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen1_kat1']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen1_kat2']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen1_kat3']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen2_kat1']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen2_kat2']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen2_kat3']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen3_kat1']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen3_kat2']=0;
|
||||
$lap[$kel->kelurahan]['umkm_jen3_kat3']=0;
|
||||
foreach($listlapkel as $lapkel){
|
||||
$lap[$kel->kelurahan]['kelurahan']=$lapkel->kelurahan;
|
||||
$lap[$lapkel->kelurahan]['aset']=$lapkel->aset;
|
||||
$lap[$lapkel->kelurahan]['omset']=$lap[$lapkel->kelurahan]['omset']+$lapkel->omset;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jenis1']=$lapkel->karyawan_jenis1;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jenis2']=$lapkel->karyawan_jenis2;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jenis3']=$lapkel->karyawan_jenis3;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis1']=$lap[$lapkel->kelurahan]['omset_jenis1']+$lapkel->omset_jenis1;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis2']=$lap[$lapkel->kelurahan]['omset_jenis2']+$lapkel->omset_jenis2;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis3']=$lap[$lapkel->kelurahan]['omset_jenis3']+$lapkel->omset_jenis3;
|
||||
$lap[$lapkel->kelurahan]['aset_jenis1']=$lapkel->aset_jenis1;
|
||||
$lap[$lapkel->kelurahan]['aset_jenis2']=$lapkel->aset_jenis2;
|
||||
$lap[$lapkel->kelurahan]['aset_jenis3']=$lapkel->aset_jenis3;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen1_l']=$lapkel->karyawan_jen1_l;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen2_l']=$lapkel->karyawan_jen2_l;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen3_l']=$lapkel->karyawan_jen3_l;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen1_p']=$lapkel->karyawan_jen1_p;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen2_p']=$lapkel->karyawan_jen2_p;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen3_p']=$lapkel->karyawan_jen3_p;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen1_kat1']=$lapkel->umkm_jen1_kat1;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen1_kat2']=$lapkel->umkm_jen1_kat2;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen1_kat3']=$lapkel->umkm_jen1_kat3;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen2_kat1']=$lapkel->umkm_jen2_kat1;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen2_kat2']=$lapkel->umkm_jen2_kat2;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen2_kat3']=$lapkel->umkm_jen2_kat3;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen3_kat1']=$lapkel->umkm_jen3_kat1;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen3_kat2']=$lapkel->umkm_jen3_kat2;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen3_kat3']=$lapkel->umkm_jen3_kat3;
|
||||
if($lapkel->bulan==12){
|
||||
$lap[$lapkel->kelurahan]['omset'] = $lap[$lapkel->kelurahan]['omset']/12;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis1'] = $lap[$lapkel->kelurahan]['omset_jenis1']/12;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis2'] = $lap[$lapkel->kelurahan]['omset_jenis2']/12;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis3'] = $lap[$lapkel->kelurahan]['omset_jenis3']/12;
|
||||
$lap[$lapkel->kelurahan]['umkm_jenis1'] = $lap[$lapkel->kelurahan]['umkm_jen1_kat1']+$lap[$lapkel->kelurahan]['umkm_jen1_kat2']+$lap[$lapkel->kelurahan]['umkm_jen1_kat3'];
|
||||
$lap[$lapkel->kelurahan]['umkm_jenis2'] = $lap[$lapkel->kelurahan]['umkm_jen2_kat1']+$lap[$lapkel->kelurahan]['umkm_jen2_kat2']+$lap[$lapkel->kelurahan]['umkm_jen2_kat3'];
|
||||
$lap[$lapkel->kelurahan]['umkm_jenis3'] = $lap[$lapkel->kelurahan]['umkm_jen3_kat1']+$lap[$lapkel->kelurahan]['umkm_jen3_kat2']+$lap[$lapkel->kelurahan]['umkm_jen3_kat3'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$aset=0;
|
||||
$omset=0;
|
||||
$karyawan_jenis1=0;
|
||||
$karyawan_jenis2=0;
|
||||
$karyawan_jenis3=0;
|
||||
$omset_jenis1=0;
|
||||
$omset_jenis2=0;
|
||||
$omset_jenis3=0;
|
||||
$aset_jenis1=0;
|
||||
$aset_jenis2=0;
|
||||
$aset_jenis3=0;
|
||||
$karyawan_jen1_l=0;
|
||||
$karyawan_jen2_l=0;
|
||||
$karyawan_jen3_l=0;
|
||||
$karyawan_jen1_p=0;
|
||||
$karyawan_jen2_p=0;
|
||||
$karyawan_jen3_p=0;
|
||||
$umkm_jen1_kat1=0;
|
||||
$umkm_jen1_kat2=0;
|
||||
$umkm_jen1_kat3=0;
|
||||
$umkm_jen2_kat1=0;
|
||||
$umkm_jen2_kat2=0;
|
||||
$umkm_jen2_kat3=0;
|
||||
$umkm_jen3_kat1=0;
|
||||
$umkm_jen3_kat2=0;
|
||||
$umkm_jen3_kat3=0;
|
||||
$umkm_jenis1=0;
|
||||
$umkm_jenis2=0;
|
||||
$umkm_jenis3=0;
|
||||
|
||||
foreach($lap as $laporan){
|
||||
$aset=$aset+$laporan['aset'];
|
||||
$omset=$omset+$laporan['omset'];
|
||||
$karyawan_jenis1=$karyawan_jenis1+$laporan['karyawan_jenis1'];
|
||||
$karyawan_jenis2=$karyawan_jenis2+$laporan['karyawan_jenis2'];
|
||||
$karyawan_jenis3=$karyawan_jenis3+$laporan['karyawan_jenis3'];
|
||||
$omset_jenis1=$omset_jenis1+$laporan['omset_jenis1'];
|
||||
$omset_jenis2=$omset_jenis2+$laporan['omset_jenis2'];
|
||||
$omset_jenis3=$omset_jenis3+$laporan['omset_jenis3'];
|
||||
$aset_jenis1=$aset_jenis1+$laporan['aset_jenis1'];
|
||||
$aset_jenis2=$aset_jenis2+$laporan['aset_jenis2'];
|
||||
$aset_jenis3=$aset_jenis3+$laporan['aset_jenis3'];
|
||||
$karyawan_jen1_l=$karyawan_jen1_l+$laporan['karyawan_jen1_l'];
|
||||
$karyawan_jen2_l=$karyawan_jen2_l+$laporan['karyawan_jen2_l'];
|
||||
$karyawan_jen3_l=$karyawan_jen3_l+$laporan['karyawan_jen3_l'];
|
||||
$karyawan_jen1_p=$karyawan_jen1_p+$laporan['karyawan_jen1_p'];
|
||||
$karyawan_jen2_p=$karyawan_jen2_p+$laporan['karyawan_jen2_p'];
|
||||
$karyawan_jen3_p=$karyawan_jen3_p+$laporan['karyawan_jen3_p'];
|
||||
$umkm_jen1_kat1=$umkm_jen1_kat1+$laporan['umkm_jen1_kat1'];
|
||||
$umkm_jen1_kat2=$umkm_jen1_kat2+$laporan['umkm_jen1_kat2'];
|
||||
$umkm_jen1_kat3=$umkm_jen1_kat3+$laporan['umkm_jen1_kat3'];
|
||||
$umkm_jen2_kat1=$umkm_jen2_kat1+$laporan['umkm_jen2_kat1'];
|
||||
$umkm_jen2_kat2=$umkm_jen2_kat2+$laporan['umkm_jen2_kat2'];
|
||||
$umkm_jen2_kat3=$umkm_jen2_kat3+$laporan['umkm_jen2_kat3'];
|
||||
$umkm_jen3_kat1=$umkm_jen3_kat1+$laporan['umkm_jen3_kat1'];
|
||||
$umkm_jen3_kat2=$umkm_jen3_kat2+$laporan['umkm_jen3_kat2'];
|
||||
$umkm_jen3_kat3=$umkm_jen3_kat3+$laporan['umkm_jen3_kat3'];
|
||||
$umkm_jenis1=$umkm_jenis1+$laporan['umkm_jenis1'];
|
||||
$umkm_jenis2=$umkm_jenis2+$laporan['umkm_jenis2'];
|
||||
$umkm_jenis3=$umkm_jenis3+$laporan['umkm_jenis3'];
|
||||
|
||||
$umkm = $umkm_jen1_kat1+$umkm_jen1_kat2+$umkm_jen1_kat3+$umkm_jen2_kat1+$umkm_jen2_kat2+$umkm_jen2_kat3+$umkm_jen3_kat1+$umkm_jen3_kat2+$umkm_jen3_kat3;
|
||||
$karyawan = $karyawan_jenis1+$karyawan_jenis2+$karyawan_jenis3;
|
||||
$umkm_kat1 = $umkm_jen1_kat1+$umkm_jen1_kat1+$umkm_jen1_kat1;
|
||||
$umkm_kat2 = $umkm_jen1_kat2+$umkm_jen1_kat2+$umkm_jen1_kat2;
|
||||
$umkm_kat3 = $umkm_jen1_kat3+$umkm_jen1_kat3+$umkm_jen1_kat3;
|
||||
}
|
||||
|
||||
$data['listlaporan']=$lap;
|
||||
$data['aset']=$aset;
|
||||
$data['omset']=$omset;
|
||||
$data['karyawan_jenis1']=$karyawan_jenis1;
|
||||
$data['karyawan_jenis2']=$karyawan_jenis2;
|
||||
$data['karyawan_jenis3']=$karyawan_jenis3;
|
||||
$data['omset_jenis1']=$omset_jenis1;
|
||||
$data['omset_jenis2']=$omset_jenis2;
|
||||
$data['omset_jenis3']=$omset_jenis3;
|
||||
$data['aset_jenis1']=$aset_jenis1;
|
||||
$data['aset_jenis2']=$aset_jenis2;
|
||||
$data['aset_jenis3']=$aset_jenis3;
|
||||
$data['karyawan_jen1_l']=$karyawan_jen1_l;
|
||||
$data['karyawan_jen2_l']=$karyawan_jen2_l;
|
||||
$data['karyawan_jen3_l']=$karyawan_jen3_l;
|
||||
$data['karyawan_jen1_p']=$karyawan_jen1_p;
|
||||
$data['karyawan_jen2_p']=$karyawan_jen2_p;
|
||||
$data['karyawan_jen3_p']=$karyawan_jen3_p;
|
||||
$data['umkm_jen1_kat1']=$umkm_jen1_kat1;
|
||||
$data['umkm_jen1_kat2']=$umkm_jen1_kat2;
|
||||
$data['umkm_jen1_kat3']=$umkm_jen1_kat3;
|
||||
$data['umkm_jen2_kat1']=$umkm_jen2_kat1;
|
||||
$data['umkm_jen2_kat2']=$umkm_jen2_kat2;
|
||||
$data['umkm_jen2_kat3']=$umkm_jen2_kat3;
|
||||
$data['umkm_jen3_kat1']=$umkm_jen3_kat1;
|
||||
$data['umkm_jen3_kat2']=$umkm_jen3_kat2;
|
||||
$data['umkm_jen3_kat3']=$umkm_jen3_kat3;
|
||||
$data['umkm_jenis1']=$umkm_jenis1;
|
||||
$data['umkm_jenis2']=$umkm_jenis2;
|
||||
$data['umkm_jenis3']=$umkm_jenis3;
|
||||
|
||||
$data['umkm']= $umkm;
|
||||
$data['karyawan']= $karyawan;
|
||||
$data['umkm_kat1']= $umkm_kat1;
|
||||
$data['umkm_kat2']= $umkm_kat2;
|
||||
$data['umkm_kat3']= $umkm_kat3;
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
$data['msg'] = 'empty';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$data['user_logged'] = $this->session->userdata('user_logged');
|
||||
|
||||
$kecamatanlist = array(
|
||||
array(
|
||||
'id'=>'1',
|
||||
'kecamatan'=>'Magelang Selatan'
|
||||
),
|
||||
array(
|
||||
'id'=>'2',
|
||||
'kecamatan'=>'Magelang Tengah'
|
||||
),
|
||||
array(
|
||||
'id'=>'3',
|
||||
'kecamatan'=>'Magelang Utara'
|
||||
)
|
||||
);
|
||||
|
||||
$data['kecamatan_list']= $kecamatanlist;
|
||||
$data['kecamatan'] = $kecamatan;
|
||||
$data['tahun'] = $year;
|
||||
|
||||
$this->load->view('admin/laporankecamatan',$data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,245 @@
|
|||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class LaporanKelurahan extends CI_Controller {
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
parent::__construct();
|
||||
$this->load->model("UserModel");
|
||||
$this->load->model("LaporanModel");
|
||||
$this->load->model("KategoriModel");
|
||||
$this->load->model("JenisModel");
|
||||
$this->load->model("KelurahanModel");
|
||||
$this->load->model("AbsensiModel");
|
||||
$this->load->model("UmkmModel");
|
||||
|
||||
if($this->UserModel->isNotLogin()) {
|
||||
redirect(site_url('login'));
|
||||
} elseif(!($this->UserModel->isAdmin())) {
|
||||
redirect(site_url('dashboard'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
if($this->input->post()){
|
||||
$post = $this->input->post();
|
||||
$kelurahan = $post['kelurahan'];
|
||||
} else {
|
||||
$kelurahan = 'Rejowinangun Selatan';
|
||||
}
|
||||
|
||||
//cek ada laporan atau tidak
|
||||
$countlaporan = $this->LaporanModel->getLaporanCount();
|
||||
if($countlaporan>0){
|
||||
$year = $this->LaporanModel->getLastYearLaporan()->tahun;
|
||||
} else {
|
||||
redirect(site_url('admin/laporan'));die();
|
||||
}
|
||||
|
||||
//cek ada laporan kelurahan atau tidak
|
||||
$countlaporankel = $this->LaporanModel->getCountByTahunByKelurahan($year,$kelurahan);
|
||||
if($countlaporankel>0){
|
||||
$data['msg'] = 'found';
|
||||
$listlapkel = $this->LaporanModel->getLaporanByTahunAndKelurahan($year,$kelurahan);
|
||||
$lap[$kelurahan]['kelurahan']='';
|
||||
$lap[$kelurahan]['aset']=0;
|
||||
$lap[$kelurahan]['omset']=0;
|
||||
$lap[$kelurahan]['karyawan_jenis1']=0;
|
||||
$lap[$kelurahan]['karyawan_jenis2']=0;
|
||||
$lap[$kelurahan]['karyawan_jenis3']=0;
|
||||
$lap[$kelurahan]['omset_jenis1']=0;
|
||||
$lap[$kelurahan]['omset_jenis2']=0;
|
||||
$lap[$kelurahan]['omset_jenis3']=0;
|
||||
$lap[$kelurahan]['aset_jenis1']=0;
|
||||
$lap[$kelurahan]['aset_jenis2']=0;
|
||||
$lap[$kelurahan]['aset_jenis3']=0;
|
||||
$lap[$kelurahan]['karyawan_jen1_l']=0;
|
||||
$lap[$kelurahan]['karyawan_jen2_l']=0;
|
||||
$lap[$kelurahan]['karyawan_jen3_l']=0;
|
||||
$lap[$kelurahan]['karyawan_jen1_p']=0;
|
||||
$lap[$kelurahan]['karyawan_jen2_p']=0;
|
||||
$lap[$kelurahan]['karyawan_jen3_p']=0;
|
||||
$lap[$kelurahan]['umkm_jen1_kat1']=0;
|
||||
$lap[$kelurahan]['umkm_jen1_kat2']=0;
|
||||
$lap[$kelurahan]['umkm_jen1_kat3']=0;
|
||||
$lap[$kelurahan]['umkm_jen2_kat1']=0;
|
||||
$lap[$kelurahan]['umkm_jen2_kat2']=0;
|
||||
$lap[$kelurahan]['umkm_jen2_kat3']=0;
|
||||
$lap[$kelurahan]['umkm_jen3_kat1']=0;
|
||||
$lap[$kelurahan]['umkm_jen3_kat2']=0;
|
||||
$lap[$kelurahan]['umkm_jen3_kat3']=0;
|
||||
foreach($listlapkel as $lapkel){
|
||||
$lap[$kelurahan]['kelurahan']=$lapkel->kelurahan;
|
||||
$lap[$lapkel->kelurahan]['aset']=$lapkel->aset;
|
||||
$lap[$lapkel->kelurahan]['omset']=$lap[$lapkel->kelurahan]['omset']+$lapkel->omset;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jenis1']=$lapkel->karyawan_jenis1;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jenis2']=$lapkel->karyawan_jenis2;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jenis3']=$lapkel->karyawan_jenis3;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis1']=$lap[$lapkel->kelurahan]['omset_jenis1']+$lapkel->omset_jenis1;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis2']=$lap[$lapkel->kelurahan]['omset_jenis2']+$lapkel->omset_jenis2;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis3']=$lap[$lapkel->kelurahan]['omset_jenis3']+$lapkel->omset_jenis3;
|
||||
$lap[$lapkel->kelurahan]['aset_jenis1']=$lapkel->aset_jenis1;
|
||||
$lap[$lapkel->kelurahan]['aset_jenis2']=$lapkel->aset_jenis2;
|
||||
$lap[$lapkel->kelurahan]['aset_jenis3']=$lapkel->aset_jenis3;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen1_l']=$lapkel->karyawan_jen1_l;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen2_l']=$lapkel->karyawan_jen2_l;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen3_l']=$lapkel->karyawan_jen3_l;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen1_p']=$lapkel->karyawan_jen1_p;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen2_p']=$lapkel->karyawan_jen2_p;
|
||||
$lap[$lapkel->kelurahan]['karyawan_jen3_p']=$lapkel->karyawan_jen3_p;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen1_kat1']=$lapkel->umkm_jen1_kat1;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen1_kat2']=$lapkel->umkm_jen1_kat2;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen1_kat3']=$lapkel->umkm_jen1_kat3;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen2_kat1']=$lapkel->umkm_jen2_kat1;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen2_kat2']=$lapkel->umkm_jen2_kat2;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen2_kat3']=$lapkel->umkm_jen2_kat3;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen3_kat1']=$lapkel->umkm_jen3_kat1;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen3_kat2']=$lapkel->umkm_jen3_kat2;
|
||||
$lap[$lapkel->kelurahan]['umkm_jen3_kat3']=$lapkel->umkm_jen3_kat3;
|
||||
if($lapkel->bulan==12){
|
||||
$lap[$lapkel->kelurahan]['omset'] = $lap[$lapkel->kelurahan]['omset']/12;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis1'] = $lap[$lapkel->kelurahan]['omset_jenis1']/12;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis2'] = $lap[$lapkel->kelurahan]['omset_jenis2']/12;
|
||||
$lap[$lapkel->kelurahan]['omset_jenis3'] = $lap[$lapkel->kelurahan]['omset_jenis3']/12;
|
||||
$lap[$lapkel->kelurahan]['umkm_jenis1'] = $lap[$lapkel->kelurahan]['umkm_jen1_kat1']+$lap[$lapkel->kelurahan]['umkm_jen1_kat2']+$lap[$lapkel->kelurahan]['umkm_jen1_kat3'];
|
||||
$lap[$lapkel->kelurahan]['umkm_jenis2'] = $lap[$lapkel->kelurahan]['umkm_jen2_kat1']+$lap[$lapkel->kelurahan]['umkm_jen2_kat2']+$lap[$lapkel->kelurahan]['umkm_jen2_kat3'];
|
||||
$lap[$lapkel->kelurahan]['umkm_jenis3'] = $lap[$lapkel->kelurahan]['umkm_jen3_kat1']+$lap[$lapkel->kelurahan]['umkm_jen3_kat2']+$lap[$lapkel->kelurahan]['umkm_jen3_kat3'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$aset=0;
|
||||
$omset=0;
|
||||
$karyawan_jenis1=0;
|
||||
$karyawan_jenis2=0;
|
||||
$karyawan_jenis3=0;
|
||||
$omset_jenis1=0;
|
||||
$omset_jenis2=0;
|
||||
$omset_jenis3=0;
|
||||
$aset_jenis1=0;
|
||||
$aset_jenis2=0;
|
||||
$aset_jenis3=0;
|
||||
$karyawan_jen1_l=0;
|
||||
$karyawan_jen2_l=0;
|
||||
$karyawan_jen3_l=0;
|
||||
$karyawan_jen1_p=0;
|
||||
$karyawan_jen2_p=0;
|
||||
$karyawan_jen3_p=0;
|
||||
$umkm_jen1_kat1=0;
|
||||
$umkm_jen1_kat2=0;
|
||||
$umkm_jen1_kat3=0;
|
||||
$umkm_jen2_kat1=0;
|
||||
$umkm_jen2_kat2=0;
|
||||
$umkm_jen2_kat3=0;
|
||||
$umkm_jen3_kat1=0;
|
||||
$umkm_jen3_kat2=0;
|
||||
$umkm_jen3_kat3=0;
|
||||
$umkm_jenis1=0;
|
||||
$umkm_jenis2=0;
|
||||
$umkm_jenis3=0;
|
||||
|
||||
foreach($lap as $laporan){
|
||||
$aset=$aset+$laporan['aset'];
|
||||
$omset=$omset+$laporan['omset'];
|
||||
$karyawan_jenis1=$karyawan_jenis1+$laporan['karyawan_jenis1'];
|
||||
$karyawan_jenis2=$karyawan_jenis2+$laporan['karyawan_jenis2'];
|
||||
$karyawan_jenis3=$karyawan_jenis3+$laporan['karyawan_jenis3'];
|
||||
$omset_jenis1=$omset_jenis1+$laporan['omset_jenis1'];
|
||||
$omset_jenis2=$omset_jenis2+$laporan['omset_jenis2'];
|
||||
$omset_jenis3=$omset_jenis3+$laporan['omset_jenis3'];
|
||||
$aset_jenis1=$aset_jenis1+$laporan['aset_jenis1'];
|
||||
$aset_jenis2=$aset_jenis2+$laporan['aset_jenis2'];
|
||||
$aset_jenis3=$aset_jenis3+$laporan['aset_jenis3'];
|
||||
$karyawan_jen1_l=$karyawan_jen1_l+$laporan['karyawan_jen1_l'];
|
||||
$karyawan_jen2_l=$karyawan_jen2_l+$laporan['karyawan_jen2_l'];
|
||||
$karyawan_jen3_l=$karyawan_jen3_l+$laporan['karyawan_jen3_l'];
|
||||
$karyawan_jen1_p=$karyawan_jen1_p+$laporan['karyawan_jen1_p'];
|
||||
$karyawan_jen2_p=$karyawan_jen2_p+$laporan['karyawan_jen2_p'];
|
||||
$karyawan_jen3_p=$karyawan_jen3_p+$laporan['karyawan_jen3_p'];
|
||||
$umkm_jen1_kat1=$umkm_jen1_kat1+$laporan['umkm_jen1_kat1'];
|
||||
$umkm_jen1_kat2=$umkm_jen1_kat2+$laporan['umkm_jen1_kat2'];
|
||||
$umkm_jen1_kat3=$umkm_jen1_kat3+$laporan['umkm_jen1_kat3'];
|
||||
$umkm_jen2_kat1=$umkm_jen2_kat1+$laporan['umkm_jen2_kat1'];
|
||||
$umkm_jen2_kat2=$umkm_jen2_kat2+$laporan['umkm_jen2_kat2'];
|
||||
$umkm_jen2_kat3=$umkm_jen2_kat3+$laporan['umkm_jen2_kat3'];
|
||||
$umkm_jen3_kat1=$umkm_jen3_kat1+$laporan['umkm_jen3_kat1'];
|
||||
$umkm_jen3_kat2=$umkm_jen3_kat2+$laporan['umkm_jen3_kat2'];
|
||||
$umkm_jen3_kat3=$umkm_jen3_kat3+$laporan['umkm_jen3_kat3'];
|
||||
$umkm_jenis1=$umkm_jenis1+$laporan['umkm_jenis1'];
|
||||
$umkm_jenis2=$umkm_jenis2+$laporan['umkm_jenis2'];
|
||||
$umkm_jenis3=$umkm_jenis3+$laporan['umkm_jenis3'];
|
||||
|
||||
$umkm = $umkm_jen1_kat1+$umkm_jen1_kat2+$umkm_jen1_kat3+$umkm_jen2_kat1+$umkm_jen2_kat2+$umkm_jen2_kat3+$umkm_jen3_kat1+$umkm_jen3_kat2+$umkm_jen3_kat3;
|
||||
$karyawan = $karyawan_jenis1+$karyawan_jenis2+$karyawan_jenis3;
|
||||
$umkm_kat1 = $umkm_jen1_kat1+$umkm_jen1_kat1+$umkm_jen1_kat1;
|
||||
$umkm_kat2 = $umkm_jen1_kat2+$umkm_jen1_kat2+$umkm_jen1_kat2;
|
||||
$umkm_kat3 = $umkm_jen1_kat3+$umkm_jen1_kat3+$umkm_jen1_kat3;
|
||||
}
|
||||
|
||||
$data['listlaporan']=$lap;
|
||||
$data['aset']=$aset;
|
||||
$data['omset']=$omset;
|
||||
$data['karyawan_jenis1']=$karyawan_jenis1;
|
||||
$data['karyawan_jenis2']=$karyawan_jenis2;
|
||||
$data['karyawan_jenis3']=$karyawan_jenis3;
|
||||
$data['omset_jenis1']=$omset_jenis1;
|
||||
$data['omset_jenis2']=$omset_jenis2;
|
||||
$data['omset_jenis3']=$omset_jenis3;
|
||||
$data['aset_jenis1']=$aset_jenis1;
|
||||
$data['aset_jenis2']=$aset_jenis2;
|
||||
$data['aset_jenis3']=$aset_jenis3;
|
||||
$data['karyawan_jen1_l']=$karyawan_jen1_l;
|
||||
$data['karyawan_jen2_l']=$karyawan_jen2_l;
|
||||
$data['karyawan_jen3_l']=$karyawan_jen3_l;
|
||||
$data['karyawan_jen1_p']=$karyawan_jen1_p;
|
||||
$data['karyawan_jen2_p']=$karyawan_jen2_p;
|
||||
$data['karyawan_jen3_p']=$karyawan_jen3_p;
|
||||
$data['umkm_jen1_kat1']=$umkm_jen1_kat1;
|
||||
$data['umkm_jen1_kat2']=$umkm_jen1_kat2;
|
||||
$data['umkm_jen1_kat3']=$umkm_jen1_kat3;
|
||||
$data['umkm_jen2_kat1']=$umkm_jen2_kat1;
|
||||
$data['umkm_jen2_kat2']=$umkm_jen2_kat2;
|
||||
$data['umkm_jen2_kat3']=$umkm_jen2_kat3;
|
||||
$data['umkm_jen3_kat1']=$umkm_jen3_kat1;
|
||||
$data['umkm_jen3_kat2']=$umkm_jen3_kat2;
|
||||
$data['umkm_jen3_kat3']=$umkm_jen3_kat3;
|
||||
$data['umkm_jenis1']=$umkm_jenis1;
|
||||
$data['umkm_jenis2']=$umkm_jenis2;
|
||||
$data['umkm_jenis3']=$umkm_jenis3;
|
||||
|
||||
$data['umkm']= $umkm;
|
||||
$data['karyawan']= $karyawan;
|
||||
$data['umkm_kat1']= $umkm_kat1;
|
||||
$data['umkm_kat2']= $umkm_kat2;
|
||||
$data['umkm_kat3']= $umkm_kat3;
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
$data['msg'] = 'empty';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$data['user_logged'] = $this->session->userdata('user_logged');
|
||||
|
||||
$kelurahanlist = $this->KelurahanModel->getKelurahan();
|
||||
$umkmlist = $this->AbsensiModel->getDesemberAbsensiByYearAndByKelurahan($year,$kelurahan);
|
||||
//var_dump($umkmlist);die();
|
||||
$data['umkmlist'] = $umkmlist;
|
||||
$data['kelurahan_list']= $kelurahanlist;
|
||||
$data['kelurahan'] = $kelurahan;
|
||||
$data['tahun'] = $year;
|
||||
|
||||
$this->load->view('admin/laporankelurahan',$data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -75,6 +75,15 @@ class AbsensiModel extends CI_Model
|
|||
return $this->db->update($this->_table, $this, array('id_absensi' => $id_absensi));
|
||||
}
|
||||
|
||||
public function getDesemberAbsensiByYearAndByKelurahan($tahun,$kelurahan){
|
||||
$this->db->join('tb_user','tb_user.id_user = tb_absensi.id_pemilik');
|
||||
$this->db->where('bulan', 12);
|
||||
$this->db->where('tahun', $tahun);
|
||||
$this->db->where('tb_absensi.kelurahan', $kelurahan);
|
||||
//$this->db->limit(1);
|
||||
return $absensi = $this->db->get($this->_table)->result();
|
||||
}
|
||||
|
||||
public function getLastMonthAbsensi($bulan,$tahun){
|
||||
$bulan = $bulan-1;
|
||||
$this->db->where('bulan', $bulan);
|
||||
|
|
|
@ -18,6 +18,18 @@ class LaporanModel extends CI_Model
|
|||
return $laporan = count($this->db->get($this->_table)->result());
|
||||
}
|
||||
|
||||
public function getCountByTahunByKelurahan($tahun,$kelurahan){
|
||||
$this->db->where('tahun',$tahun);
|
||||
$this->db->where('kelurahan',$kelurahan);
|
||||
return $laporan = count($this->db->get($this->_table)->result());
|
||||
}
|
||||
|
||||
public function getCountByTahunByKecamatan($tahun,$kecamatan){
|
||||
$this->db->where('tahun',$tahun);
|
||||
$this->db->where('kecamatan',$kecamatan);
|
||||
return $laporan = count($this->db->get($this->_table)->result());
|
||||
}
|
||||
|
||||
public function getLaporanByBulanByYearByKelurahan($bulan,$year,$kelurahan){
|
||||
$this->db->where('tahun',$year);
|
||||
$this->db->where('bulan',$bulan);
|
||||
|
@ -48,6 +60,31 @@ class LaporanModel extends CI_Model
|
|||
return $laporan =$this->db->get($this->_table)->row();
|
||||
}
|
||||
|
||||
public function getLaporanByTahunAndKelurahan($tahun,$kelurahan){
|
||||
$this->db->where('tahun',$tahun);
|
||||
$this->db->where('kelurahan',$kelurahan);
|
||||
$this->db->order_by('bulan','ASC');
|
||||
return $laporan =$this->db->get($this->_table)->result();
|
||||
}
|
||||
|
||||
public function getKelurahanByTahunAndKecamatan($tahun,$kecamatan){
|
||||
$this->db->select('kelurahan');
|
||||
$this->db->distinct('kelurahan');
|
||||
$this->db->where('tahun',$tahun);
|
||||
$this->db->where('kecamatan',$kecamatan);
|
||||
$this->db->order_by('kelurahan','ASC');
|
||||
return $laporan =$this->db->get($this->_table)->result();
|
||||
}
|
||||
|
||||
public function getLastMonthLaporan($tahun){
|
||||
$this->db->select('bulan');
|
||||
$this->db->where('tahun',$tahun);
|
||||
$this->db->distinct('bulan');
|
||||
$this->db->order_by('bulan','DESC');
|
||||
$this->db->limit(1);
|
||||
return $laporan =$this->db->get($this->_table)->row();
|
||||
}
|
||||
|
||||
public function getBulanLaporanByYear($tahun){
|
||||
$this->db->select('bulan');
|
||||
$this->db->where('tahun',$tahun);
|
||||
|
|
|
@ -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>
|
|
@ -0,0 +1,237 @@
|
|||
<?php
|
||||
function rupiah($angka){
|
||||
|
||||
$hasil_rupiah = "Rp " . number_format($angka,2,',','.');
|
||||
return $hasil_rupiah;
|
||||
|
||||
}
|
||||
?>
|
||||
<?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';
|
||||
}
|
||||
?>
|
||||
<!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
|
||||
header("Content-type: application/vnd-ms-excel");
|
||||
header("Content-Disposition: attachment; filename=Rekap_Data_UMKM_Kota_MGL_".$bulantext.'_'.$tahun.".xls");
|
||||
?>
|
||||
|
||||
<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>
|
|
@ -0,0 +1,237 @@
|
|||
<?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 KECAMATAN <?php echo strtoupper($kecamatan) ?> <?php echo $tahun ?> <br>
|
||||
KOTA MAGELANG
|
||||
</div>
|
||||
<div class="spasi"> </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;"> </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>
|
|
@ -0,0 +1,224 @@
|
|||
<?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
|
||||
header("Content-type: application/vnd-ms-excel");
|
||||
header("Content-Disposition: attachment; filename=Rekap_Data_UMKM_kec_".$kecamatan.'_'.$tahun.".xls");
|
||||
?>
|
||||
|
||||
<div class="spasi"> </div>
|
||||
<div class="judul">
|
||||
REKAP DATA UMKM KECAMATAN <?php echo strtoupper($kecamatan) ?> <?php echo $tahun ?> <br>
|
||||
KOTA MAGELANG
|
||||
</div>
|
||||
<div class="spasi"> </div>
|
||||
<?php if($msg!=='empty'){?>
|
||||
<div>
|
||||
<table class="table table-bordered table-sm text-center text-nowrap table-responsive table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="3"><small>No</small></th>
|
||||
<th rowspan="3"><small>kelurahan</small></th>
|
||||
<th rowspan="2" colspan="3"><small>Jml Umkm</small></th>
|
||||
<th rowspan="2" colspan="3"><small>Omset/Bulan</small></th>
|
||||
<th rowspan="2" colspan="3"><small>Aset</small></th>
|
||||
<th rowspan="1" colspan="6"><small>Jml Naker</small></th>
|
||||
<th rowspan="1" colspan="9"><small>Klasifikasi</small></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2"><small>P</small></th>
|
||||
<th colspan="2"><small>J</small></th>
|
||||
<th colspan="2"><small>I</small></th>
|
||||
|
||||
<th colspan="3"><small>P</small></th>
|
||||
<th colspan="3"><small>J</small></th>
|
||||
<th colspan="3"><small>I</small></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><small>P</small></th>
|
||||
<th><small>J</small></th>
|
||||
<th><small>I</small></th>
|
||||
|
||||
<th><small>P</small></th>
|
||||
<th><small>J</small></th>
|
||||
<th><small>I</small></th>
|
||||
|
||||
<th><small>P</small></th>
|
||||
<th><small>J</small></th>
|
||||
<th><small>I</small></th>
|
||||
|
||||
<th><small>L</small></th>
|
||||
<th><small>P</small></th>
|
||||
<th><small>L</small></th>
|
||||
<th><small>P</small></th>
|
||||
<th><small>L</small></th>
|
||||
<th><small>P</small></th>
|
||||
|
||||
<th><small>M</small></th>
|
||||
<th><small>K</small></th>
|
||||
<th><small>MN</small></th>
|
||||
<th><small>M</small></th>
|
||||
<th><small>K</small></th>
|
||||
<th><small>MN</small></th>
|
||||
<th><small>M</small></th>
|
||||
<th><small>K</small></th>
|
||||
<th><small>MN</small></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
$no=0;
|
||||
foreach($listlaporan as $laporan){
|
||||
$no++;
|
||||
?>
|
||||
<tr>
|
||||
<td><small><?php echo $no ?></small></td>
|
||||
<td class="text-left"><small><?php echo $laporan['kelurahan'] ?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jenis1'] ?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jenis2'] ?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jenis3'] ?></small></td>
|
||||
<td><small><?php echo rupiah($laporan['omset_jenis1']) ?></small></td>
|
||||
<td><small><?php echo rupiah($laporan['omset_jenis2']) ?></small></td>
|
||||
<td><small><?php echo rupiah($laporan['omset_jenis3']) ?></small></td>
|
||||
<td><small><?php echo rupiah($laporan['aset_jenis1']) ?></small></td>
|
||||
<td><small><?php echo rupiah($laporan['aset_jenis2']) ?></small></td>
|
||||
<td><small><?php echo rupiah($laporan['aset_jenis3']) ?></small></td>
|
||||
<td><small><?php echo $laporan['karyawan_jen1_l'] ?></small></td>
|
||||
<td><small><?php echo $laporan['karyawan_jen1_p'] ?></small></td>
|
||||
<td><small><?php echo $laporan['karyawan_jen2_l'] ?></small></td>
|
||||
<td><small><?php echo $laporan['karyawan_jen2_p'] ?></small></td>
|
||||
<td><small><?php echo $laporan['karyawan_jen3_l'] ?></small></td>
|
||||
<td><small><?php echo $laporan['karyawan_jen3_p'] ?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen1_kat1']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen1_kat2']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen1_kat3']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen2_kat1']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen2_kat2']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen2_kat3']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen3_kat1']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen3_kat2']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen3_kat3']?></small></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="2"><small>Total</small></th>
|
||||
<th><small><?php echo $umkm_jenis1 ?></small></th>
|
||||
<th><small><?php echo $umkm_jenis2 ?></small></th>
|
||||
<th><small><?php echo $umkm_jenis3 ?></small></th>
|
||||
<th><small><?php echo rupiah($omset_jenis1) ?></small></th>
|
||||
<th><small><?php echo rupiah($omset_jenis2) ?></small></th>
|
||||
<th><small><?php echo rupiah($omset_jenis3) ?></small></th>
|
||||
<th><small><?php echo rupiah($aset_jenis1) ?></small></th>
|
||||
<th><small><?php echo rupiah($aset_jenis2) ?></small></th>
|
||||
<th><small><?php echo rupiah($aset_jenis3) ?></small></th>
|
||||
<th><small><?php echo $karyawan_jen1_l ?></small></th>
|
||||
<th><small><?php echo $karyawan_jen1_p ?></small></th>
|
||||
<th><small><?php echo $karyawan_jen2_l ?></small></th>
|
||||
<th><small><?php echo $karyawan_jen2_p ?></small></th>
|
||||
<th><small><?php echo $karyawan_jen3_l ?></small></th>
|
||||
<th><small><?php echo $karyawan_jen3_p ?></small></th>
|
||||
<th><small><?php echo $umkm_jen1_kat1 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen1_kat2 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen1_kat3 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen2_kat1 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen2_kat2 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen2_kat3 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen3_kat1 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen3_kat2 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen3_kat3 ?></small></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>
|
||||
|
||||
<?php } else {?>
|
||||
<div>Tidak ada laporan yang sudah dibuat saat ini.</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,299 @@
|
|||
<?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>
|
|
@ -0,0 +1,285 @@
|
|||
<?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
|
||||
header("Content-type: application/vnd-ms-excel");
|
||||
header("Content-Disposition: attachment; filename=Rekap_Data_UMKM_kel_".$kelurahan.'_'.$tahun.".xls");
|
||||
?>
|
||||
|
||||
<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;width:1200px;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 class="text-left text-nowrap"><?php echo $usaha->nama?></td>
|
||||
<td class="text-left text-nowrap"><?php echo $umkm->nama?></td>
|
||||
<td class="text-left"><?php echo $umkm->kelurahan ?></td>
|
||||
<td class="text-left"><?php echo $usaha->alamat ?></td>
|
||||
<td><?php echo $usaha->telp ?></td>
|
||||
<td class="text-left"><?php echo $usaha->deskripsi ?></td>
|
||||
<td><?php echo $jenis->jenis ?></td>
|
||||
<td class="text-left"><?php echo rupiah($r_omset) ?></td>
|
||||
<td 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>
|
||||
</html>
|
|
@ -84,6 +84,9 @@
|
|||
<li class="nav-item">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/laporanbulanan" class="nav-link">Bulanan</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/laporankecamatan" class="nav-link">Kecamatan</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/laporankelurahan" class="nav-link">Kelurahan</a>
|
||||
</li>
|
||||
|
|
|
@ -0,0 +1,495 @@
|
|||
<?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">
|
||||
|
||||
<!-- Bootstrap CSS -->
|
||||
<link rel="stylesheet" href="<?php echo base_url()?>assets/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="<?php echo base_url()?>assets/css/dataTables.bootstrap4.min.css">
|
||||
|
||||
<link data-require="sweet-alert@*" data-semver="0.4.2" rel="stylesheet" href="<?php echo base_url()?>assets/css/sweetalert.min.css" />
|
||||
|
||||
<link rel="icon" type="image/png" href="../../assets/images/favicon.png" />
|
||||
|
||||
<title>Aplikasi UMKM</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="#">
|
||||
<img src="<?php echo base_url()?>assets/images/logo-white.png" width="100" alt="">
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
|
||||
</ul>
|
||||
<form methode="POST" action="../login/logout" class="form-inline my-2 my-lg-0" >
|
||||
<button class="btn btn-outline-warning btn-sm my-2 my-sm-0" type="submit">Logout</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-3" style="cursor:pointer;">
|
||||
<div class="card">
|
||||
<div class="card-header text-center">
|
||||
<img src="<?php echo base_url()?>assets/images/<?php echo $user_logged->foto_user ?>" width="125" /><br>
|
||||
<strong><?php echo $user_logged->nama ?></strong>
|
||||
</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/dashboard" style="text-decoration:none;">
|
||||
<li class="list-group-item text-dark border-bottom">Data Pemilik UMKM</li>
|
||||
</a>
|
||||
<a href="<?php echo base_url('index.php/')?>admin/umkm" style="text-decoration:none;">
|
||||
<li class="list-group-item text-dark border-bottom">Data UMKM</li>
|
||||
</a>
|
||||
<a href="<?php echo base_url('index.php/')?>admin/absensi" style="text-decoration:none;">
|
||||
<li class="list-group-item text-dark border-bottom">Absensi</li>
|
||||
</a>
|
||||
<a href="<?php echo base_url('index.php/')?>admin/laporan" style="text-decoration:none;">
|
||||
<li class="list-group-item bg-primary text-white border-bottom">Laporan</li>
|
||||
</a>
|
||||
<a href="<?php echo base_url('index.php/')?>admin/setting" style="text-decoration:none;">
|
||||
<li class="list-group-item text-dark">Setting</li>
|
||||
</a>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-md-9 col-lg-9 col-sm-12 col-12">
|
||||
<div class="card">
|
||||
<h5 class="card-header">Laporan</h5>
|
||||
<div class="card-body">
|
||||
<div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/laporan" class="nav-link">Tahunan</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/laporanbulanan" class="nav-link active">Bulanan</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/laporankecamatan" class="nav-link">Kecamatan</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/laporankelurahan" class="nav-link">Kelurahan</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<?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="mt-3">
|
||||
<div>
|
||||
<form action="" method="POST" class="needs-validation">
|
||||
<div class="form-group">
|
||||
<label for="bulan">Pilih Bulan</label>
|
||||
<select name="bulan" class="form-control" id="bulan" onchange="this.form.submit()" required>
|
||||
<?php foreach($bulan_list as $list) {?>
|
||||
<option value="<?php echo $list['bulan'] ?>" <?php if($list['bulan']===$bulan){echo "selected";}?>>
|
||||
<?php echo $list['text'] ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header bg-primary text-white">
|
||||
<div class="row">
|
||||
<div class="col col-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<h6>Data UMKM Kota Magelang Bulan <?php echo $bulantext ?> <?php echo $tahun ?></h6>
|
||||
</div>
|
||||
<div class="col col-12 col-sm-12 col-md-4 col-lg-4 text-right">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/lapbulpdf?bulan=<?php echo $bulan ?>&tahun=<?php echo $tahun ?>" target="_blank" class="btn btn-sm btn-warning">Print / PDF</a>
|
||||
<a href="<?php echo base_url('index.php/')?>admin/lapbulxls?bulan=<?php echo $bulan ?>&tahun=<?php echo $tahun ?>" target="_blank" class="btn btn-sm btn-success">Export Excel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($msg!=='empty'){?>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<table class="table table-bordered table-sm text-center text-nowrap table-responsive-sm table-striped">
|
||||
<thead class="">
|
||||
<tr>
|
||||
<th class="align-middle" colspan="3">Jumlah UMKM</th>
|
||||
<th class="align-middle" colspan="3">Omset/Bulan</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><small>P</small></th>
|
||||
<th><small>J</small></th>
|
||||
<th><small>I</small></th>
|
||||
|
||||
<th><small>P</small></th>
|
||||
<th><small>J</small></th>
|
||||
<th><small>I</small></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><small><?php echo $umkm_jen1 ?></small></td>
|
||||
<td><small><?php echo $umkm_jen2 ?></small></td>
|
||||
<td><small><?php echo $umkm_jen3 ?></small></td>
|
||||
|
||||
<td><small><?php echo rupiah($omset_bln_jen1) ?></small></td>
|
||||
<td><small><?php echo rupiah($omset_bln_jen2) ?></small></td>
|
||||
<td><small><?php echo rupiah($omset_bln_jen3) ?></small></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th class="align-middle" colspan="3"><small>Total</small></th>
|
||||
<th class="align-middle" colspan="3"><small>Total</small></th>
|
||||
</tr>
|
||||
<?php
|
||||
$umkm = $umkm_jen1+$umkm_jen2+$umkm_jen3;
|
||||
$omset = $omset_bln_jen1+$omset_bln_jen2+$omset_bln_jen3;
|
||||
?>
|
||||
<tr>
|
||||
<th class="align-middle" colspan="3" ><small><?php echo $umkm ?></small></th>
|
||||
<th class="align-middle" colspan="3" ><small><?php echo rupiah($omset) ?></small></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<table class="table table-bordered table-sm text-center text-nowrap table-responsive-lg table-striped">
|
||||
<thead class="">
|
||||
<tr>
|
||||
<th class="align-middle" colspan="3" rowspan="2">Aset</th>
|
||||
<th class="align-middle" colspan="6" >Jumlah Naker</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2" ><small>P</small></th>
|
||||
<th colspan="2" ><small>J</small></th>
|
||||
<th colspan="2" ><small>I</small></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><small>P</small></th>
|
||||
<th><small>J</small></th>
|
||||
<th><small>I</small></th>
|
||||
|
||||
<th><small>L</small></th>
|
||||
<th><small>P</small></th>
|
||||
|
||||
<th><small>L</small></th>
|
||||
<th><small>P</small></th>
|
||||
|
||||
<th><small>L</small></th>
|
||||
<th><small>P</small></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><small><?php echo rupiah($aset_jen1) ?></small></td>
|
||||
<td><small><?php echo rupiah($aset_jen2) ?></small></td>
|
||||
<td><small><?php echo rupiah($aset_jen3) ?></small></td>
|
||||
|
||||
<td><small><?php echo $naker_jen1_l ?></small></td>
|
||||
<td><small><?php echo $naker_jen1_p ?></small></td>
|
||||
|
||||
<td><small><?php echo $naker_jen2_l ?></small></td>
|
||||
<td><small><?php echo $naker_jen2_p ?></small></td>
|
||||
|
||||
<td><small><?php echo $naker_jen3_l ?></small></td>
|
||||
<td><small><?php echo $naker_jen3_p ?></small></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th class="align-middle" colspan="3"><small>Total</small></th>
|
||||
<th class="align-middle" colspan="6"><small>Total</small></th>
|
||||
</tr>
|
||||
<?php
|
||||
$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;
|
||||
?>
|
||||
<tr>
|
||||
<th class="align-middle" colspan="3" ><small><?php echo rupiah($aset) ?></small></th>
|
||||
<th class="align-middle" colspan="6" ><small><?php echo $naker ?></small></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<table class="table table-bordered table-sm text-center text-nowrap table-responsive-sm table-striped">
|
||||
<thead class="">
|
||||
<tr>
|
||||
<th class="align-middle" colspan="9" >Klasifikasi</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="3" ><small>P</small></th>
|
||||
<th colspan="3" ><small>J</small></th>
|
||||
<th colspan="3" ><small>I</small></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><small>M</small></th>
|
||||
<th><small>K</small></th>
|
||||
<th><small>MN</small></th>
|
||||
|
||||
<th><small>M</small></th>
|
||||
<th><small>K</small></th>
|
||||
<th><small>MN</small></th>
|
||||
|
||||
<th><small>M</small></th>
|
||||
<th><small>K</small></th>
|
||||
<th><small>MN</small></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><small><?php echo $umkm_jen1_ket1?></small></td>
|
||||
<td><small><?php echo $umkm_jen1_ket2?></small></td>
|
||||
<td><small><?php echo $umkm_jen1_ket3?></small></td>
|
||||
<td><small><?php echo $umkm_jen2_ket1?></small></td>
|
||||
<td><small><?php echo $umkm_jen2_ket2?></small></td>
|
||||
<td><small><?php echo $umkm_jen2_ket3?></small></td>
|
||||
<td><small><?php echo $umkm_jen3_ket1?></small></td>
|
||||
<td><small><?php echo $umkm_jen3_ket2?></small></td>
|
||||
<td><small><?php echo $umkm_jen3_ket3?></small></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th class="align-middle" colspan="3"><small>Mikro</small></th>
|
||||
<th class="align-middle" colspan="3"><small>Kecil</small></th>
|
||||
<th class="align-middle" colspan="3"><small>Menengah</small></th>
|
||||
</tr>
|
||||
<?php
|
||||
$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 class="align-middle" colspan="3" ><small><?php echo $mikro ?></small></th>
|
||||
<th class="align-middle" colspan="3" ><small><?php echo $kecil ?></small></th>
|
||||
<th class="align-middle" colspan="3" ><small><?php echo $menengah ?></small></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } else {?>
|
||||
<div class="card-body text-center">
|
||||
<img src="<?php echo base_url()?>assets/images/search.png" width="150" /><br>
|
||||
<div class="alert alert-warning" role="alert">
|
||||
Tidak ada <strong>laporan yang sudah dibuat</strong> saat ini.
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Optional JavaScript -->
|
||||
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
||||
<script src="<?php echo base_url()?>assets/js/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||||
<script src="<?php echo base_url()?>assets/js/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
|
||||
<script src="<?php echo base_url()?>assets/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
|
||||
<script src="<?php echo base_url()?>assets/js/jquery.dataTables.min.js"></script>
|
||||
<script src="<?php echo base_url()?>assets/js/dataTables.bootstrap4.min.js"></script>
|
||||
<script src="<?php echo base_url()?>assets/js/sweetalert.min.js"></script>
|
||||
<script src="<?php echo base_url()?>assets/js/chart.js"></script>
|
||||
|
||||
<script>
|
||||
var ctx = document.getElementById('myChart').getContext('2d');
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: ['Aset', 'Omset'],
|
||||
datasets: [
|
||||
{
|
||||
label: '<?php echo $tahun ?>',
|
||||
data: [<?php echo $aset_1 ?>, <?php echo $omset_1 ?>],
|
||||
backgroundColor: [
|
||||
'rgba(255, 99, 132, 0.2)',
|
||||
'rgba(255, 99, 132, 0.2)'
|
||||
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(255, 99, 132, 1)',
|
||||
'rgba(255, 99, 132, 1)'
|
||||
],
|
||||
borderWidth: 1
|
||||
},
|
||||
{
|
||||
label: '<?php echo $tahun_0 ?>',
|
||||
data: [<?php echo $aset_0 ?>, <?php echo $omset_0 ?>],
|
||||
backgroundColor: [
|
||||
'rgba(54, 162, 235, 0.2)',
|
||||
'rgba(54, 162, 235, 0.2)'
|
||||
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(54, 162, 235, 1)',
|
||||
'rgba(54, 162, 235, 1)'
|
||||
],
|
||||
borderWidth: 1
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var ctx = document.getElementById('myChart2').getContext('2d');
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: ['Jml UMKM', 'Tenaga Kerja', 'Mikro', 'Kecil','Menengah'],
|
||||
datasets: [
|
||||
{
|
||||
label: '<?php echo $tahun ?>',
|
||||
data: [<?php echo $umkm_1 ?>, <?php echo $naker_1 ?>, <?php echo $mikro_1 ?>, <?php echo $kecil_1 ?>, <?php echo $menengah_1 ?>],
|
||||
backgroundColor: [
|
||||
'rgba(255, 99, 132, 0.2)',
|
||||
'rgba(255, 99, 132, 0.2)'
|
||||
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(255, 99, 132, 1)',
|
||||
'rgba(255, 99, 132, 1)'
|
||||
],
|
||||
borderWidth: 1
|
||||
},
|
||||
{
|
||||
label: '<?php echo $tahun_0 ?>',
|
||||
data: [<?php echo $umkm_0 ?>, <?php echo $naker_0 ?>, <?php echo $mikro_0 ?>, <?php echo $kecil_0 ?>, <?php echo $menengah_0 ?>],
|
||||
backgroundColor: [
|
||||
'rgba(54, 162, 235, 0.2)',
|
||||
'rgba(54, 162, 235, 0.2)'
|
||||
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(54, 162, 235, 1)',
|
||||
'rgba(54, 162, 235, 1)'
|
||||
],
|
||||
borderWidth: 1
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#tabeldata').DataTable();
|
||||
} );
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const element = document.querySelectorAll('#btn_hapus')
|
||||
element.forEach(function(el){
|
||||
|
||||
el.addEventListener('click', function (e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
var urlToRedirect = e.currentTarget.getAttribute('href'); //use currentTarget because the click may be on the nested i tag and not a tag causing the href to be empty
|
||||
console.log(urlToRedirect); // verify if this is the right URL
|
||||
|
||||
swal({
|
||||
title: "Kamu yakin ?",
|
||||
text: "Data yang dihapus tidak bisa dikembalikan.",
|
||||
icon: "warning",
|
||||
buttons: [
|
||||
'Batal',
|
||||
'Hapus'
|
||||
],
|
||||
dangerMode: true,
|
||||
}).then(function(isConfirm) {
|
||||
if (isConfirm) {
|
||||
swal({
|
||||
title: 'Berhasil',
|
||||
text: 'Data berhasil terhapus',
|
||||
icon: 'success'
|
||||
}).then(function() {
|
||||
window.location.href = urlToRedirect;
|
||||
});
|
||||
} else {
|
||||
swal("Batal", "Data tidak terhapus.)", "error");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -198,39 +198,17 @@
|
|||
</div>
|
||||
<div class="spasi"> </div>
|
||||
<?php if(isset($tahun_0)){?>
|
||||
<div class="judul">
|
||||
<div class="judul" style="width:900px;text-align:left;font-size:14px;">
|
||||
PERBANDINGAN DENGAN TAHUN <?php echo $tahun_0 ?>
|
||||
</div>
|
||||
<div class="spasi"> </div>
|
||||
<div>
|
||||
<table>
|
||||
<table style="width:900px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Tahun</th>
|
||||
<th>Aset</th>
|
||||
<th>Omset</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php echo $tahun ?></td>
|
||||
<td><?php echo rupiah($aset_1) ?></td>
|
||||
<td><?php echo rupiah($omset_1) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $tahun_0 ?></td>
|
||||
<td><?php echo rupiah($aset_0) ?></td>
|
||||
<td><?php echo rupiah($omset_0) ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="spasi"> </div>
|
||||
<div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Jml UMKM</th>
|
||||
<th>Tenaga Kerja</th>
|
||||
<th>Mikro</th>
|
||||
|
@ -241,6 +219,8 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><?php echo $tahun ?></td>
|
||||
<td><?php echo rupiah($aset_1) ?></td>
|
||||
<td><?php echo rupiah($omset_1) ?></td>
|
||||
<td><?php echo $umkm_1 ?></td>
|
||||
<td><?php echo $naker_1 ?></td>
|
||||
<td><?php echo $mikro_1 ?></td>
|
||||
|
@ -248,7 +228,9 @@
|
|||
<td><?php echo $menengah_1 ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $tahun ?></td>
|
||||
<td><?php echo $tahun_0 ?></td>
|
||||
<td><?php echo rupiah($aset_0) ?></td>
|
||||
<td><?php echo rupiah($omset_0) ?></td>
|
||||
<td><?php echo $umkm_0 ?></td>
|
||||
<td><?php echo $naker_0 ?></td>
|
||||
<td><?php echo $mikro_0 ?></td>
|
||||
|
@ -258,6 +240,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php } else {?>
|
||||
|
|
|
@ -0,0 +1,449 @@
|
|||
<?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">
|
||||
|
||||
<!-- Bootstrap CSS -->
|
||||
<link rel="stylesheet" href="<?php echo base_url()?>assets/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="<?php echo base_url()?>assets/css/dataTables.bootstrap4.min.css">
|
||||
|
||||
<link data-require="sweet-alert@*" data-semver="0.4.2" rel="stylesheet" href="<?php echo base_url()?>assets/css/sweetalert.min.css" />
|
||||
|
||||
<link rel="icon" type="image/png" href="../../assets/images/favicon.png" />
|
||||
|
||||
<title>Aplikasi UMKM</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="#">
|
||||
<img src="<?php echo base_url()?>assets/images/logo-white.png" width="100" alt="">
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
|
||||
</ul>
|
||||
<form methode="POST" action="../login/logout" class="form-inline my-2 my-lg-0" >
|
||||
<button class="btn btn-outline-warning btn-sm my-2 my-sm-0" type="submit">Logout</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-3" style="cursor:pointer;">
|
||||
<div class="card">
|
||||
<div class="card-header text-center">
|
||||
<img src="<?php echo base_url()?>assets/images/<?php echo $user_logged->foto_user ?>" width="125" /><br>
|
||||
<strong><?php echo $user_logged->nama ?></strong>
|
||||
</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/dashboard" style="text-decoration:none;">
|
||||
<li class="list-group-item text-dark border-bottom">Data Pemilik UMKM</li>
|
||||
</a>
|
||||
<a href="<?php echo base_url('index.php/')?>admin/umkm" style="text-decoration:none;">
|
||||
<li class="list-group-item text-dark border-bottom">Data UMKM</li>
|
||||
</a>
|
||||
<a href="<?php echo base_url('index.php/')?>admin/absensi" style="text-decoration:none;">
|
||||
<li class="list-group-item text-dark border-bottom">Absensi</li>
|
||||
</a>
|
||||
<a href="<?php echo base_url('index.php/')?>admin/laporan" style="text-decoration:none;">
|
||||
<li class="list-group-item bg-primary text-white border-bottom">Laporan</li>
|
||||
</a>
|
||||
<a href="<?php echo base_url('index.php/')?>admin/setting" style="text-decoration:none;">
|
||||
<li class="list-group-item text-dark">Setting</li>
|
||||
</a>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-md-9 col-lg-9 col-sm-12 col-12">
|
||||
<div class="card">
|
||||
<h5 class="card-header">Laporan</h5>
|
||||
<div class="card-body">
|
||||
<div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/laporan" class="nav-link">Tahunan</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/laporanbulanan" class="nav-link">Bulanan</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/laporankecamatan" class="nav-link active">Kecamatan</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/laporankelurahan" class="nav-link">Kelurahan</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<div class="mt-3">
|
||||
<div>
|
||||
<form action="" method="POST" class="needs-validation">
|
||||
<div class="form-group">
|
||||
<label for="kecamatan">Pilih Kecamatan</label>
|
||||
<select name="kecamatan" class="form-control" id="kecamatan" onchange="this.form.submit()" required>
|
||||
<?php foreach($kecamatan_list as $list) {?>
|
||||
<option value="<?php echo $list['kecamatan'] ?>" <?php if($list['kecamatan']===$kecamatan){echo "selected";}?>>
|
||||
<?php echo $list['kecamatan'] ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php if($msg!=='empty'){?>
|
||||
<div class="row-container text-right mb-3">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/lapkecpdf?kecamatan=<?php echo $kecamatan ?>&tahun=<?php echo $tahun ?>" target="_blank" class="btn btn-sm btn-warning">Print / PDF</a>
|
||||
<a href="<?php echo base_url('index.php/')?>admin/lapkecxls?kecamatan=<?php echo $kecamatan ?>&tahun=<?php echo $tahun ?>" target="_blank" class="btn btn-sm btn-success">Export Excel</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($msg!=='empty'){?>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header bg-primary text-white">
|
||||
<div class="row">
|
||||
<div class="col col-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<h6>Data UMKM Kota Magelang Kecamatan <?php echo $kecamatan ?> <?php echo $tahun ?></h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<table class="table table-bordered table-sm text-center text-nowrap table-responsive table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="3"><small>No</small></th>
|
||||
<th rowspan="3"><small>kelurahan</small></th>
|
||||
<th rowspan="2" colspan="3"><small>Jml Umkm</small></th>
|
||||
<th rowspan="2" colspan="3"><small>Omset/Bulan</small></th>
|
||||
<th rowspan="2" colspan="3"><small>Aset</small></th>
|
||||
<th rowspan="1" colspan="6"><small>Jml Naker</small></th>
|
||||
<th rowspan="1" colspan="9"><small>Klasifikasi</small></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2"><small>P</small></th>
|
||||
<th colspan="2"><small>J</small></th>
|
||||
<th colspan="2"><small>I</small></th>
|
||||
|
||||
<th colspan="3"><small>P</small></th>
|
||||
<th colspan="3"><small>J</small></th>
|
||||
<th colspan="3"><small>I</small></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><small>P</small></th>
|
||||
<th><small>J</small></th>
|
||||
<th><small>I</small></th>
|
||||
|
||||
<th><small>P</small></th>
|
||||
<th><small>J</small></th>
|
||||
<th><small>I</small></th>
|
||||
|
||||
<th><small>P</small></th>
|
||||
<th><small>J</small></th>
|
||||
<th><small>I</small></th>
|
||||
|
||||
<th><small>L</small></th>
|
||||
<th><small>P</small></th>
|
||||
<th><small>L</small></th>
|
||||
<th><small>P</small></th>
|
||||
<th><small>L</small></th>
|
||||
<th><small>P</small></th>
|
||||
|
||||
<th><small>M</small></th>
|
||||
<th><small>K</small></th>
|
||||
<th><small>MN</small></th>
|
||||
<th><small>M</small></th>
|
||||
<th><small>K</small></th>
|
||||
<th><small>MN</small></th>
|
||||
<th><small>M</small></th>
|
||||
<th><small>K</small></th>
|
||||
<th><small>MN</small></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
$no=0;
|
||||
foreach($listlaporan as $laporan){
|
||||
$no++;
|
||||
?>
|
||||
<tr>
|
||||
<td><small><?php echo $no ?></small></td>
|
||||
<td class="text-left"><small><?php echo $laporan['kelurahan'] ?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jenis1'] ?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jenis2'] ?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jenis3'] ?></small></td>
|
||||
<td><small><?php echo rupiah($laporan['omset_jenis1']) ?></small></td>
|
||||
<td><small><?php echo rupiah($laporan['omset_jenis2']) ?></small></td>
|
||||
<td><small><?php echo rupiah($laporan['omset_jenis3']) ?></small></td>
|
||||
<td><small><?php echo rupiah($laporan['aset_jenis1']) ?></small></td>
|
||||
<td><small><?php echo rupiah($laporan['aset_jenis2']) ?></small></td>
|
||||
<td><small><?php echo rupiah($laporan['aset_jenis3']) ?></small></td>
|
||||
<td><small><?php echo $laporan['karyawan_jen1_l'] ?></small></td>
|
||||
<td><small><?php echo $laporan['karyawan_jen1_p'] ?></small></td>
|
||||
<td><small><?php echo $laporan['karyawan_jen2_l'] ?></small></td>
|
||||
<td><small><?php echo $laporan['karyawan_jen2_p'] ?></small></td>
|
||||
<td><small><?php echo $laporan['karyawan_jen3_l'] ?></small></td>
|
||||
<td><small><?php echo $laporan['karyawan_jen3_p'] ?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen1_kat1']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen1_kat2']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen1_kat3']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen2_kat1']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen2_kat2']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen2_kat3']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen3_kat1']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen3_kat2']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen3_kat3']?></small></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="2"><small>Total</small></th>
|
||||
<th><small><?php echo $umkm_jenis1 ?></small></th>
|
||||
<th><small><?php echo $umkm_jenis2 ?></small></th>
|
||||
<th><small><?php echo $umkm_jenis3 ?></small></th>
|
||||
<th><small><?php echo rupiah($omset_jenis1) ?></small></th>
|
||||
<th><small><?php echo rupiah($omset_jenis2) ?></small></th>
|
||||
<th><small><?php echo rupiah($omset_jenis3) ?></small></th>
|
||||
<th><small><?php echo rupiah($aset_jenis1) ?></small></th>
|
||||
<th><small><?php echo rupiah($aset_jenis2) ?></small></th>
|
||||
<th><small><?php echo rupiah($aset_jenis3) ?></small></th>
|
||||
<th><small><?php echo $karyawan_jen1_l ?></small></th>
|
||||
<th><small><?php echo $karyawan_jen1_p ?></small></th>
|
||||
<th><small><?php echo $karyawan_jen2_l ?></small></th>
|
||||
<th><small><?php echo $karyawan_jen2_p ?></small></th>
|
||||
<th><small><?php echo $karyawan_jen3_l ?></small></th>
|
||||
<th><small><?php echo $karyawan_jen3_p ?></small></th>
|
||||
<th><small><?php echo $umkm_jen1_kat1 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen1_kat2 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen1_kat3 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen2_kat1 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen2_kat2 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen2_kat3 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen3_kat1 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen3_kat2 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen3_kat3 ?></small></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>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?php } else {?>
|
||||
<div class="row-container text-center mt-3">
|
||||
<img src="<?php echo base_url()?>assets/images/search.png" width="150" /><br>
|
||||
<div class="alert alert-warning" role="alert">
|
||||
Tidak ada <strong>laporan yang sudah dibuat</strong> saat ini.
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Optional JavaScript -->
|
||||
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
||||
<script src="<?php echo base_url()?>assets/js/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||||
<script src="<?php echo base_url()?>assets/js/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
|
||||
<script src="<?php echo base_url()?>assets/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
|
||||
<script src="<?php echo base_url()?>assets/js/jquery.dataTables.min.js"></script>
|
||||
<script src="<?php echo base_url()?>assets/js/dataTables.bootstrap4.min.js"></script>
|
||||
<script src="<?php echo base_url()?>assets/js/sweetalert.min.js"></script>
|
||||
<script src="<?php echo base_url()?>assets/js/chart.js"></script>
|
||||
|
||||
<script>
|
||||
var ctx = document.getElementById('myChart').getContext('2d');
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: ['Aset', 'Omset'],
|
||||
datasets: [
|
||||
{
|
||||
label: '<?php echo $tahun ?>',
|
||||
data: [<?php echo $aset_1 ?>, <?php echo $omset_1 ?>],
|
||||
backgroundColor: [
|
||||
'rgba(255, 99, 132, 0.2)',
|
||||
'rgba(255, 99, 132, 0.2)'
|
||||
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(255, 99, 132, 1)',
|
||||
'rgba(255, 99, 132, 1)'
|
||||
],
|
||||
borderWidth: 1
|
||||
},
|
||||
{
|
||||
label: '<?php echo $tahun_0 ?>',
|
||||
data: [<?php echo $aset_0 ?>, <?php echo $omset_0 ?>],
|
||||
backgroundColor: [
|
||||
'rgba(54, 162, 235, 0.2)',
|
||||
'rgba(54, 162, 235, 0.2)'
|
||||
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(54, 162, 235, 1)',
|
||||
'rgba(54, 162, 235, 1)'
|
||||
],
|
||||
borderWidth: 1
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var ctx = document.getElementById('myChart2').getContext('2d');
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: ['Jml UMKM', 'Tenaga Kerja', 'Mikro', 'Kecil','Menengah'],
|
||||
datasets: [
|
||||
{
|
||||
label: '<?php echo $tahun ?>',
|
||||
data: [<?php echo $umkm_1 ?>, <?php echo $naker_1 ?>, <?php echo $mikro_1 ?>, <?php echo $kecil_1 ?>, <?php echo $menengah_1 ?>],
|
||||
backgroundColor: [
|
||||
'rgba(255, 99, 132, 0.2)',
|
||||
'rgba(255, 99, 132, 0.2)'
|
||||
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(255, 99, 132, 1)',
|
||||
'rgba(255, 99, 132, 1)'
|
||||
],
|
||||
borderWidth: 1
|
||||
},
|
||||
{
|
||||
label: '<?php echo $tahun_0 ?>',
|
||||
data: [<?php echo $umkm_0 ?>, <?php echo $naker_0 ?>, <?php echo $mikro_0 ?>, <?php echo $kecil_0 ?>, <?php echo $menengah_0 ?>],
|
||||
backgroundColor: [
|
||||
'rgba(54, 162, 235, 0.2)',
|
||||
'rgba(54, 162, 235, 0.2)'
|
||||
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(54, 162, 235, 1)',
|
||||
'rgba(54, 162, 235, 1)'
|
||||
],
|
||||
borderWidth: 1
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#tabeldata').DataTable();
|
||||
} );
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const element = document.querySelectorAll('#btn_hapus')
|
||||
element.forEach(function(el){
|
||||
|
||||
el.addEventListener('click', function (e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
var urlToRedirect = e.currentTarget.getAttribute('href'); //use currentTarget because the click may be on the nested i tag and not a tag causing the href to be empty
|
||||
console.log(urlToRedirect); // verify if this is the right URL
|
||||
|
||||
swal({
|
||||
title: "Kamu yakin ?",
|
||||
text: "Data yang dihapus tidak bisa dikembalikan.",
|
||||
icon: "warning",
|
||||
buttons: [
|
||||
'Batal',
|
||||
'Hapus'
|
||||
],
|
||||
dangerMode: true,
|
||||
}).then(function(isConfirm) {
|
||||
if (isConfirm) {
|
||||
swal({
|
||||
title: 'Berhasil',
|
||||
text: 'Data berhasil terhapus',
|
||||
icon: 'success'
|
||||
}).then(function() {
|
||||
window.location.href = urlToRedirect;
|
||||
});
|
||||
} else {
|
||||
swal("Batal", "Data tidak terhapus.)", "error");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,522 @@
|
|||
<?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">
|
||||
|
||||
<!-- Bootstrap CSS -->
|
||||
<link rel="stylesheet" href="<?php echo base_url()?>assets/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="<?php echo base_url()?>assets/css/dataTables.bootstrap4.min.css">
|
||||
|
||||
<link data-require="sweet-alert@*" data-semver="0.4.2" rel="stylesheet" href="<?php echo base_url()?>assets/css/sweetalert.min.css" />
|
||||
|
||||
<link rel="icon" type="image/png" href="../../assets/images/favicon.png" />
|
||||
|
||||
<title>Aplikasi UMKM</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="#">
|
||||
<img src="<?php echo base_url()?>assets/images/logo-white.png" width="100" alt="">
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
|
||||
</ul>
|
||||
<form methode="POST" action="../login/logout" class="form-inline my-2 my-lg-0" >
|
||||
<button class="btn btn-outline-warning btn-sm my-2 my-sm-0" type="submit">Logout</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-3" style="cursor:pointer;">
|
||||
<div class="card">
|
||||
<div class="card-header text-center">
|
||||
<img src="<?php echo base_url()?>assets/images/<?php echo $user_logged->foto_user ?>" width="125" /><br>
|
||||
<strong><?php echo $user_logged->nama ?></strong>
|
||||
</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/dashboard" style="text-decoration:none;">
|
||||
<li class="list-group-item text-dark border-bottom">Data Pemilik UMKM</li>
|
||||
</a>
|
||||
<a href="<?php echo base_url('index.php/')?>admin/umkm" style="text-decoration:none;">
|
||||
<li class="list-group-item text-dark border-bottom">Data UMKM</li>
|
||||
</a>
|
||||
<a href="<?php echo base_url('index.php/')?>admin/absensi" style="text-decoration:none;">
|
||||
<li class="list-group-item text-dark border-bottom">Absensi</li>
|
||||
</a>
|
||||
<a href="<?php echo base_url('index.php/')?>admin/laporan" style="text-decoration:none;">
|
||||
<li class="list-group-item bg-primary text-white border-bottom">Laporan</li>
|
||||
</a>
|
||||
<a href="<?php echo base_url('index.php/')?>admin/setting" style="text-decoration:none;">
|
||||
<li class="list-group-item text-dark">Setting</li>
|
||||
</a>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-md-9 col-lg-9 col-sm-12 col-12">
|
||||
<div class="card">
|
||||
<h5 class="card-header">Laporan</h5>
|
||||
<div class="card-body">
|
||||
<div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/laporan" class="nav-link">Tahunan</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/laporanbulanan" class="nav-link">Bulanan</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/laporankecamatan" class="nav-link">Kecamatan</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/laporankelurahan" class="nav-link active">Kelurahan</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<div class="mt-3">
|
||||
<div>
|
||||
<form action="" method="POST" class="needs-validation">
|
||||
<div class="form-group">
|
||||
<label for="kelurahan">Pilih Kelurahan</label>
|
||||
<select name="kelurahan" class="form-control" id="kelurahan" onchange="this.form.submit()" required>
|
||||
<?php foreach($kelurahan_list as $list) {?>
|
||||
<option value="<?php echo $list->kelurahan ?>" <?php if($list->kelurahan===$kelurahan){echo "selected";}?>>
|
||||
<?php echo $list->kelurahan ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php if($msg!=='empty'){?>
|
||||
<div class="row-container text-right mb-3">
|
||||
<a href="<?php echo base_url('index.php/')?>admin/lapkelpdf?kelurahan=<?php echo $kelurahan ?>&tahun=<?php echo $tahun ?>" target="_blank" class="btn btn-sm btn-warning">Print / PDF</a>
|
||||
<a href="<?php echo base_url('index.php/')?>admin/lapkelxls?kelurahan=<?php echo $kelurahan ?>&tahun=<?php echo $tahun ?>" target="_blank" class="btn btn-sm btn-success">Export Excel</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($msg!=='empty'){?>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header bg-primary text-white">
|
||||
<div class="row">
|
||||
<div class="col col-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<h6>Data UMKM Kota Magelang Kelurahan <?php echo $kelurahan ?> <?php echo $tahun ?></h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<table class="table table-bordered table-sm text-center text-nowrap table-responsive table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="align-middle" rowspan="3"><small>No</small></th>
|
||||
<th class="align-middle" rowspan="3"><small>kelurahan</small></th>
|
||||
<th class="align-middle" rowspan="2" colspan="3"><small>Jml Umkm</small></th>
|
||||
<th class="align-middle" rowspan="2" colspan="3"><small>Omset/Bulan</small></th>
|
||||
<th class="align-middle" rowspan="2" colspan="3"><small>Aset</small></th>
|
||||
<th class="align-middle" rowspan="1" colspan="6"><small>Jml Naker</small></th>
|
||||
<th class="align-middle" rowspan="1" colspan="9"><small>Klasifikasi</small></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2"><small>P</small></th>
|
||||
<th colspan="2"><small>J</small></th>
|
||||
<th colspan="2"><small>I</small></th>
|
||||
|
||||
<th colspan="3"><small>P</small></th>
|
||||
<th colspan="3"><small>J</small></th>
|
||||
<th colspan="3"><small>I</small></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><small>P</small></th>
|
||||
<th><small>J</small></th>
|
||||
<th><small>I</small></th>
|
||||
|
||||
<th><small>P</small></th>
|
||||
<th><small>J</small></th>
|
||||
<th><small>I</small></th>
|
||||
|
||||
<th><small>P</small></th>
|
||||
<th><small>J</small></th>
|
||||
<th><small>I</small></th>
|
||||
|
||||
<th><small>L</small></th>
|
||||
<th><small>P</small></th>
|
||||
<th><small>L</small></th>
|
||||
<th><small>P</small></th>
|
||||
<th><small>L</small></th>
|
||||
<th><small>P</small></th>
|
||||
|
||||
<th><small>M</small></th>
|
||||
<th><small>K</small></th>
|
||||
<th><small>MN</small></th>
|
||||
<th><small>M</small></th>
|
||||
<th><small>K</small></th>
|
||||
<th><small>MN</small></th>
|
||||
<th><small>M</small></th>
|
||||
<th><small>K</small></th>
|
||||
<th><small>MN</small></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
$no=0;
|
||||
foreach($listlaporan as $laporan){
|
||||
$no++;
|
||||
?>
|
||||
<tr>
|
||||
<td><small><?php echo $no ?></small></td>
|
||||
<td class="text-left"><small><?php echo $laporan['kelurahan'] ?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jenis1'] ?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jenis2'] ?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jenis3'] ?></small></td>
|
||||
<td><small><?php echo rupiah($laporan['omset_jenis1']) ?></small></td>
|
||||
<td><small><?php echo rupiah($laporan['omset_jenis2']) ?></small></td>
|
||||
<td><small><?php echo rupiah($laporan['omset_jenis3']) ?></small></td>
|
||||
<td><small><?php echo rupiah($laporan['aset_jenis1']) ?></small></td>
|
||||
<td><small><?php echo rupiah($laporan['aset_jenis2']) ?></small></td>
|
||||
<td><small><?php echo rupiah($laporan['aset_jenis3']) ?></small></td>
|
||||
<td><small><?php echo $laporan['karyawan_jen1_l'] ?></small></td>
|
||||
<td><small><?php echo $laporan['karyawan_jen1_p'] ?></small></td>
|
||||
<td><small><?php echo $laporan['karyawan_jen2_l'] ?></small></td>
|
||||
<td><small><?php echo $laporan['karyawan_jen2_p'] ?></small></td>
|
||||
<td><small><?php echo $laporan['karyawan_jen3_l'] ?></small></td>
|
||||
<td><small><?php echo $laporan['karyawan_jen3_p'] ?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen1_kat1']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen1_kat2']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen1_kat3']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen2_kat1']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen2_kat2']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen2_kat3']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen3_kat1']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen3_kat2']?></small></td>
|
||||
<td><small><?php echo $laporan['umkm_jen3_kat3']?></small></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="2"><small>Total</small></th>
|
||||
<th><small><?php echo $umkm_jenis1 ?></small></th>
|
||||
<th><small><?php echo $umkm_jenis2 ?></small></th>
|
||||
<th><small><?php echo $umkm_jenis3 ?></small></th>
|
||||
<th><small><?php echo rupiah($omset_jenis1) ?></small></th>
|
||||
<th><small><?php echo rupiah($omset_jenis2) ?></small></th>
|
||||
<th><small><?php echo rupiah($omset_jenis3) ?></small></th>
|
||||
<th><small><?php echo rupiah($aset_jenis1) ?></small></th>
|
||||
<th><small><?php echo rupiah($aset_jenis2) ?></small></th>
|
||||
<th><small><?php echo rupiah($aset_jenis3) ?></small></th>
|
||||
<th><small><?php echo $karyawan_jen1_l ?></small></th>
|
||||
<th><small><?php echo $karyawan_jen1_p ?></small></th>
|
||||
<th><small><?php echo $karyawan_jen2_l ?></small></th>
|
||||
<th><small><?php echo $karyawan_jen2_p ?></small></th>
|
||||
<th><small><?php echo $karyawan_jen3_l ?></small></th>
|
||||
<th><small><?php echo $karyawan_jen3_p ?></small></th>
|
||||
<th><small><?php echo $umkm_jen1_kat1 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen1_kat2 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen1_kat3 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen2_kat1 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen2_kat2 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen2_kat3 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen3_kat1 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen3_kat2 ?></small></th>
|
||||
<th><small><?php echo $umkm_jen3_kat3 ?></small></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>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header bg-primary text-white">
|
||||
<div class="row">
|
||||
<div class="col col-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<h6>Daftar UMKM <?php echo $kelurahan ?> Tahun <?php echo $tahun ?></h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row mt-3 table-responsive">
|
||||
<table id="tabeldata" class="table table-sm table-bordered table-striped text-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="align-middle" rowspan="2"><small>No</small></th>
|
||||
<th class="align-middle" rowspan="2"><small>Nama UMKM</small></th>
|
||||
<th class="align-middle" rowspan="2"><small>Pemilik</small></th>
|
||||
<th class="align-middle" rowspan="2"><small>Kelurahan</small></th>
|
||||
<th class="align-middle" rowspan="2"><small>Alamat</small></th>
|
||||
<th class="align-middle" rowspan="2"><small>Telp</small></th>
|
||||
<th class="align-middle" rowspan="2"><small>Deskripsi</small></th>
|
||||
|
||||
<th class="align-middle" rowspan="2"><small>Jenis</small></th>
|
||||
<th class="align-middle" rowspan="2"><small>Omset/Bulan</small></th>
|
||||
<th class="align-middle" rowspan="2"><small>Aset</small></th>
|
||||
<th class="align-middle" colspan="2"><small>Naker</small></th>
|
||||
<th class="align-middle" rowspan="2"><small>Skala Usaha</small></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><small>L</small></th>
|
||||
<th><small>P</small></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><small><?php echo $no ?></small></td>
|
||||
<td class="text-left text-nowrap"><small><?php echo $usaha->nama?></small></td>
|
||||
<td class="text-left text-nowrap"><small><?php echo $umkm->nama?></small></td>
|
||||
<td class="text-left"><small><?php echo $umkm->kelurahan ?></small></td>
|
||||
<td class="text-left"><small><?php echo $usaha->alamat ?></small></td>
|
||||
<td><small><?php echo $usaha->telp ?></small></td>
|
||||
<td class="text-left"><small><?php echo $usaha->deskripsi ?></small></td>
|
||||
<td><small><?php echo $jenis->jenis ?></small></td>
|
||||
<td class="text-left"><small><?php echo rupiah($r_omset) ?></small></td>
|
||||
<td class="text-left"><small><?php echo rupiah($umkm->aset) ?></small></td>
|
||||
<td><small><?php echo $umkm->karyawan_l ?></small></td>
|
||||
<td><small><?php echo $umkm->karyawan_p ?></small></td>
|
||||
<td><small><?php echo $kategori->kategori ?></small></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?php } else {?>
|
||||
<div class="row-container text-center mt-3">
|
||||
<img src="<?php echo base_url()?>assets/images/search.png" width="150" /><br>
|
||||
<div class="alert alert-warning" role="alert">
|
||||
Tidak ada <strong>laporan yang sudah dibuat</strong> saat ini.
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Optional JavaScript -->
|
||||
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
||||
<script src="<?php echo base_url()?>assets/js/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||||
<script src="<?php echo base_url()?>assets/js/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
|
||||
<script src="<?php echo base_url()?>assets/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
|
||||
<script src="<?php echo base_url()?>assets/js/jquery.dataTables.min.js"></script>
|
||||
<script src="<?php echo base_url()?>assets/js/dataTables.bootstrap4.min.js"></script>
|
||||
<script src="<?php echo base_url()?>assets/js/sweetalert.min.js"></script>
|
||||
<script src="<?php echo base_url()?>assets/js/chart.js"></script>
|
||||
|
||||
<script>
|
||||
var ctx = document.getElementById('myChart').getContext('2d');
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: ['Aset', 'Omset'],
|
||||
datasets: [
|
||||
{
|
||||
label: '<?php echo $tahun ?>',
|
||||
data: [<?php echo $aset_1 ?>, <?php echo $omset_1 ?>],
|
||||
backgroundColor: [
|
||||
'rgba(255, 99, 132, 0.2)',
|
||||
'rgba(255, 99, 132, 0.2)'
|
||||
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(255, 99, 132, 1)',
|
||||
'rgba(255, 99, 132, 1)'
|
||||
],
|
||||
borderWidth: 1
|
||||
},
|
||||
{
|
||||
label: '<?php echo $tahun_0 ?>',
|
||||
data: [<?php echo $aset_0 ?>, <?php echo $omset_0 ?>],
|
||||
backgroundColor: [
|
||||
'rgba(54, 162, 235, 0.2)',
|
||||
'rgba(54, 162, 235, 0.2)'
|
||||
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(54, 162, 235, 1)',
|
||||
'rgba(54, 162, 235, 1)'
|
||||
],
|
||||
borderWidth: 1
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var ctx = document.getElementById('myChart2').getContext('2d');
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: ['Jml UMKM', 'Tenaga Kerja', 'Mikro', 'Kecil','Menengah'],
|
||||
datasets: [
|
||||
{
|
||||
label: '<?php echo $tahun ?>',
|
||||
data: [<?php echo $umkm_1 ?>, <?php echo $naker_1 ?>, <?php echo $mikro_1 ?>, <?php echo $kecil_1 ?>, <?php echo $menengah_1 ?>],
|
||||
backgroundColor: [
|
||||
'rgba(255, 99, 132, 0.2)',
|
||||
'rgba(255, 99, 132, 0.2)'
|
||||
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(255, 99, 132, 1)',
|
||||
'rgba(255, 99, 132, 1)'
|
||||
],
|
||||
borderWidth: 1
|
||||
},
|
||||
{
|
||||
label: '<?php echo $tahun_0 ?>',
|
||||
data: [<?php echo $umkm_0 ?>, <?php echo $naker_0 ?>, <?php echo $mikro_0 ?>, <?php echo $kecil_0 ?>, <?php echo $menengah_0 ?>],
|
||||
backgroundColor: [
|
||||
'rgba(54, 162, 235, 0.2)',
|
||||
'rgba(54, 162, 235, 0.2)'
|
||||
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(54, 162, 235, 1)',
|
||||
'rgba(54, 162, 235, 1)'
|
||||
],
|
||||
borderWidth: 1
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#tabeldata').DataTable();
|
||||
} );
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const element = document.querySelectorAll('#btn_hapus')
|
||||
element.forEach(function(el){
|
||||
|
||||
el.addEventListener('click', function (e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
var urlToRedirect = e.currentTarget.getAttribute('href'); //use currentTarget because the click may be on the nested i tag and not a tag causing the href to be empty
|
||||
console.log(urlToRedirect); // verify if this is the right URL
|
||||
|
||||
swal({
|
||||
title: "Kamu yakin ?",
|
||||
text: "Data yang dihapus tidak bisa dikembalikan.",
|
||||
icon: "warning",
|
||||
buttons: [
|
||||
'Batal',
|
||||
'Hapus'
|
||||
],
|
||||
dangerMode: true,
|
||||
}).then(function(isConfirm) {
|
||||
if (isConfirm) {
|
||||
swal({
|
||||
title: 'Berhasil',
|
||||
text: 'Data berhasil terhapus',
|
||||
icon: 'success'
|
||||
}).then(function() {
|
||||
window.location.href = urlToRedirect;
|
||||
});
|
||||
} else {
|
||||
swal("Batal", "Data tidak terhapus.)", "error");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -204,31 +204,9 @@
|
|||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Tahun</th>
|
||||
<th>Aset</th>
|
||||
<th>Omset</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php echo $tahun ?></td>
|
||||
<td><?php echo rupiah($aset_1) ?></td>
|
||||
<td><?php echo rupiah($omset_1) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $tahun_0 ?></td>
|
||||
<td><?php echo rupiah($aset_0) ?></td>
|
||||
<td><?php echo rupiah($omset_0) ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="spasi"> </div>
|
||||
<div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Jml UMKM</th>
|
||||
<th>Tenaga Kerja</th>
|
||||
<th>Mikro</th>
|
||||
|
@ -239,6 +217,8 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><?php echo $tahun ?></td>
|
||||
<td><?php echo rupiah($aset_1) ?></td>
|
||||
<td><?php echo rupiah($omset_1) ?></td>
|
||||
<td><?php echo $umkm_1 ?></td>
|
||||
<td><?php echo $naker_1 ?></td>
|
||||
<td><?php echo $mikro_1 ?></td>
|
||||
|
@ -246,7 +226,9 @@
|
|||
<td><?php echo $menengah_1 ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $tahun ?></td>
|
||||
<td><?php echo $tahun_0 ?></td>
|
||||
<td><?php echo rupiah($aset_0) ?></td>
|
||||
<td><?php echo rupiah($omset_0) ?></td>
|
||||
<td><?php echo $umkm_0 ?></td>
|
||||
<td><?php echo $naker_0 ?></td>
|
||||
<td><?php echo $mikro_0 ?></td>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
-- https://www.phpmyadmin.net/
|
||||
--
|
||||
-- Host: 127.0.0.1
|
||||
-- Generation Time: Sep 18, 2021 at 04:05 PM
|
||||
-- Generation Time: Sep 19, 2021 at 02:23 PM
|
||||
-- Server version: 10.4.21-MariaDB
|
||||
-- PHP Version: 7.4.23
|
||||
|
||||
|
|
Loading…
Reference in New Issue