tambah data kpi untuk operasi dan HR

This commit is contained in:
Nur Izzati Zulkifli
2023-07-27 10:00:50 +08:00
parent e249b46db2
commit 84231e828c
23 changed files with 2826 additions and 1 deletions
+4
View File
@@ -428,6 +428,10 @@ class HomeController extends Controller
if ($user->hasRole('callcenter')) {
return view('homecallcenter');
} else if ($user->hasRole('operasi-kpi')) {
return view('homeoperasikpi');
} else if ($user->hasRole('hr')) {
return view('homehr');
} else if ($user->hasRole('admin')) {
return view('homeadmin');
} else if ($user->hasRole('account')) {
+752
View File
@@ -0,0 +1,752 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Carbon\Carbon;
use App\Models\Cawangan;
use App\Models\Tetapan;
use App\Models\CawanganKpi;
use App\Models\DataKpi;
use App\Models\Jawatan;
use App\Models\UserKaunter;
use App\Models\Gadai;
use App\Models\TransaksiKeuntungan;
use Illuminate\Support\Facades\Http;
use App\Services\RingkasanHarianServices;
use PDF;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input;
class KpiController extends Controller
{
//
public function __construct()
{
$this->middleware('auth');
}
public function janaekpi()
{
$currentDate = Carbon::now();
$currentDate = $currentDate->toDateString();
$caw = Cawangan::all();
// $bulan = Bulan::all();
// $tahun = Tahun::all();
$years = [];
for ($year=2023; $year <= 2024; $year++) $years[$year] = $year;
$jawatan = Jawatan::all();
// dd($bulan);
$tetapan = Tetapan::where('id','=',1)->first();
return view('kpi.janakpi',compact('caw','tetapan', 'currentDate','years','jawatan'));
}
public function senaraitempkpi(Request $request)
{
$bulan = $request->month;
$tahun = $request->year;
$jawatan = $request->jawatan[0];
$mula = date("Y-m-d",strtotime("$tahun-$bulan-01")); //2023-01-01
$hingga = date("Y-m-t",strtotime("$tahun-$bulan-01")); //2023-01-31
if($jawatan == 'pc'){
$cawangan_all = Cawangan::orderBy('caw_name')->get();
$nama_jawatan = Jawatan::where('idjawatan', $jawatan)->first();
$senarai = [];
foreach($cawangan_all as $cawangan){
$getnamapc = UserKaunter::where('cawangan',$cawangan->caw_code)
->where('role_asal', $jawatan)
->first();
$toarray=$getnamapc->toArray();
// dd($toarray['name']);
$checkExisting = CawanganKpi::where('namastaff', '=', $toarray['name'])
->where('tahun_kpi', '=', date('Y'))
->where('tahun', '=', $tahun)
->where('bulan', '=', $bulan)
->get();
// dd($checkExisting);
if ($checkExisting->isEmpty()) {
$kodcaw = $cawangan->caw_code;
// $ringkasan = new RingkasanHarianServices();
// $laporan_ringkasan = $ringkasan->getRingkasanHarian($mula,$hingga,$kodcaw);
$laporan_ringkasan = Http::get(config('app.api_url'). 'get/ringkasanharian/' ,[
'mula' => $mula,
'hingga' => $hingga,
'kodcaw' => $kodcaw,
])->json();
$data = [
'nama_staff'=>$getnamapc['name'],
'nokpstaff'=>$getnamapc['no_kp'],
'kodcaw'=>$cawangan->caw_code,
'caw_name'=>$cawangan->caw_name,
'namajawatan'=>$nama_jawatan->namajawatan,
'laporan_ringkasan' => $laporan_ringkasan ? $laporan_ringkasan : '',
];
array_push($senarai,$data);
}
// dump($data);
}
}
else if($jawatan == 'ppc'){
$cawangan_all = Cawangan::orderBy('caw_name')->get();
$nama_jawatan = Jawatan::where('idjawatan', $jawatan)->first();
$senarai = [];
foreach($cawangan_all as $cawangan){
$getnamapc = UserKaunter::where('cawangan', $cawangan->caw_code)
->where('role_asal', $jawatan)
->first();
$toarray=$getnamapc->toArray();
$checkExisting = CawanganKpi::where('namastaff', '=', $toarray['name'])
->where('tahun_kpi', '=', date('Y'))
->where('tahun', '=', $tahun)
->where('bulan', '=', $bulan)
->get();
// dd($checkExisting);
if ($checkExisting->isEmpty()) {
$kodcaw = $cawangan->caw_code;
// $ringkasan = new RingkasanHarianServices();
// $laporan_ringkasan = $ringkasan->getRingkasanHarian($mula,$hingga,$kodcaw);
$laporan_ringkasan = Http::get(config('app.api_url'). 'get/ringkasanharian/' ,[
'mula' => $mula,
'hingga' => $hingga,
'kodcaw' => $kodcaw,
])->json();
$aging = Http::get(config('app.api_url'). 'laporan/aging',[
'kodcaw' => $kodcaw,
'tahun'=>$tahun,
'bulan'=>$bulan
])->json();
$data = [
// 'cawid'=>$getnamapc['name'],
'nama_staff'=>$getnamapc['name'],
'nokpstaff'=>$getnamapc['no_kp'],
'kodcaw'=>$cawangan->caw_code,
'caw_name'=>$cawangan->caw_name,
'namajawatan'=>$nama_jawatan->namajawatan,
'laporan_ringkasan' => $laporan_ringkasan ? $laporan_ringkasan : '',
'aging' => $aging ? $aging : '',
];
array_push($senarai,$data);
}
}
}
else if($jawatan == 'teller'){
$cawangan_all = Cawangan::orderBy('caw_name')->get();
$nama_jawatan = Jawatan::where('idjawatan', $jawatan)->first();
$senarai = [];
// dd($cawangan_all);
foreach($cawangan_all as $cawangan){
// dd($getnamapc);
$kodcaw = $cawangan->caw_code;
// $ringkasan = new RingkasanHarianServices();
// $laporan_ringkasan = $ringkasan->getRingkasanHarian($mula,$hingga,$kodcaw);
$laporan_ringkasan = Http::get(config('app.api_url'). 'get/ringkasanharian/' ,[
'mula' => $mula,
'hingga' => $hingga,
'kodcaw' => $kodcaw,
])->json();
$getnamateller = UserKaunter::where('cawangan', $cawangan->caw_code)
->where('role_asal', $jawatan)
->whereNotIn('name', ['LELONG'])
->orderBy('name','desc')
->get();
// dd($getnamateller);
$pluckteller = $getnamateller->pluck('name')->toArray();
$nokpstaff = $getnamateller->keyBy('no_kp')->toArray();
// dd($plucktellernokp);
$gadai = Http::get(config('app.api_url'). 'getLaporanGadaiRangeDatebyTeller/'. $kodcaw,[
'mula' => $mula,
'akhir' => $hingga,
'teller'=> $pluckteller,
])->json();
foreach($gadai as $index=>$datateller){
$getnokpteller = UserKaunter::where('cawangan', $cawangan->caw_code)
->where('name', $datateller['teller'])
->first();
$gadai[$index]['nokpstaff'] = $getnokpteller['no_kp'];
}
$toarray=$getnokpteller->toArray();
$checkExisting = CawanganKpi::where('namastaff', '=', $toarray['name'])
->where('tahun_kpi', '=', date('Y'))
->where('tahun', '=', $tahun)
->where('bulan', '=', $bulan)
->where('jawatan', '=', 'teller')
->get();
// dd($checkExisting);
if ($checkExisting->isEmpty()) {
$tebus = Http::get(config('app.api_url'). 'getLaporanTebusRangeDatebyTeller/'. $kodcaw,[
'mula' => $mula,
'akhir' => $hingga,
'teller'=> $pluckteller,
])->json();
$data = [
'nokpstaff'=>$nokpstaff,
'kodcaw'=>$cawangan->caw_code,
'caw_name'=>$cawangan->caw_name,
'namajawatan'=>$nama_jawatan->namajawatan,
'laporan_ringkasan' => $laporan_ringkasan ? $laporan_ringkasan : '',
'gadai' => $gadai ? $gadai : '',
'tebus' => $tebus ? $tebus : '',
];
array_push($senarai,$data);
}
}
}
else if($jawatan == 'penilai'){
$cawangan_all = Cawangan::orderBy('caw_name')->get();
$nama_jawatan = Jawatan::where('idjawatan', $jawatan)->first();
$senarai = [];
foreach($cawangan_all as $cawangan){
$kodcaw = $cawangan->caw_code;
$laporan_ringkasan = Http::get(config('app.api_url'). 'get/ringkasanharian/' ,[
'mula' => $mula,
'hingga' => $hingga,
'kodcaw' => $kodcaw,
])->json();
$gadaipenilai = Http::get(config('app.api_url'). 'getLaporanGadaiRangeDatebyPenilai/'. $kodcaw,[
'mula' => $mula,
'akhir' => $hingga
])->json();
foreach($gadaipenilai as $index=>$datapenilai){
$getnokppenilai = UserKaunter::where('cawangan', $cawangan->caw_code)
->where('name', $datapenilai['penilai'])
->first();
$gadaipenilai[$index]['nokpstaff'] = $getnokppenilai['no_kp'] ? $getnokppenilai['no_kp'] : '';
}
$toarray=$getnokppenilai->toArray();
$checkExisting = CawanganKpi::where('namastaff', '=', $toarray['name'])
->where('tahun_kpi', '=', date('Y'))
->where('tahun', '=', $tahun)
->where('bulan', '=', $bulan)
->where('jawatan', '=', 'penilai')
->get();
// dd($checkExisting);
if ($checkExisting->isEmpty()) {
$data = [
'kodcaw'=>$cawangan->caw_code,
'caw_name'=>$cawangan->caw_name,
'namajawatan'=>$nama_jawatan->namajawatan,
'laporan_ringkasan' => $laporan_ringkasan ? $laporan_ringkasan : '',
'gadaipenilai' => $gadaipenilai ? $gadaipenilai : '',
];
array_push($senarai,$data);
}
// dd($data);
}
}
// dd($data);
// if($total_bil_lelong == 0)
// {
// return redirect()->route('notisperingatan.jananotisperingatan')
// ->with('failed','Tiada surat untuk di dijana');
// }
// dd($data);
return view('kpi.senaraitempkpi', compact(
// 'getsurat',
'senarai',
'nama_jawatan',
'tahun',
'bulan',
'jawatan'
));
}
public function savedatakpi(Request $request)
{
// dd($request->all());
$jawatan = $request->jawatan;
$bulan = $request->bulan;
$tahun = $request->tahun;
$mula = date("Y-m-d",strtotime("$tahun-$bulan-01")); //2023-01-01
$hingga = date("Y-m-t",strtotime("$tahun-$bulan-01")); //2023-01-31
$current = Carbon::now();
$current = new Carbon();
$currentNow = Carbon::now();
$tarikh_savekpi = $current->toDateString();
$selected_caw = $request->kodcaw;
// dd($request->caw);
// if(!empty($selected_caw))
$cawangan_all = Cawangan::whereIn('caw_code',$selected_caw)->get();
// dd($caws);
$bil_surat = 0;
$senarai = [];
if($jawatan == 'pc'){
$datakpi_temp_arr = [];
foreach($request->nama_staff as $key => $datastaff){
$checkExisting = CawanganKpi::where('namastaff', '=', $request->nama_staff[$key])
->where('tahun_kpi', '=', date('Y'))
->where('tahun', '=', $request->tahun)
->where('bulan', '=', $request->bulan)
->get();
if ($checkExisting->isEmpty()) {
$cawangan = Cawangan::where('caw_code',$request->kodcaw[$key])->first();
$caw_kpi = new CawanganKpi;
$caw_kpi->caw_id = $cawangan->id;
$caw_kpi->kodcaw = $request->kodcaw[$key];
$caw_kpi->tahun_kpi = date('Y');
$caw_kpi->tahun = $request->tahun;
$caw_kpi->bulan = $request->bulan;
$caw_kpi->jawatan = $request->jawatan;
$caw_kpi->namastaff = $request->nama_staff[$key];
$caw_kpi->nokpstaff = $request->nokpstaff[$key];
$caw_kpi->status_jana = 1;
$caw_kpi->save();
$datakpi_to_be_inserted = [
'idcawkpi' => $caw_kpi->id,
'caw_id' => $cawangan->id,
'kodcaw' => $request->kodcaw[$key],
'tahun_kpi' => date('Y'),
'tahun' => $request->tahun,
'bulan' => $request->bulan,
'jawatan' => $request->jawatan,
'namastaff' => $request->nama_staff[$key],
'nokpstaff' => $request->nokpstaff[$key],
'pc_bilpembiayaan' => $request->bilangan_gadai[$key],
'pc_pembiayaan' => $request->total_gadai[$key],
'pc_pendapatan' => $request->pendapatan[$key],
'pc_pelangganbaru' => $request->bilangan_customer_baru[$key],
'created_at' => $currentNow,
'updated_at' => $currentNow,
];
array_push($datakpi_temp_arr, $datakpi_to_be_inserted);
}
else {
return redirect()
->route('janakpi.janaekpi')
->with('failed', 'Maaf, Bulan dan Tahun KPI bagi nama staff ini telah wujud dalam db.');
}
}
DataKpi::insert($datakpi_temp_arr);
}
else if($jawatan == 'ppc'){
$datakpi_temp_arr = [];
foreach ($request->nama_staff as $key => $datastaff) {
$checkExisting = CawanganKpi::where('namastaff', '=', $request->nama_staff[$key])
->where('tahun_kpi', '=', date('Y'))
->where('tahun', '=', $request->tahun)
->where('bulan', '=', $request->bulan)
->get();
if ($checkExisting->isEmpty()) {
$cawangan = Cawangan::where('caw_code',$request->kodcaw[$key])->first();
// dd($cawangan);
$caw_kpi = new CawanganKpi;
$caw_kpi->caw_id = $cawangan->id;
$caw_kpi->kodcaw = $request->kodcaw[$key];
$caw_kpi->tahun_kpi = date('Y');
$caw_kpi->tahun = $request->tahun;
$caw_kpi->bulan = $request->bulan;
$caw_kpi->jawatan = $request->jawatan;
$caw_kpi->namastaff = $request->nama_staff[$key];
$caw_kpi->nokpstaff = $request->nokpstaff[$key];
$caw_kpi->status_jana = 1;
$caw_kpi->save();
$datakpi_to_be_inserted = [
'idcawkpi' => $caw_kpi->id,
'caw_id' => $cawangan->id,
'kodcaw' => $request->kodcaw[$key],
'tahun_kpi' => date('Y'),
'tahun' => $request->tahun,
'bulan' => $request->bulan,
'jawatan' => $request->jawatan,
'namastaff' => $request->nama_staff[$key],
'nokpstaff' => $request->nokpstaff[$key],
'ppc_aging1' => $request->aging1[$key],
'ppc_aging2' => $request->aging2[$key],
'ppc_aging3' => $request->aging3[$key],
'ppc_penebusan' => $request->total_tebus[$key],
'created_at' => $currentNow,
'updated_at' => $currentNow,
];
array_push($datakpi_temp_arr, $datakpi_to_be_inserted);
}
else {
return redirect()
->route('janakpi.janaekpi')
->with('failed', 'Maaf, Bulan dan Tahun KPI bagi nama staff ini telah wujud dalam db.');
}
}
DataKpi::insert($datakpi_temp_arr);
}
else if($jawatan == 'teller'){
// dd($request->all());
$datakpi_temp_arr = [];
foreach($request->nama_staff as $key => $datastaff){
$checkExisting = CawanganKpi::where('namastaff', '=', $request->nama_staff[$key])
->where('tahun_kpi', '=', date('Y'))
->where('tahun', '=', $request->tahun)
->where('bulan', '=', $request->bulan)
->where('jawatan', '=', $request->jawatan)
->get();
if ($checkExisting->isEmpty()) {
$cawangan = Cawangan::where('caw_code',$request->kodcaw[$key])->first();
$caw_kpi = new CawanganKpi;
$caw_kpi->caw_id = $cawangan->id;
$caw_kpi->kodcaw = $request->kodcaw[$key];
$caw_kpi->tahun_kpi = date('Y');
$caw_kpi->tahun = $request->tahun;
$caw_kpi->bulan = $request->bulan;
$caw_kpi->jawatan = $request->jawatan;
$caw_kpi->namastaff = $request->nama_staff[$key];
$caw_kpi->nokpstaff = $request->nokpstaff[$key];
$caw_kpi->status_jana = 1;
$caw_kpi->save();
$datakpi_to_be_inserted = [
'idcawkpi' => $caw_kpi->id,
'caw_id' => $cawangan->id,
'kodcaw' => $request->kodcaw[$key],
'tahun_kpi' => date('Y'),
'tahun' => $request->tahun,
'bulan' => $request->bulan,
'jawatan' => $request->jawatan,
'namastaff' => $request->nama_staff[$key],
'nokpstaff' => $request->nokpstaff[$key],
'teller_bilgadai' => $request->total_gadai[$key],
'teller_pembiayaan' => $request->total_pembiayaan[$key],
'teller_biltebus' => $request->total_tebus[$key],
'teller_tebuspembiayaan' => $request->total_penebusan[$key],
'created_at' => $currentNow,
'updated_at' => $currentNow,
];
array_push($datakpi_temp_arr, $datakpi_to_be_inserted);
}
else {
return redirect()
->route('janakpi.janaekpi')
->with('failed', 'Maaf, Bulan dan Tahun KPI bagi nama staff ini telah wujud dalam db.');
}
}
DataKpi::insert($datakpi_temp_arr);
}
else if($jawatan == 'penilai'){
// dd($request->all());
$datakpi_temp_arr = [];
foreach($request->nama_staff as $key => $datastaff){
$checkExisting = CawanganKpi::where('namastaff', '=', $request->nama_staff[$key])
->where('tahun_kpi', '=', date('Y'))
->where('tahun', '=', $request->tahun)
->where('bulan', '=', $request->bulan)
->where('jawatan', '=', $request->jawatan)
->get();
if ($checkExisting->isEmpty()) {
$cawangan = Cawangan::where('caw_code',$request->kodcaw[$key])->first();
$caw_kpi = new CawanganKpi;
$caw_kpi->caw_id = $cawangan->id;
$caw_kpi->kodcaw = $request->kodcaw[$key];
$caw_kpi->tahun_kpi = date('Y');
$caw_kpi->tahun = $request->tahun;
$caw_kpi->bulan = $request->bulan;
$caw_kpi->jawatan = $request->jawatan;
$caw_kpi->namastaff = $request->nama_staff[$key];
$caw_kpi->nokpstaff = $request->nokpstaff[$key];
$caw_kpi->status_jana = 1;
$caw_kpi->save();
$datakpi_to_be_inserted = [
'idcawkpi' => $caw_kpi->id,
'caw_id' => $cawangan->id,
'kodcaw' => $request->kodcaw[$key],
'tahun_kpi' => date('Y'),
'tahun' => $request->tahun,
'bulan' => $request->bulan,
'jawatan' => $request->jawatan,
'namastaff' => $request->nama_staff[$key],
'nokpstaff' => $request->nokpstaff[$key],
'penilai_bilgadai' => $request->total_gadai[$key],
'penilai_pembiayaan' => $request->total_pembiayaan[$key],
'created_at' => $currentNow,
'updated_at' => $currentNow,
];
array_push($datakpi_temp_arr, $datakpi_to_be_inserted);
}
else {
return redirect()
->route('janakpi.janaekpi')
->with('failed', 'Maaf, Bulan dan Tahun KPI bagi nama staff ini telah wujud dalam db.');
}
}
DataKpi::insert($datakpi_temp_arr);
}
//}
// else
// {
// return redirect()->route('janakpi.janaekpi')->with('failed','Tiada surat untuk di jana');
// }
return redirect()->route('janakpi.janaekpi')
->with('success',"Berjaya Daftar KPI ".$jawatan.' ('.$bulan.'/'.$tahun.')');
// return redirect()->route('analisa.senaraisimulasi')->with('success',"Success daftar simulasi!");
}
Public function listdatakpi(){
$tahunkpi = date('Y');
$senarai = [];
$cawangan_all = Cawangan::with(['cawanganKpi'])
->withCount(['cawanganKpi' => function ($query) use ($tahunkpi) {
$query->where('tahun_kpi', $tahunkpi);
}])
->orderBy('caw_name','ASC')
->get();
foreach($cawangan_all as $index3=>$cawangan){
$getnamastaff = CawanganKpi::where('kodcaw', $cawangan->caw_code)
->groupBy('nokpstaff')
->get();
$kodcaw = $cawangan->caw_code;
$data = [
'namastaff'=>$getnamastaff->toArray(),
'nokpstaff'=>$getnamastaff->toArray(),
];
array_push($senarai,$data);
// dd($data);
$cawangan_all_groupby_caw = $cawangan->groupBy('caw_code');
$cawangan_all[$index3]["cawangan_info"] = $cawangan;
$cawangan_all[$index3]["namastaff"] = $getnamastaff;
}
return view('kpi.datakpibycaw',compact('cawangan_all','senarai'));
}
Public function listdatakpidetail($nokpstaff,$kodcaw, Request $request){
$getnamastaff = CawanganKpi::where('kodcaw', $kodcaw)
->where('nokpstaff',$nokpstaff)
->first();
// dd($getnamastaff);
$jawatan = Jawatan::where('idjawatan', $getnamastaff->jawatan)
->get();
$bycaw_all = CawanganKpi::with(['cawangan','dataKpi'=> function ($query) use ($jawatan) {
$query->where('jawatan', $jawatan[0]['idjawatan'])
->orderByRaw('CONVERT(bulan, SIGNED) asc')
->orderByRaw('CONVERT(tahun, SIGNED) asc');
}])
->where('nokpstaff',$nokpstaff)
->where('kodcaw',$kodcaw)
->where('jawatan',$jawatan[0]['idjawatan'])
->get();
foreach($bycaw_all as $index3=>$listbatch){
$bycaw_all_groupby_caw = $listbatch->groupBy('lelong_id');
$bycaw_all[$index3]["datakpi_info"] = $listbatch->dataKpi;
$bycaw_all[$index3]["nama_caw"] = $listbatch->cawangan->caw_name;
}
return view('kpi.datakpibycawdetail',compact('getnamastaff','bycaw_all','jawatan','kodcaw'));
}
Public function checkpenilai($nokpstaff,$jawatan){
$getnamastaff = CawanganKpi::where('nokpstaff', $nokpstaff)
->where('jawatan',$jawatan)
->first();
// dd($getnamastaff);
$jawatan = Jawatan::where('idjawatan', $jawatan)
->get();
// dd($jawatan);
$kodcaw = $getnamastaff['kodcaw'];
$bycaw_all = CawanganKpi::with(['cawangan','dataKpi'=> function ($query) use ($jawatan) {
$query->where('jawatan', $jawatan[0]['idjawatan']);
}])
->where('nokpstaff',$nokpstaff)
->where('kodcaw',$kodcaw)
->where('jawatan', $jawatan[0]['idjawatan'])
->get();
// dd($bycaw_all);
foreach($bycaw_all as $index3=>$listbatch){
// dd($listbatch->toArray());
$bycaw_all_groupby_caw = $listbatch->groupBy('lelong_id');
$bycaw_all[$index3]["datakpi_info"] = $listbatch->dataKpi;
$bycaw_all[$index3]["nama_caw"] = $listbatch->cawangan->caw_name;
// $bycaw_all[$index3]["nama_caw"] = $listbatch->cawangan;
}
// dd($bycaw_all);
return view('kpi.datakpibycawdetail',compact('getnamastaff','bycaw_all','jawatan'));
}
Public function listdatakpidetail2($nokpstaff,$kodcaw, Request $request){
$namacaw = Cawangan::where('caw_code',$kodcaw)->first();
$getnamastaff = CawanganKpi::where('kodcaw', $kodcaw)
->where('nokpstaff',$nokpstaff)
->first();
// dd($getnamastaff);
$jawatan1 = Jawatan::where('idjawatan', $request->jawatan)
->get();
$jawatan = $request->jawatan;
// dd($jawatan[0]);
$bycaw_all = CawanganKpi::with(['cawangan','dataKpi'=> function ($query) use ($jawatan) {
$query->where('jawatan', $jawatan);
}])
->where('nokpstaff',$nokpstaff)
->where('kodcaw',$kodcaw)
->where('jawatan',$request->jawatan)
->get();
// dd($bycaw_all);
foreach($bycaw_all as $index3=>$listbatch){
// dd($listbatch->toArray());
$bycaw_all_groupby_caw = $listbatch->groupBy('lelong_id');
$bycaw_all[$index3]["datakpi_info"] = $listbatch->dataKpi;
$bycaw_all[$index3]["nama_caw"] = $listbatch->cawangan->caw_name;
$bycaw_all[$index3]["jawatan1"] = $jawatan1;
// $bycaw_all[$index3]["nama_caw"] = $listbatch->cawangan;
}
if($request->type == 'excel')
{
return view('kpi.datakpibycawdetail_excel',compact('getnamastaff','bycaw_all','jawatan','kodcaw','jawatan1'));
}
else
{
$pdf = PDF::loadView('kpi.datakpibycawdetail_pdf',compact('getnamastaff','bycaw_all','jawatan','kodcaw','jawatan1','namacaw'))
->setPaper('a4', 'potrait');
return $pdf->download('Data KPI '.$getnamastaff->namastaff.'.pdf');
}
}
Public function listdatakpidetailall($kodcaw, Request $request){
$kodcaw = $kodcaw;
$getnamastaff = CawanganKpi::where('kodcaw', $kodcaw)
->groupBy('jawatan','nokpstaff')
->orderBy('namastaff')
->get();
$getdatakpi = DataKpi::where('kodcaw', $kodcaw)
// ->groupBy('jawatan','nokpstaff')
->orderByRaw('CONVERT(bulan, SIGNED) asc')
->orderByRaw('CONVERT(tahun, SIGNED) asc')
// ->select('namastaff','jawatan','bulan')
->get();
$groupby_nama = $getdatakpi->groupby('namastaff');
$collection_datakpi = Collect();
foreach($groupby_nama as $index=>$nama){
$groupby_jawatan = $nama->groupBy('jawatan');
$collection_datakpi->push($groupby_jawatan);
$groupby_nama[$index]["jawatan"] = $groupby_jawatan;
}
return view('kpi.datakpibycawdetailall',compact('collection_datakpi','kodcaw'));
}
Public function listdatakpidetailall2($kodcaw, Request $request){
$namacaw = Cawangan::where('caw_code',$kodcaw)->first();
$getnamastaff = CawanganKpi::where('kodcaw', $kodcaw)
->groupBy('jawatan','nokpstaff')
->orderBy('namastaff')
->get();
$getdatakpi = DataKpi::where('kodcaw', $kodcaw)
->orderByRaw('CONVERT(bulan, SIGNED) asc')
->orderByRaw('CONVERT(tahun, SIGNED) asc')
->get();
$groupby_nama = $getdatakpi->groupby('namastaff');
$collection_datakpi = Collect();
foreach($groupby_nama as $index=>$nama){
$groupby_jawatan = $nama->groupBy('jawatan');
$collection_datakpi->push($groupby_jawatan);
$groupby_nama[$index]["jawatan"] = $groupby_jawatan;
}
if($request->type == 'excel')
{
return view('kpi.datakpibycawdetailall_excel',compact('collection_datakpi','kodcaw'));
}
else
{
$pdf = PDF::loadView('kpi.datakpibycawdetailall_pdf',compact('collection_datakpi','kodcaw','namacaw'))
->setPaper('a4', 'potrait');
return $pdf->download('Data KPI Keseluruhan'.$kodcaw.'.pdf');
}
return view('kpi.datakpibycawdetailall',compact('collection_datakpi'));
}
public function hapusdatakpi($recno)
{
$datastaff = DataKpi::where('id','=',$recno)
->get();
$datastafftoarray = $datastaff->toArray();
$nokpstaff = $datastafftoarray[0]['nokpstaff'];
$kodcaw = $datastafftoarray[0]['kodcaw'];
$idcawkpi = $datastafftoarray[0]['idcawkpi'];
// dd($idcawkpi);
$caw = DataKpi::where('id','=',$recno);
$caw->delete();
$caw1 = CawanganKpi::where('id','=',$idcawkpi);
$caw1->delete();
$checkExisting = CawanganKpi::where('nokpstaff', '=', $nokpstaff)
->where('kodcaw', '=', $kodcaw)
->get();
// dd($checkExisting);
if ($checkExisting->isEmpty()) {
return redirect()->route('janakpi.listdatakpi')
->with('success','Data '.$kodcaw.' Berjaya Dihapuskan');
}
else{
return redirect()->route('janakpi.listdatakpidetail',['nokpstaff'=>$nokpstaff,'kodcaw' => $kodcaw])
->with('success','Data '.$kodcaw.' Berjaya Dihapuskan');
}
}
}
+17
View File
@@ -0,0 +1,17 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Bulan extends Model
{
use HasFactory;
protected $table = 'bulan';
protected $fillable = [
'idbulan',
'namabulan',
];
}
+10
View File
@@ -75,4 +75,14 @@ class Cawangan extends Model
{
return $this->hasMany(NotisBid::class, 'caw_id', 'id');
}
public function cawanganKpi()
{
return $this->hasMany(CawanganKpi::class, 'caw_id', 'id');
}
public function datakpi()
{
return $this->belongsToMany(DataKpi::class, 'cawangan_kpi', 'caw_id', 'id');
}
}
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class CawanganKpi extends Model
{
use HasFactory;
protected $table = 'cawangan_kpi';
protected $fillable = [
'caw_id',
'kodcaw',
'status_jana',
];
public function cawangan()
{
return $this->belongsTo(Cawangan::class, 'caw_id', 'id');
}
public function dataKpi()
{
return $this->hasMany(DataKpi::class, 'namastaff', 'namastaff');
}
// public function cawangan()
// {
// return $this->belongsTo(Cawangan::class, 'caw_id', 'id');
// }
// public function notis()
// {
// return $this->belongsTo(Notis::class, 'notis_id', 'id');
//}
}
+47
View File
@@ -0,0 +1,47 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class DataKpi extends Model
{
use HasFactory;
protected $table = 'datakpi';
protected $fillable = [
'caw_id',
'kodcaw',
'tahun_kpi',
'tahun',
'bulan',
'jawatan',
'namastaff',
'nokpstaff',
'pc_bilpembiayaan',
'pc_pembiayaan',
'pc_bilpendapatan',
'pc_pendapatan',
'pc_pelangganbaru',
'ppc_aging1',
'ppc_aging2',
'ppc_aging3',
'ppc_penebusan',
'penilai_bilgadai',
'penilai_pembiayaan',
'teller_bilgadai',
'teller_pembiayaan',
'teller_biltebus',
'teller_tebuspembiayaan',
];
public function cawangan()
{
return $this->belongsTo(Cawangan::class, 'caw_id','id');
}
public function cawanganKpi(){
return $this->hasOne(CawanganKpi::class, 'caw_id','caw_id');
}
}
+18
View File
@@ -0,0 +1,18 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Jawatan extends Model
{
use HasFactory;
protected $table = 'jawatan';
protected $fillable = [
'id',
'idjawatan',
'namajawatan'
];
}
+18
View File
@@ -0,0 +1,18 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Tahun extends Model
{
use HasFactory;
protected $table = 'tahun';
protected $fillable = [
'id_tahun',
'tahun',
];
}
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class UserKaunter extends Model
{
use HasFactory;
protected $connection = 'kaunterpkb';
protected $table = 'users';
protected $fillable = [
'id',
'name',
'email',
'password',
'no_kp',
'no_telefon',
'roles',
'role_harian',
'role_asal',
'cawangan',
'perubatan',
'remember_token',
'updated_at',
'created_at',
'email_verified_at'
];
public function gadaiteller()
{
return $this->hasMany(Gadai::class, 'teller', 'name');
}
}
+25 -1
View File
@@ -192,7 +192,10 @@ class RolesSeeder extends Seeder
'name' => 'notisperingatan',
'description' => 'Penjanaan Notis Peringatan Oleh Call Center'
]);
Permission::create([
'name' => 'skoptugasan',
'description' => 'Skop Tugasan Cawangan Kegunaan E-KPI'
]);
// create roles and assign existing permissions
$role1 = Role::create(['name' => 'admin']);
$role1->givePermissionTo('pengguna');
@@ -277,6 +280,11 @@ class RolesSeeder extends Seeder
$role11->givePermissionTo('pengesahanpembida');
$role11->givePermissionTo('pendaftaranbatch');
$role12 = Role::create(['name' => 'operasi-kpi']);
$role12->givePermissionTo('skoptugasan');
$role13 = Role::create(['name' => 'hr']);
$role13->givePermissionTo('skoptugasan');
// $role3 = Role::create(['name' => 'Super-Admin']);
// gets all permissions via Gate::before rule; see AuthServiceProvider
@@ -374,5 +382,21 @@ class RolesSeeder extends Seeder
'user_type' => 1
]);
$user->assignRole($role10);
$user = \App\Models\User::factory()->create([
'name' => 'Operasi KPI',
'username' => 'operasikpi',
'email' => 'operasikpi@example.com',
'user_type' => 1
]);
$user->assignRole($role12);
$user = \App\Models\User::factory()->create([
'name' => 'HR',
'username' => 'hr',
'email' => 'hr@example.com',
'user_type' => 1
]);
$user->assignRole($role13);
}
}
+16
View File
@@ -0,0 +1,16 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row">
<div class="col-md-11 mx-auto">
<div class="card">
<div class="card-header">{{ __('Dashboard') }}</div>
<div class="card-body">
HR Page
</div>
</div>
</div>
</div>
</div>
@endsection
+16
View File
@@ -0,0 +1,16 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row">
<div class="col-md-11 mx-auto">
<div class="card">
<div class="card-header">{{ __('Dashboard') }}</div>
<div class="card-body">
operasi kpi Page
</div>
</div>
</div>
</div>
</div>
@endsection
@@ -106,6 +106,54 @@
</li>
@endhasrole
@hasrole('operasi-kpi')
<li>
<a href="#janakpiSubmenu" data-toggle="collapse" aria-expanded="false">
<div class="sidebar-menu">
<div class="sidebar-menu-main-title">
<span class="material-symbols-rounded sidebar-menu-item-main">
settings_accessibility
</span>
Sistem E-KPI
</div>
<span class="material-symbols-rounded sidebar-menu-item-expand">expand_more</span>
</div>
</a>
<ul class="list-unstyled collapse {{ (request()->is('janakpi/*')) ? 'show' : '' }}" id="janakpiSubmenu">
<li class="{{ (request()->is('janakpi/janaekpi/*') || request()->is('janakpi/janaekpi') ) ? 'active' : '' }}">
<a href="{{url('janakpi/janaekpi')}}">Jana dataKPI</a>
</li>
<li class="{{ (request()->is('janakpi/janaekpi/*') || request()->is('janakpi/janaekpi') ) ? 'active' : '' }}">
<a href="{{url('janakpi/listdatakpi')}}">Senarai dataKPI</a>
</li>
</ul>
</li>
@endhasrole
@hasrole('hr')
<li>
<a href="#janakpiSubmenu" data-toggle="collapse" aria-expanded="false">
<div class="sidebar-menu">
<div class="sidebar-menu-main-title">
<span class="material-symbols-rounded sidebar-menu-item-main">
settings_accessibility
</span>
Sistem E-KPI
</div>
<span class="material-symbols-rounded sidebar-menu-item-expand">expand_more</span>
</div>
</a>
<ul class="list-unstyled collapse {{ (request()->is('janakpi/*')) ? 'show' : '' }}" id="janakpiSubmenu">
{{-- <li class="{{ (request()->is('janakpi/janaekpi/*') || request()->is('janakpi/janaekpi') ) ? 'active' : '' }}">
<a href="{{url('janakpi/janaekpi')}}">Jana dataKPI</a>
</li> --}}
<li class="{{ (request()->is('janakpi/janaekpi/*') || request()->is('janakpi/janaekpi') ) ? 'active' : '' }}">
<a href="{{url('janakpi/listdatakpi')}}">Senarai dataKPI</a>
</li>
</ul>
</li>
@endhasrole
@hasrole('admin')
<li>
@@ -0,0 +1,84 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col">
<div class="card">
<div class="card-header header-style">
<div class="header-style-title">
Senarai Data KPI Mengikut Cawangan
</div>
</div>
<div class="card-body">
@if ($message = Session::get('success'))
<div class="alert alert-success">
{{ $message }}
</div>
@endif
<form id="exportform" action="" method="POST">
<input type="hidden" name="type" value="User">
<table class="table table-bordered table-xl" id="tablenotislelong" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>Bil</th>
<th>Cawangan</th>
<th>Nama Staff</th>
<th>Keseluruhan</th>
{{-- <th>Jawatan</th> --}}
{{-- <th>Maklumat Lanjut</th> --}}
</tr>
</thead>
<tbody>
@foreach ($cawangan_all as $bid)
{{-- {{dd($bid['namastaff'])}} --}}
<tr>
<td>{{$loop->iteration}}</td>
<td>
<b>{{ $bid->cawangan_info->caw_name}}</b>
</td>
<td>
@foreach($bid['namastaff'] as $index=>$nama)
<b> <a class="btn btn-success btn-sm m-1" href="{{ route('janakpi.listdatakpidetail',['nokpstaff'=>$nama['nokpstaff'],'kodcaw' => $bid->cawangan_info->caw_code]) }}" data-toggle="tooltip" data-placement="top" title="Maklumat">{{$loop->iteration.'. '}}</a>{{ $nama['namastaff']}}<br></b>
@endforeach
</td>
<td>
<a class="btn btn-info btn-sm m-1" href="{{ route('janakpi.listdatakpidetailall',['kodcaw' => $bid->cawangan_info->caw_code]) }}" data-toggle="tooltip" data-placement="top" title="Maklumat">Keseluruhan</a><br>
</td>
{{-- <td><span class="badge badge-pill badge-info text-white" style="font-size:100%"> {{ $bid->cawangan_kpi_count}}</span></td> --}}
{{-- <td><a class="btn btn-success btn-sm m-1" href="{{ route('reportbycaw.laporanlelongbycawdetail',['cawid'=>$bid->cawangan_info->id]) }}" data-toggle="tooltip" data-placement="top" title="Senarai Lelong"><i class="fas fa-list"></i></a></td> --}}
</tr>
@endforeach
</tbody>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
//Enable tooltips everywhere
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
var tablenotislelong = $('#tablenotislelong').DataTable({
order: [[0, 'asc']],
"info": false,
"lengthChange": false,
"pageLength": 99,
dom: 'Bfrtip',
});
</script>
@endsection
@@ -0,0 +1,201 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col">
<div class="card">
<div class="card-header header-style">
<div class="card-header header-style">
<a href="javascript:window.history.go(-1);" class="header-style-icon">
<i class="fas fa-arrow-left"></i>
</a>
<div class="header-style-title">
{{$getnamastaff->namastaff}}<br>
</div>
Jawatan: {{$jawatan[0]['namajawatan']}}
@php $jawatan = $jawatan[0]['idjawatan']; @endphp
</div>
</div>
<div class="card-body">
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<form id="exportpdf" action="{{route('janakpi.listdatakpidetail2',['nokpstaff'=> $getnamastaff->nokpstaff,'kodcaw' => $getnamastaff->kodcaw])}}" method="POST">
@csrf
<input type="hidden" name="type" id="typedonwload" value="">
<input type="hidden" name="jawatan" id="jawatan" value="{{$jawatan}}">
{{-- <input type="hidden" name="type" value="User"> --}}
<table class="table table-bordered text-center" id="tablenotislelong" style="width:100%">
<thead class="bg-primary text-white">
@if($jawatan == 'pc')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Bilangan SAG</th>
<th>Pembiayaan (RM)</th>
<th>Pendapatan (RM)</th>
<th>Pelanggan Baru</th>
<th>Hapus</th>
</tr>
@elseif($jawatan == 'ppc')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Aging (1-6bulan)</th>
<th>Aging (>6-12bulan)</th>
<th>Aging (>12bulan)</th>
<th>Penebusan (RM)</th>
<th>Hapus</th>
</tr>
@elseif($jawatan == 'teller')
@php $checking = $getnamastaff->namastaff; @endphp
<a class="btn btn-success btn-sm m-1" href="{{ route('janakpi.checkpenilai',['nokpstaff'=>$getnamastaff->nokpstaff,'jawatan' => 'penilai']) }}" data-toggle="tooltip" data-placement="top" title="Maklumat">Data KPI Penilai</a>
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Bil. SAG Gadaian</th>
<th>Pembiayaan (RM)</th>
<th>Bil. SAG Penebusan</th>
<th>Pembiayaan (RM)</th>
<th>Hapus</th>
</tr>
@elseif($jawatan == 'penilai')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Bil. SAG Gadaian</th>
<th>Pembiayaan (RM)</th>
<th>Hapus</th>
</tr>
@endif
</thead>
<tbody>
@foreach ($bycaw_all as $index=>$bid)
{{-- {{dd($bid['datakpi_info'][$index]['tahun'])}} --}}
@if($jawatan == 'pc')
<tr>
<td>{{$loop->iteration}}
<td>{{ $bid['datakpi_info'][$index]['tahun']}}</td>
<td>{{ $bid['datakpi_info'][$index]['bulan']}}</td>
<td>{{ $bid['datakpi_info'][$index]['pc_bilpembiayaan']}}</td>
<td>{{ number_format($bid['datakpi_info'][$index]['pc_pembiayaan'], 2)}}</td>
<td>{{ number_format($bid['datakpi_info'][$index]['pc_pendapatan'], 2)}}</td>
<td>{{ $bid['datakpi_info'][$index]['pc_pelangganbaru']}}</td>
<td> <a class="btn btn-danger btn-sm m-1" href="{{ route('janakpi.hapusdatakpi',['recno'=>$bid['datakpi_info'][$index]['id']]) }}" data-toggle="tooltip" data-placement="top" title="Maklumat">Hapus</a> </td>
</tr>
@elseif($jawatan == 'ppc')
<tr>
<td>{{$loop->iteration}}
<td>{{ $bid['datakpi_info'][$index]['tahun']}}</td>
<td>{{ $bid['datakpi_info'][$index]['bulan']}}</td>
<td>{{ number_format($bid['datakpi_info'][$index]['ppc_aging1'], 2)}}%</td>
<td>{{ number_format($bid['datakpi_info'][$index]['ppc_aging2'], 2)}}%</td>
<td>{{ number_format($bid['datakpi_info'][$index]['ppc_aging3'], 2)}}%</td>
<td>{{ number_format($bid['datakpi_info'][$index]['ppc_penebusan'], 2)}}</td>
<td> <a class="btn btn-danger btn-sm m-1" href="{{ route('janakpi.hapusdatakpi',['recno'=>$bid['datakpi_info'][$index]['id']]) }}" data-toggle="tooltip" data-placement="top" title="Maklumat">Hapus</a> </td>
</tr>
@elseif($jawatan == 'penilai')
<tr>
<td>{{$loop->iteration}}
<td>{{ $bid['datakpi_info'][$index]['tahun']}}</td>
<td>{{ $bid['datakpi_info'][$index]['bulan']}}</td>
<td>{{ $bid['datakpi_info'][$index]['penilai_bilgadai']}}</td>
<td>{{ number_format($bid['datakpi_info'][$index]['penilai_pembiayaan'], 2)}}</td>
<td> <a class="btn btn-danger btn-sm m-1" href="{{ route('janakpi.hapusdatakpi',['recno'=>$bid['datakpi_info'][$index]['id']]) }}" data-toggle="tooltip" data-placement="top" title="Maklumat">Hapus</a> </td>
</tr>
@elseif($jawatan == 'teller')
<tr>
<td>{{$loop->iteration}}
<td>{{ $bid['datakpi_info'][$index]['tahun']}}</td>
<td>{{ $bid['datakpi_info'][$index]['bulan']}}</td>
<td>{{ $bid['datakpi_info'][$index]['teller_bilgadai']}}</td>
<td>{{ number_format($bid['datakpi_info'][$index]['teller_pembiayaan'], 2)}}</td>
<td>{{ $bid['datakpi_info'][$index]['teller_biltebus']}}</td>
<td>{{ number_format($bid['datakpi_info'][$index]['teller_tebuspembiayaan'], 2)}}</td>
<td> <a class="btn btn-danger btn-sm m-1" href="{{ route('janakpi.hapusdatakpi',['recno'=>$bid['datakpi_info'][$index]['id']]) }}" data-toggle="tooltip" data-placement="top" title="Maklumat">Hapus</a> </td>
</tr>
@endif
@endforeach
</tbody>
</table>
</form>
</div>
</div>
</div>
<script>
//Enable tooltips everywhere
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
var tablenotislelong = $('#tablenotislelong').DataTable({
"columnDefs": [
{
"targets": 0,
"orderable": false
},
{
"targets": 3,
"orderable": false
}
],
order: [[1, 'asc']],
"info": false,
"lengthChange": false,
"pageLength": 99999,
dom: 'Bfrtip',
buttons: [
{
className: 'btn btn-outline-success pl-4 pr-4 btn-sm export',
target: "_blank",
titleAttr: 'Export to Excel',
text: '<h8><b>EXCEL</b></h8>',
action: function ( e, dt, node, config ) {
$('#typedonwload').val('excel');
$("#exportpdf").submit();
// window.open("_blank");
}
},
{
className: 'btn btn-outline-danger pl-4 pr-4 btn-sm export',
titleAttr: 'Export to PDF',
text: '<h8><b>PDF</b></h8>',
action: function ( e, dt, node, config ) {
$('#typedonwload').val('pdf');
$("#exportpdf").submit();
}
}
]
});
$('.export').tooltip();
$( '.export').removeClass('dt-button');
</script>
@endsection
@@ -0,0 +1,163 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script src="{{ asset('js/table2excel.js') }}"></script>
<style>
.letter{
font-family:'Times New Roman', Times, serif;
}
.row::after {
content: "";
clear: both;
display: table;
}
.first-prgph{
float: left;
width: 10%;
padding: 2px;
}
.first-prgph1{
float: left;
width: 30%;
padding-left: 50px;
}
.page-break {
page-break-before: always;
}
.name{
padding-top: 40px;
}
</style>
<body>
<div class = "letter">
{{-- <div class="row">
<div class="first-prgph">
<img src="{{ asset('img/icon_pkb.png') }}" alt="PKB LOGO" width="100" height="100">
</div> --}}
<div class="first-prgph1">
Nama: {{$getnamastaff->namastaff}}<br>
Jawatan: {{$jawatan1[0]['namajawatan']}}<br>
</div>
<br>
</div>
@php $jawatan = $jawatan1[0]['idjawatan']; @endphp
<table width="100%" height="168" id="customers">
<thead>
{{-- {{dd($jawatan)}} --}}
@if($jawatan == 'pc')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Bilangan SAG</th>
<th>Pembiayaan (RM)</th>
<th>Pendapatan (RM)</th>
<th>Pelanggan Baru</th>
</tr>
@elseif($jawatan == 'ppc')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Aging (1-6bulan)</th>
<th>Aging (>6-12bulan)</th>
<th>Aging (>12bulan)</th>
<th>Penebusan (RM)</th>
</tr>
@elseif($jawatan == 'teller')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Bil. SAG Gadaian</th>
<th>Pembiayaan (RM)</th>
<th>Bil. SAG Penebusan</th>
<th>Pembiayaan (RM)</th>
</tr>
@elseif($jawatan == 'penilai')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Bil. SAG Gadaian</th>
<th>Pembiayaan (RM)</th>
</tr>
@endif
</thead>
<tbody>
@foreach ($bycaw_all as $index=>$bid)
{{-- {{dd($jawatan)}} --}}
@if($jawatan == 'pc')
<tr>
<td>{{$loop->iteration}}
<td>{{ $bid['datakpi_info'][$index]['tahun']}}</td>
<td>{{ $bid['datakpi_info'][$index]['bulan']}}</td>
<td>{{ $bid['datakpi_info'][$index]['pc_bilpembiayaan']}}</td>
<td>{{ number_format($bid['datakpi_info'][$index]['pc_pembiayaan'], 2)}}</td>
<td>{{ number_format($bid['datakpi_info'][$index]['pc_pendapatan'], 2)}}</td>
<td>{{ $bid['datakpi_info'][$index]['pc_pelangganbaru']}}</td>
</tr>
@elseif($jawatan == 'ppc')
<tr>
<td>{{$loop->iteration}}
<td>{{ $bid['datakpi_info'][$index]['tahun']}}</td>
<td>{{ $bid['datakpi_info'][$index]['bulan']}}</td>
<td>{{ number_format($bid['datakpi_info'][$index]['ppc_aging1'], 2)}}</td>
<td>{{ number_format($bid['datakpi_info'][$index]['ppc_aging2'], 2)}}</td>
<td>{{ number_format($bid['datakpi_info'][$index]['ppc_aging3'], 2)}}</td>
<td>{{ number_format($bid['datakpi_info'][$index]['ppc_penebusan'], 2)}}</td>
</tr>
@elseif($jawatan == 'penilai')
<tr>
<td>{{$loop->iteration}}
<td>{{ $bid['datakpi_info'][$index]['tahun']}}</td>
<td>{{ $bid['datakpi_info'][$index]['bulan']}}</td>
<td>{{ $bid['datakpi_info'][$index]['penilai_bilgadai']}}</td>
<td>{{ number_format($bid['datakpi_info'][$index]['penilai_pembiayaan'], 2)}}</td>
</tr>
@elseif($jawatan == 'teller')
<tr>
<td>{{$loop->iteration}}
<td>{{ $bid['datakpi_info'][$index]['tahun']}}</td>
<td>{{ $bid['datakpi_info'][$index]['bulan']}}</td>
<td>{{ $bid['datakpi_info'][$index]['teller_bilgadai']}}</td>
<td>{{ number_format($bid['datakpi_info'][$index]['teller_pembiayaan'], 2)}}</td>
<td>{{ $bid['datakpi_info'][$index]['teller_biltebus']}}</td>
<td>{{ number_format($bid['datakpi_info'][$index]['teller_tebuspembiayaan'], 2)}}</td>
</tr>
@endif
@endforeach
</div>
</body>
<script src="{{ asset('js/jquery.min.js') }}"></script>
<script>
$(document).ready(function () {
var table2excel = new Table2Excel();
table2excel.export(document.querySelectorAll("#customers"),'senarai_notis');
setTimeout(function(){ window.close() }, 10);
});
</script>
@@ -0,0 +1,247 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style>
#sim {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:10px;
border-collapse: collapse;
width: 100%;
}
#sim td {padding:3px 5px 3px 5px; padding-right:10px;}, #sim th {
border: 0px solid;
padding: 1px;
text-align: left;
}
#sim tr:nth-child(even){}
#sim tr {
border-bottom: 1px black;
}
#sim th {
border: 1px black;
text-align: center;
}
#sim2 th {
text-align: center;
border: 0px solid ;
table-layout:auto;
color: black;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
* {
box-sizing: border-box;
}
.row {
margin-right:-5px;
margin-right:-5px;
}
.column {
float: right;
width: 100%;
padding: 5px;
}
/* Clearfix (clear floats) */
.row::after {
content: "";
clear: both;
display: table;
}
table {
border-collapse: collapse;
border-spacing: 0;
width: 200%;
border: 0px solid #ddd;
}
td {
/* text-align: right; */
padding: 16px;
border: 1px solid;
}
th{
text-align: center;
padding: 16px;
}
tr:nth-child(even) {
}
.font{
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:12px;
}
</style>
<style>
/** Define now the real margins of every page in the PDF **/
body {
margin-top: 1cm;
/* margin-left: 2cm; */
/* margin-right: 2cm; */
margin-bottom: 2cm;
}
/** Define the header rules **/
header {
position: fixed;
top: -1cm;
left: 0cm;
right: 0cm;
height: 0cm;
/** Extra personal styles **/
/* background-color: #eaeaea; */
color: black;
text-align: center;
line-height: 1.5cm;
}
/** Define the footer rules **/
footer {
position: fixed;
bottom: 0cm;
left: 0cm;
right: 0cm;
height: 2cm;
/** Extra personal styles **/
/* background-color: #eaeaea; */
color: black;
text-align: center;
line-height: 1.5cm;
}
footer .pagenum:before {
content: counter(page);
}
.font{
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:12px;
}
</style>
<body>
<header>
<div class="font"><u><b><h5>DATA KPI: {{$namacaw->caw_name}}</h5></b></u></div>
</header>
<footer>
<div class="pagenum-container"><span class="pagenum"></span></div>
</footer>
<div class="font">Nama: {{$getnamastaff->namastaff}}<br>
Jawatan: {{$jawatan1[0]['namajawatan']}}<br> </div><br>
@php $jawatan = $jawatan1[0]['idjawatan']; @endphp
<table cellspacing="0" cellpadding="5" style="float:right;" border="0" width="100%" height="80" align="left" id="sim">
<thead>
@if($jawatan == 'pc')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Bilangan SAG</th>
<th>Pembiayaan (RM)</th>
<th>Pendapatan (RM)</th>
<th>Pelanggan Baru</th>
</tr>
@elseif($jawatan == 'ppc')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Aging (1-6bulan)</th>
<th>Aging (>6-12bulan)</th>
<th>Aging (>12bulan)</th>
<th>Penebusan (RM)</th>
</tr>
@elseif($jawatan == 'teller')
{{-- @php $checking = $getnamastaff->namastaff; @endphp --}}
{{-- <a class="btn btn-success btn-sm m-1" href="{{ route('janakpi.checkpenilai',['nokpstaff'=>$getnamastaff->nokpstaff,'jawatan' => 'penilai']) }}" data-toggle="tooltip" data-placement="top" title="Maklumat">Data KPI Penilai</a> --}}
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Bil. SAG Gadaian</th>
<th>Pembiayaan (RM)</th>
<th>Bil. SAG Penebusan</th>
<th>Pembiayaan (RM)</th>
</tr>
@elseif($jawatan == 'penilai')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Bil. SAG Gadaian</th>
<th>Pembiayaan (RM)</th>
</tr>
@endif
</thead>
@foreach ($bycaw_all as $index=>$bid)
{{-- {{dd($bid['datakpi_info'][$index]['tahun'])}} --}}
@if($jawatan == 'pc')
<tr>
<td>{{$loop->iteration}}
<td align="center">{{ $bid['datakpi_info'][$index]['tahun']}}</td>
<td align="center">{{ $bid['datakpi_info'][$index]['bulan']}}</td>
<td align="center">{{ $bid['datakpi_info'][$index]['pc_bilpembiayaan']}}</td>
<td align="right">{{ number_format($bid['datakpi_info'][$index]['pc_pembiayaan'], 2)}}</td>
<td align="right">{{ number_format($bid['datakpi_info'][$index]['pc_pendapatan'], 2)}}</td>
<td align="center">{{ $bid['datakpi_info'][$index]['pc_pelangganbaru']}}</td>
</tr>
@elseif($jawatan == 'ppc')
<tr>
<td>{{$loop->iteration}}
<td align="center">{{ $bid['datakpi_info'][$index]['tahun']}}</td>
<td align="center">{{ $bid['datakpi_info'][$index]['bulan']}}</td>
<td align="center">{{ number_format($bid['datakpi_info'][$index]['ppc_aging1'], 2)}}%</td>
<td align="center">{{ number_format($bid['datakpi_info'][$index]['ppc_aging2'], 2)}}%</td>
<td align="center">{{ number_format($bid['datakpi_info'][$index]['ppc_aging3'], 2)}}%</td>
<td align="right">{{ number_format($bid['datakpi_info'][$index]['ppc_penebusan'], 2)}}</td>
</tr>
@elseif($jawatan == 'penilai')
<tr>
<td>{{$loop->iteration}}
<td align="center">{{ $bid['datakpi_info'][$index]['tahun']}}</td>
<td align="center">{{ $bid['datakpi_info'][$index]['bulan']}}</td>
<td align="center">{{ $bid['datakpi_info'][$index]['penilai_bilgadai']}}</td>
<td align="right">{{ number_format($bid['datakpi_info'][$index]['penilai_pembiayaan'], 2)}}</td>
</tr>
@elseif($jawatan == 'teller')
<tr>
<td>{{$loop->iteration}}
<td align="center">{{ $bid['datakpi_info'][$index]['tahun']}}</td>
<td align="center">{{ $bid['datakpi_info'][$index]['bulan']}}</td>
<td align="center">{{ $bid['datakpi_info'][$index]['teller_bilgadai']}}</td>
<td align="right">{{ number_format($bid['datakpi_info'][$index]['teller_pembiayaan'], 2)}}</td>
<td align="center">{{ $bid['datakpi_info'][$index]['teller_biltebus']}}</td>
<td align="right">{{ number_format($bid['datakpi_info'][$index]['teller_tebuspembiayaan'], 2)}}</td>
</tr>
@endif
@endforeach
</table>
</div>
</tbody>
</table>
</body>
@@ -0,0 +1,190 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col">
<div class="card">
<div class="card-header header-style">
<div class="card-header header-style">
<a href="javascript:window.history.go(-1);" class="header-style-icon">
<i class="fas fa-arrow-left"></i>
</a>
<div class="header-style-title">
SENARAI<br>
</div>
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
</div>
</div>
<div class="card-body">
@foreach($collection_datakpi as $index1=>$liststaff)
@foreach($liststaff as $index2=>$staff)
{{-- {{dd($staff[0]['kodcaw'])}} --}}
<form id="exportpdf" action="{{route('janakpi.listdatakpidetailall2',['kodcaw' => $kodcaw])}}" method="POST">
@csrf
<input type="hidden" name="type" id="typedonwload" value="">
<table class="table table-bordered text-center" id="tablenotislelong" style="width:100%">
<thead class="bg-primary text-white">
Nama: {{$staff[0]['namastaff']}} <br>
Jawatan: {{$index2}}<br>
@if($index2 == 'pc')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Bilangan SAG</th>
<th>Pembiayaan (RM)</th>
<th>Pendapatan (RM)</th>
<th>Pelanggan Baru</th>
</tr>
@elseif($index2 == 'ppc')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Aging (1-6bulan)</th>
<th>Aging (>6-12bulan)</th>
<th>Aging (>12bulan)</th>
<th>Penebusan (RM)</th>
</tr>
@elseif($index2 == 'teller')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Bil. SAG Gadaian</th>
<th>Pembiayaan (RM)</th>
<th>Bil. SAG Penebusan</th>
<th>Pembiayaan (RM)</th>
</tr>
@elseif($index2 == 'penilai')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Bil. SAG Gadaian</th>
<th>Pembiayaan (RM)</th>
</tr>
@endif
</thead>
<tbody>
@if($index2 == 'pc')
@foreach($liststaff[$index2] as $index3=>$detail)
<tr>
<td>{{$loop->iteration}}
<td>{{ $detail['tahun']}}</td>
<td>{{ $detail['bulan']}}</td>
<td>{{ $detail['pc_bilpembiayaan']}}</td>
<td>{{ number_format($detail['pc_pembiayaan'], 2)}}</td>
<td>{{ number_format($detail['pc_pendapatan'], 2)}}</td>
<td>{{ $detail['pc_pelangganbaru']}}</td>
</tr>
@endforeach
@elseif($index2 == 'ppc')
@foreach($liststaff[$index2] as $index3=>$detail)
<tr>
<td>{{$loop->iteration}}
<td>{{ $detail['tahun']}}</td>
<td>{{ $detail['bulan']}}</td>
<td>{{ number_format($detail['ppc_aging1'], 2)}}%</td>
<td>{{ number_format($detail['ppc_aging2'], 2)}}%</td>
<td>{{ number_format($detail['ppc_aging3'], 2)}}%</td>
<td>{{ number_format($detail['ppc_penebusan'], 2)}}</td>
</tr>
@endforeach
@elseif($index2 == 'penilai')
@foreach($liststaff[$index2] as $index3=>$detail)
<tr>
<td>{{$loop->iteration}}
<td>{{ $detail['tahun']}}</td>
<td>{{ $detail['bulan']}}</td>
<td>{{ $detail['penilai_bilgadai']}}</td>
<td>{{ number_format($detail['penilai_pembiayaan'], 2)}}</td>
</tr>
@endforeach
@elseif($index2 == 'teller')
@foreach($liststaff[$index2] as $index3=>$detail)
<tr>
<td>{{$loop->iteration}}
<td>{{ $detail['tahun']}}</td>
<td>{{ $detail['bulan']}}</td>
<td>{{ $detail['teller_bilgadai']}}</td>
<td>{{ number_format($detail['teller_pembiayaan'], 2)}}</td>
<td>{{ $detail['teller_biltebus']}}</td>
<td>{{ number_format($detail['teller_tebuspembiayaan'], 2)}}</td>
</tr>
@endforeach
@endif
</tbody>
</table></form>
@endforeach
@endforeach
</div>
</div>
<script>
//Enable tooltips everywhere
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
var tablenotislelong = $('#tablenotislelong').DataTable({
"columnDefs": [
{
"targets": 0,
"orderable": false
},
{
"targets": 3,
"orderable": false
}
],
order: [[1, 'asc']],
"info": false,
"lengthChange": false,
"pageLength": 99999,
dom: 'Bfrtip',
buttons: [
// {
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm export',
// target: "_blank",
// titleAttr: 'Export to Excel',
// text: '<h8><b>EXCEL</b></h8>',
// action: function ( e, dt, node, config ) {
// $('#typedonwload').val('excel');
// $("#exportpdf").submit();
// // window.open("_blank");
// }
// },
{
className: 'btn btn-outline-danger pl-4 pr-4 btn-sm export',
titleAttr: 'Export to PDF',
text: '<h8><b>PDF</b></h8>',
action: function ( e, dt, node, config ) {
$('#typedonwload').val('pdf');
$("#exportpdf").submit();
}
}
]
});
$('.export').tooltip();
$( '.export').removeClass('dt-button');
</script>
@endsection
@@ -0,0 +1,168 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script src="{{ asset('js/table2excel.js') }}"></script>
<style>
.letter{
font-family:'Times New Roman', Times, serif;
}
.row::after {
content: "";
clear: both;
display: table;
}
.first-prgph{
float: left;
width: 10%;
padding: 2px;
}
.first-prgph1{
float: left;
width: 30%;
padding-left: 50px;
}
.page-break {
page-break-before: always;
}
.name{
padding-top: 40px;
}
</style>
<body>
<div class = "letter">
{{-- <div class="row">
<div class="first-prgph">
<img src="{{ asset('img/icon_pkb.png') }}" alt="PKB LOGO" width="100" height="100">
</div> --}}
@foreach($collection_datakpi as $index1=>$liststaff)
@foreach($liststaff as $index2=>$staff)
{{-- {{dd($staff)}} --}}
<form id="exportpdf" action="{{route('janakpi.listdatakpidetailall2',['kodcaw' =>$kodcaw])}}" method="POST">
<table class="table table-bordered text-center" id="tablenotislelong" style="width:100%">
<thead class="bg-primary text-white">
Nama: {{$staff[0]['namastaff']}} <br>
Jawatan: {{$index2}}<br>
@if($index2 == 'pc')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Bilangan SAG</th>
<th>Pembiayaan (RM)</th>
<th>Pendapatan (RM)</th>
<th>Pelanggan Baru</th>
</tr>
@elseif($index2 == 'ppc')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Aging (1-6bulan)</th>
<th>Aging (>6-12bulan)</th>
<th>Aging (>12bulan)</th>
<th>Penebusan (RM)</th>
</tr>
@elseif($index2 == 'teller')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Bil. SAG Gadaian</th>
<th>Pembiayaan (RM)</th>
<th>Bil. SAG Penebusan</th>
<th>Pembiayaan (RM)</th>
</tr>
@elseif($index2 == 'penilai')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Bil. SAG Gadaian</th>
<th>Pembiayaan (RM)</th>
</tr>
@endif
</thead>
<tbody>
@if($index2 == 'pc')
@foreach($liststaff[$index2] as $index3=>$detail)
<tr>
<td>{{$loop->iteration}}
<td>{{ $detail['tahun']}}</td>
<td>{{ $detail['bulan']}}</td>
<td>{{ $detail['pc_bilpembiayaan']}}</td>
<td>{{ number_format($detail['pc_pembiayaan'], 2)}}</td>
<td>{{ number_format($detail['pc_pendapatan'], 2)}}</td>
<td>{{ $detail['pc_pelangganbaru']}}</td>
</tr>
@endforeach
@elseif($index2 == 'ppc')
@foreach($liststaff[$index2] as $index3=>$detail)
<tr>
<td>{{$loop->iteration}}
<td>{{ $detail['tahun']}}</td>
<td>{{ $detail['bulan']}}</td>
<td>{{ number_format($detail['ppc_aging1'], 2)}}%</td>
<td>{{ number_format($detail['ppc_aging2'], 2)}}%</td>
<td>{{ number_format($detail['ppc_aging3'], 2)}}%</td>
<td>{{ number_format($detail['ppc_penebusan'], 2)}}</td>
</tr>
@endforeach
@elseif($index2 == 'penilai')
@foreach($liststaff[$index2] as $index3=>$detail)
<tr>
<td>{{$loop->iteration}}
<td>{{ $detail['tahun']}}</td>
<td>{{ $detail['bulan']}}</td>
<td>{{ $detail['penilai_bilgadai']}}</td>
<td>{{ number_format($detail['penilai_pembiayaan'], 2)}}</td>
</tr>
@endforeach
@elseif($index2 == 'teller')
@foreach($liststaff[$index2] as $index3=>$detail)
<tr>
<td>{{$loop->iteration}}
<td>{{ $detail['tahun']}}</td>
<td>{{ $detail['bulan']}}</td>
<td>{{ $detail['teller_bilgadai']}}</td>
<td>{{ number_format($detail['teller_pembiayaan'], 2)}}</td>
<td>{{ $detail['teller_biltebus']}}</td>
<td>{{ number_format($detail['teller_tebuspembiayaan'], 2)}}</td>
</tr>
@endforeach
@endif
</tbody>
</table>
@endforeach
@endforeach
</body>
<script src="{{ asset('js/jquery.min.js') }}"></script>
<script>
$(document).ready(function () {
var table2excel = new Table2Excel();
table2excel.export(document.querySelectorAll("#customers"),'senarai_notis');
setTimeout(function(){ window.close() }, 10);
});
</script>
@@ -0,0 +1,250 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style>
#sim {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:10px;
border-collapse: collapse;
width: 100%;
}
#sim td {padding:3px 5px 3px 5px; padding-right:10px;}, #sim th {
border: 0px solid;
padding: 1px;
text-align: left;
}
#sim tr:nth-child(even){}
#sim tr {
border-bottom: 1px black;
}
#sim th {
border: 1px black;
text-align: center;
}
#sim2 th {
text-align: center;
border: 0px solid ;
table-layout:auto;
color: black;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
* {
box-sizing: border-box;
}
.row {
margin-right:-5px;
margin-right:-5px;
}
.column {
float: right;
width: 100%;
padding: 5px;
}
/* Clearfix (clear floats) */
.row::after {
content: "";
clear: both;
display: table;
}
table {
border-collapse: collapse;
border-spacing: 0;
width: 200%;
border: 0px solid #ddd;
}
td {
/* text-align: right; */
padding: 16px;
border: 1px solid;
}
th{
text-align: center;
padding: 16px;
}
tr:nth-child(even) {
}
.font{
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:12px;
}
</style>
<style>
/** Define now the real margins of every page in the PDF **/
body {
margin-top: 1cm;
/* margin-left: 2cm; */
/* margin-right: 2cm; */
margin-bottom: 2cm;
}
/** Define the header rules **/
header {
position: fixed;
top: -1cm;
left: 0cm;
right: 0cm;
height: 0cm;
/** Extra personal styles **/
/* background-color: #eaeaea; */
color: black;
text-align: center;
line-height: 1.5cm;
}
/** Define the footer rules **/
footer {
position: fixed;
bottom: 0cm;
left: 0cm;
right: 0cm;
height: 2cm;
/** Extra personal styles **/
/* background-color: #eaeaea; */
color: black;
text-align: center;
line-height: 1.5cm;
}
footer .pagenum:before {
content: counter(page);
}
.font{
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:12px;
}
</style>
<body>
<header>
<div class="font"><u><b><h5>DATA KPI : {{$namacaw->caw_name}}</h5></b></u></div>
</header>
<footer>
<div class="pagenum-container"><span class="pagenum"></span></div>
</footer>
@foreach($collection_datakpi as $index1=>$liststaff)
@foreach($liststaff as $index2=>$staff)
<br>
<div class="font"> Nama: {{$staff[0]['namastaff']}} <br>
Jawatan: {{$index2}}</div>
<table cellspacing="0" cellpadding="5" style="float:right;" border="0" width="100%" height="80" align="left" id="sim">
<thead class="bg-primary text-white">
@if($index2 == 'pc')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Bilangan SAG</th>
<th>Pembiayaan (RM)</th>
<th>Pendapatan (RM)</th>
<th>Pelanggan Baru</th>
</tr>
@elseif($index2 == 'ppc')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Aging (1-6bulan)</th>
<th>Aging (>6-12bulan)</th>
<th>Aging (>12bulan)</th>
<th>Penebusan (RM)</th>
</tr>
@elseif($index2 == 'teller')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Bil. SAG Gadaian</th>
<th>Pembiayaan (RM)</th>
<th>Bil. SAG Penebusan</th>
<th>Pembiayaan (RM)</th>
</tr>
@elseif($index2 == 'penilai')
<tr>
<th>Bil</th>
<th>Tahun</th>
<th>Bulan</th>
<th>Bil. SAG Gadaian</th>
<th>Pembiayaan (RM)</th>
</tr>
@endif
</thead>
<tbody>
@if($index2 == 'pc')
@foreach($liststaff[$index2] as $index3=>$detail)
<tr>
<td align = 'center'>{{$loop->iteration}}
<td align = 'center'>{{ $detail['tahun']}}</td>
<td align = 'center'>{{ $detail['bulan']}}</td>
<td align = 'center'>{{ number_format($detail['pc_bilpembiayaan'], 0)}}</td>
<td align = 'right'>{{ number_format($detail['pc_pembiayaan'], 2)}}</td>
<td align = 'right'>{{ number_format($detail['pc_pendapatan'], 2)}}</td>
<td align = 'center'>{{ $detail['pc_pelangganbaru']}}</td>
</tr>
@endforeach
@elseif($index2 == 'ppc')
@foreach($liststaff[$index2] as $index3=>$detail)
<tr>
<td align = 'center'>{{$loop->iteration}}
<td align = 'center'>{{ $detail['tahun']}}</td>
<td align = 'center'>{{ $detail['bulan']}}</td>
<td align = 'center'>{{ number_format($detail['ppc_aging1'], 2)}}%</td>
<td align = 'center'>{{ number_format($detail['ppc_aging2'], 2)}}%</td>
<td align = 'center'>{{ number_format($detail['ppc_aging3'], 2)}}%</td>
<td align = 'right'>{{ number_format($detail['ppc_penebusan'], 2)}}</td>
</tr>
@endforeach
@elseif($index2 == 'penilai')
@foreach($liststaff[$index2] as $index3=>$detail)
<tr>
<td align = 'center'>{{$loop->iteration}}
<td align = 'center'>{{ $detail['tahun']}}</td>
<td align = 'center'>{{ $detail['bulan']}}</td>
<td align = 'center'>{{ $detail['penilai_bilgadai']}}</td>
<td align = 'right'>{{ number_format($detail['penilai_pembiayaan'], 2)}}</td>
</tr>
@endforeach
@elseif($index2 == 'teller')
@foreach($liststaff[$index2] as $index3=>$detail)
<tr>
<td align = 'center'>{{$loop->iteration}}
<td align = 'center'>{{ $detail['tahun']}}</td>
<td align = 'center'>{{ $detail['bulan']}}</td>
<td align = 'center'>{{ $detail['teller_bilgadai']}}</td>
<td align = 'right'>{{ number_format($detail['teller_pembiayaan'], 2)}}</td>
<td align = 'center'>{{ $detail['teller_biltebus']}}</td>
<td align = 'right'>{{ number_format($detail['teller_tebuspembiayaan'], 2)}}</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
@endforeach
@endforeach
</body>
+138
View File
@@ -0,0 +1,138 @@
@extends('layouts.app')
@section('content')
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.10/css/select2.min.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.10/js/select2.min.js"></script>
<div class="container">
<div class="row ">
<div class="col-10 mx-auto">
<div class="card">
<div class="card-header header-style">
<div class="header-style-title">
Jana Actual E-KPI Cawangan
</div>
</div>
<div class="card-body">
@if ($message = Session::get('failed'))
<div class="alert alert-danger">
{{ $message }}
</div>
@endif
@if($message = Session::get('success'))
<div class="alert alert-success">
<p>{{$message}}</p>
</div>
@endif
<form action="{{route('janakpi.senaraitempkpi')}}" method="POST" enctype="multipart/form-data">
@csrf
<div id='loader'><img id="loader-image" src="../img/loadingmsg.gif" alt="Sila Tunggu Sebentar..." /></div>
{{-- <div class="form-group row">
<label for="tarikh_lelong" class="col-sm-2 col-form-label">Tarikh Lelong</label>
<div class="col-sm-3">
<input type="date" class="form-control" id="tarikh_lelong" name="tarikh_lelong" value = "{{$tetapan->tetap_tarikh_lelong}}">
</div>
</div> --}}
<div class="form-group row">
<label for="fasa" class="col-sm-2 col-form-label">Bulan/Tahun KPI</label>
<div class="col-sm-4">
{!! Form::selectMonth('month') !!}
{!! Form::select('year', $years) !!}
</div>
<!-- <label for="cajlelong" class="col-sm-1 col-form-label">Caj Lelong</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="cajlelong" name="cajlelong" placeholder="%">
</div> -->
</div>
<div class="form-group row">
<label for="jbg" class="col-sm-2 col-form-label">Jawatan</label>
<div class="col-sm-4">
<select class="selectpicker" name="jawatan[]" id="jawatan">
@foreach ($jawatan as $item)
<option value="{{$item->idjawatan}}">{{$item->namajawatan}}</option>
@endforeach
</select>
</div>
<!-- <label for="caw" class="col-sm-1 col-form-label">Cawangan</label>
<div class="col-sm-4">
<select class="selectpicker" multiple name="caw[]" id="caw">
@foreach ($caw as $item)
<option value="{{$item->id}}">{{$item->caw_name}}</option>
@endforeach
</select>
</div> -->
</div>
{{-- <div class="form-group row">
<label for="cajlelong" class="col-sm-2 col-form-label">Caj Lelong</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="cajlelong" name="cajlelong" value = "{{$tetapan->cajlelong}}" readonly>
</div>
</div> --}}
{{-- <div class="form-group row">
<label for="cajlelong" class="col-sm-2 col-form-label">Kali</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="kali" name="kali" value = "{{$tetapan->kali}}" readonly>
</div>
</div> --}}
<div class="form-group row">
<div class="col-sm-10">
<button type="submit" class="btn btn-primary">Carian</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
var date = '<?php echo $currentDate; ?>';
$('#caw').select2({
width: '100%',
placeholder: "Pilih Cawangan",
allowClear: true
});
$(document).ready(function () {
// document.getElementById('tarikh_lelong').setAttribute("min", date);
$("input[name=fasa]").change(function(){
if($("#fasa1").is(':checked')){
$("#jbg").val('').prop("readonly", false);
document.getElementById("hinggatempoh").style.visibility = "visible";
document.getElementById("jbg2").style.visibility = "visible";
}
if($("#fasa2").is(':checked')){
$("#jbg").val('12').prop("readonly", true);
// $("#jbg2").val('12').prop("readonly", true);
document.getElementById("hinggatempoh").style.visibility = "hidden";
document.getElementById("jbg2").style.visibility = "hidden";
}
});
});
</script>
<script>
$(function() {
$( "form" ).submit(function() {
$('#loader').show();
});
});
</script>
@endsection
@@ -0,0 +1,327 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col mx-auto p-4">
<div class="card">
<div class="card-header header-style">
<div class="header-style-title">
Butiran Mengikut Jawatan: {{$nama_jawatan['namajawatan']}}<br>
</div>
Tahun: {{$tahun}}<br>
Bulan: {{$bulan}}
</div>
<div class="card-body">
@if ($message = Session::get('failed'))
<div class="alert alert-danger" style="margin-top:1%;">
<p>{{ $message }}</p>
</div>
@endif
<form action="{{route('janakpi.savedatakpi')}}" method="POST" enctype="multipart/form-data">
@csrf
{{-- <input type="hidden" name="helo"> --}}
<div id='loader'><img id="loader-image" src="../img/loadingmsg.gif" alt="Sila Tunggu Sebentar..." /></div>
<div class="container">
<div>
<div style="margin-top:2%; margin-bottom:2%;">
<input type="hidden" class="form-control" id="tahun" name="tahun" value="{{$tahun}}">
<input type="hidden" class="form-control" id="bulan" name="bulan" value="{{$bulan}}">
<input type="hidden" class="form-control" id="jawatan" name="jawatan" value="{{$jawatan}}">
</div>
</div>
</div>
<table class="table text-left table-bordered" id="senaraitemp" style="width:100%">
<thead class="bg-primary text-white">
@if($jawatan == 'pc')
<tr>
{{-- <th><input type="checkbox" aria-label="Checkbox for following text input" id="checkall"></th> --}}
<th>Bil</th>
<th align="center">Kod Cawangan</th>
<th align="center">Cawangan</th>
<th align="left">Nama Staff</th>
<th align="left">NoKP Staff</th>
<th>Bilangan SAG</th>
<th>Pembiayaan (RM)</th>
<th>Pendapatan (RM)</th>
<th>Pelanggan Baru</th>
{{-- <th class="text-center">Tindakan</th> --}}
</tr>
@elseif($jawatan == 'ppc')
<tr>
{{-- <th><input type="checkbox" aria-label="Checkbox for following text input" id="checkall"></th> --}}
<th>Bil</th>
<th align="center">Kod Cawangan</th>
<th align="center">Cawangan</th>
<th align="left">Nama Staff</th>
<th align="left">NoKP Staff</th>
<th>Aging (1-6bulan)</th>
<th>Aging (>6-12bulan)</th>
<th>Aging (>12bulan)</th>
<th>Penebusan (RM)</th>
{{-- <th class="text-center">Tindakan</th> --}}
</tr>
@elseif($jawatan == 'teller')
<tr>
{{-- <th><input type="checkbox" aria-label="Checkbox for following text input" id="checkall"></th> --}}
<th>Bil</th>
<th align="center">Kod Cawangan</th>
<th align="center">Cawangan</th>
<th align="left">Nama Staff</th>
<th align="left">NoKP Staff</th>
<th>Bil. SAG Gadaian</th>
<th>Pembiayaan (RM)</th>
<th>Bil. SAG Penebusan</th>
<th>Pembiayaan (RM)</th>
</tr>
@elseif($jawatan == 'penilai')
<tr>
{{-- <th><input type="checkbox" aria-label="Checkbox for following text input" id="checkall"></th> --}}
<th>Bil</th>
<th align="center">Kod Cawangan</th>
<th align="center">Cawangan</th>
<th align="left">Nama Staff</th>
<th align="left">NoKP Staff</th>
<th>Bil. SAG Gadaian</th>
<th>Pembiayaan (RM)</th>
</tr>
@endif
</thead>
<tbody>
@php $count = 1; @endphp
@foreach($senarai as $send)
{{-- {{dd($jawatan)}} --}}
{{-- @if($send['bilangan'] > 0) --}}
@if($jawatan == 'pc')
<tr>
{{-- <td><input type="checkbox" aria-label="Checkbox for following text input" name="caw[]" id="caw" value = "{{ $send['kodcaw'] }}" class="checkbox"></td> --}}
<td>{{ $count++ }}</td>
<td align="center">{{ $send['kodcaw'] }}<input type="hidden" class="form-control" id="kodcaw" name="kodcaw[]" value="{{$send['kodcaw']}}"></td>
<td align="left">{{ $send['caw_name'] }}<input type="hidden" class="form-control" id="caw_name" name="caw_name[]" value="{{$send['caw_name']}}"></td>
<td align="left" style="white-space: nowrap;">{{ $send['nama_staff'] }}<input type="hidden" class="form-control" id="nama_staff" name="nama_staff[]" value="{{$send['nama_staff']}}"></td>
<td align="left" style="white-space: nowrap;">{{ $send['nokpstaff'] }}<input type="hidden" class="form-control" id="nokpstaff" name="nokpstaff[]" value="{{$send['nokpstaff']}}"></td>
<td align="center">{{ $send['laporan_ringkasan']['bilangan_gadai'] }}<input type="hidden" class="form-control" id="bilangan_gadai" name="bilangan_gadai[]" value="{{ $send['laporan_ringkasan']['bilangan_gadai'] }}"></td>
<td align="right">{{ number_format($send['laporan_ringkasan']['total_gadai'], 2) }}<input type="hidden" class="form-control" id="total_gadai" name="total_gadai[]" value="{{ $send['laporan_ringkasan']['total_gadai'] }}"> </td>
<td align="right">{{ number_format($send['laporan_ringkasan']['upahsimpankaunter']+$send['laporan_ringkasan']['keuntungansebenarkaunter']+$send['laporan_ringkasan']['total_keuntungan_online'] , 2) }}<input type="hidden" class="form-control" id="pendapatan" name="pendapatan[]" value="{{ $send['laporan_ringkasan']['upahsimpankaunter']+$send['laporan_ringkasan']['keuntungansebenarkaunter']+$send['laporan_ringkasan']['total_keuntungan_online'] }}"> </td>
<td align="center">{{ $send['laporan_ringkasan']['bilangan_customer_baru'] }}<input type="hidden" class="form-control" id="bilangan_customer_baru" name="bilangan_customer_baru[]" value="{{ $send['laporan_ringkasan']['bilangan_customer_baru'] }}"> </td>
</tr>
@elseif($jawatan == 'ppc')
<tr>
{{-- <td><input type="checkbox" aria-label="Checkbox for following text input" name="caw[]" id="caw" value = "{{ $send['kodcaw'] }}" class="checkbox"></td> --}}
<td>{{ $count++ }}</td>
<td align="center">{{ $send['kodcaw'] }}<input type="hidden" class="form-control" id="kodcaw" name="kodcaw[]" value="{{$send['kodcaw']}}"></td>
<td align="left">{{ $send['caw_name'] }}<input type="hidden" class="form-control" id="caw_name" name="caw_name[]" value="{{$send['caw_name']}}"></td>
<td align="left" style="white-space: nowrap;">{{ $send['nama_staff'] }}<input type="hidden" class="form-control" id="nama_staff" name="nama_staff[]" value="{{$send['nama_staff']}}"></td>
<td align="left" style="white-space: nowrap;">{{ $send['nokpstaff'] }}<input type="hidden" class="form-control" id="nokpstaff" name="nokpstaff[]" value="{{$send['nokpstaff']}}"></td>
@php $jumpembiayaan = 1; @endphp
@foreach($send['aging'][0]['count'] as $index=>$total)
@php
$jumpembiayaan += $send['aging'][0]['sum'][$index];
@endphp
@endforeach
{{-- //1 - 6 Bulan --}}
@php $jumlahcount = 0;$jumlahsum = 0; @endphp
@foreach($send['aging'][0]['count'] as $index=>$ag)
@if ($index < 6)
@php
$jumlahcount += $ag; $jumlahsum += $send['aging'][0]['sum'][$index];
@endphp
@endif
@endforeach
<td align="center">{{ number_format(($jumlahsum/$jumpembiayaan)*100,2) }}%<input type="hidden" class="form-control" id="aging1" name="aging1[]" value="{{ number_format(($jumlahsum/$jumpembiayaan)*100,2) }}"></td>
{{-- //>6 Bulan --}}
@php $jumlahcount = 0;$jumlahsum = 0; @endphp
@foreach($send['aging'][0]['sum'] as $index=>$ag)
@if ($index > 5 && $index < 12 )
@php
$jumlahsum += $send['aging'][0]['sum'][$index];
@endphp
@endif
@endforeach
<td align="center">{{ number_format(($jumlahsum/$jumpembiayaan)*100,2) }}%<input type="hidden" class="form-control" id="aging2" name="aging2[]" value="{{ number_format(($jumlahsum/$jumpembiayaan)*100,2) }}"></td>
{{-- >12 Bulan --}}
@php $jumlahcount = 0;$jumlahsum = 0; @endphp
@foreach($send['aging'][0]['sum'] as $index=>$ag)
@if ($index > 11 && $index < 14)
@php
$jumlahsum += $send['aging'][0]['sum'][$index];
@endphp
@endif
@endforeach
<td align="center">{{ number_format(($jumlahsum/$jumpembiayaan)*100,2) }}%<input type="hidden" class="form-control" id="aging3" name="aging3[]" value="{{ number_format(($jumlahsum/$jumpembiayaan)*100,2) }}"></td>
<td align="right"> {{ number_format($send['laporan_ringkasan']['total_tebus'] , 2)}} <input type="hidden" class="form-control" id="total_tebus" name="total_tebus[]" value="{{ $send['laporan_ringkasan']['total_tebus'] }}"></td>
</tr>
@elseif($jawatan == 'teller')
<tr>
{{-- <td><input type="checkbox" aria-label="Checkbox for following text input" name="caw[]" id="caw" value = "{{ $send['kodcaw'] }}" class="checkbox"></td> --}}
<td>{{ $count++ }}</td>
<td align="center">{{ $send['kodcaw'] }}
@foreach($send['gadai'] as $index=>$kodcaw)
<input type="hidden" class="form-control" id="kodcaw" name="kodcaw[]" value="{{$kodcaw['kodcaw']}}"><br>
@endforeach</td>
<td align="left">{{ $send['caw_name'] }}<input type="hidden" class="form-control" id="caw_name" name="caw_name[]" value="{{$send['caw_name']}}"></td>
<td align="left" style="white-space: nowrap;">
{{-- {{dd($send['gadai'])}} --}}
@foreach($send['gadai'] as $index=>$nama)
{{ $nama['teller'] }}<input type="hidden" class="form-control" id="nama_staff" name="nama_staff[]" value="{{$nama['teller']}}"><br>
@endforeach
</td>
<td align="center">@foreach($send['gadai'] as $index=>$nama)
{{ $nama['nokpstaff']}}<input type="hidden" class="form-control" id="nokpstaff" name="nokpstaff[]" value="{{$nama['nokpstaff']}}"><br>
@endforeach</td>
<td align="center">@foreach($send['gadai'] as $index=>$nama)
{{ $nama['total_gadai'] }}<input type="hidden" class="form-control" id="total_gadai" name="total_gadai[]" value="{{ $nama['total_gadai']}}"><br>
@endforeach</td>
<td align="right">
@foreach($send['gadai'] as $index=>$nama)
{{ number_format($nama['total_pembiayaan'], 2) }}<input type="hidden" class="form-control" id="total_pembiayaan" name="total_pembiayaan[]" value="{{ $nama['total_pembiayaan']}}"> <br>
@endforeach
</td>
{{-- {{dd($send['tebus'])}} --}}
<td align="center">@foreach($send['tebus'] as $tebus)
{{ $tebus['total_tebus'] }}<input type="hidden" class="form-control" id="total_tebus" name="total_tebus[]" value="{{ $tebus['total_tebus']}}"><br>
@endforeach</td>
<td align="right">
@foreach($send['tebus'] as $tebus)
{{ number_format($tebus['total_penebusan'], 2) }} <input type="hidden" class="form-control" id="total_penebusan" name="total_penebusan[]" value="{{ $tebus['total_penebusan']}}"><br>
@endforeach
</td>
</tr>
@elseif($jawatan == 'penilai')
<tr>
{{-- <td><input type="checkbox" aria-label="Checkbox for following text input" name="caw[]" id="caw" value = "{{ $send['kodcaw'] }}" class="checkbox"></td> --}}
<td>{{ $count++ }}</td>
<td align="center">{{ $send['kodcaw'] }}
@foreach($send['gadaipenilai'] as $index=>$kodcaw)
<input type="hidden" class="form-control" id="kodcaw" name="kodcaw[]" value="{{$kodcaw['kodcaw']}}"><br>
@endforeach</td>
<td align="left">{{ $send['caw_name'] }}<input type="hidden" class="form-control" id="caw_name" name="caw_name[]" value="{{$send['caw_name']}}"></td>
<td align="left" style="white-space: nowrap;">
@foreach($send['gadaipenilai'] as $index=>$nama)
{{ $nama['penilai'] }}<input type="hidden" class="form-control" id="nama_staff" name="nama_staff[]" value="{{$nama['penilai']}}"><br>
@endforeach
</td>
<td align="center">@foreach($send['gadaipenilai'] as $index=>$nama)
{{ $nama['nokpstaff']}}<input type="hidden" class="form-control" id="nokpstaff" name="nokpstaff[]" value="{{$nama['nokpstaff']}}"><br>
@endforeach</td>
<td align="center">@foreach($send['gadaipenilai'] as $index=>$nama)
{{ $nama['total_gadai'] }}<input type="hidden" class="form-control" id="total_gadai" name="total_gadai[]" value="{{$nama['total_gadai']}}"><br>
@endforeach</td>
<td align="right">
@foreach($send['gadaipenilai'] as $index=>$nama)
{{ number_format($nama['total_pembiayaan'], 2) }}<input type="hidden" class="form-control" id="total_pembiayaan" name="total_pembiayaan[]" value="{{$nama['total_pembiayaan']}}"> <br>
@endforeach
</td>
</tr>
@endif
@endforeach
</tbody>
</table>
<div class="modal-footer; text-center" style="margin-top:2%; margin-bottom:2%;">
<a href="{{ route('janakpi.janaekpi') }}" class="btn btn-primary" style="width:8%;">Kembali</a>
<button type="submit" class="btn btn-success">Simpan Data</button>
</div>
</form>
</div>
</div>
</div>
<script>
//Enable tooltips everywhere
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
var tablesenaraitemp = $('#senaraitempsimulasi').DataTable({
"columnDefs": [
{
"targets": 0,
"orderable": false
},
{
"targets": 8,
"orderable": false
}
],
order: [[1, 'asc']],
"info": false,
"lengthChange": false,
"pageLength": 15,
dom: 'Bfrtip',
// buttons: [
// {
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm addcaw',
// text: '<i class="fas fa-plus" id="test"></i>',
// titleAttr: 'Tambah Cawangan',
// action: function ( e, dt, node, config ) {
// // alert( 'Button activated' );
// // console.log('hye');
// $('#myModal').modal("show");
// $('#myModal').on('shown.bs.modal', function () {
// $('#rolename').trigger('focus')
// })
// }
// },
// {
// className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
// titleAttr: 'Export to CSV',
// text: '<i class="fas fa-download"></i>',
// action: function ( e, dt, node, config ) {
// $("#exportform").submit();
// }
// }
// ]
});
// $('.addcaw').tooltip();
// $('.export').tooltip();
// // $( '.dt-buttons').addClass('btn-group');
// $( '.addcaw').removeClass('dt-button');
// $( '.export').removeClass('dt-button');
</script>
<script type='text/javascript'>
$(document).ready(function(){
// Check or Uncheck All checkboxes
$("#checkall").change(function(){
var checked = $(this).is(':checked');
if(checked){
$(".checkbox").each(function(){
$(this).prop("checked",true);
});
}else{
$(".checkbox").each(function(){
$(this).prop("checked",false);
});
}
});
// Changing state of CheckAll checkbox
$(".checkbox").click(function(){
if($(".checkbox").length == $(".checkbox:checked").length) {
$("#checkall").prop("checked", true);
} else {
$("#checkall").prop("checked", false);
}
});
});
</script>
<script>
$(function() {
$( "form" ).submit(function() {
$('#loader').show();
});
});
</script>
@endsection
+13
View File
@@ -720,3 +720,16 @@ Route::group(['middleware' => ['permission:WTDcaw'],'prefix'=>'wtdcaw'], functio
Route::get('/excellistsagwtdprosesbycust/{cawid}',['as'=>'wtdcaw.excellistsagwtdprosesbycust','uses'=>'NotisController@excellistsagwtdprosesbycust']);
});
Route::group(['middleware' => ['permission:skoptugasan'],'prefix'=>'janakpi'], function () {
Route::get('/janaekpi',['as'=>'janakpi.janaekpi','uses'=>'KpiController@janaekpi']);
Route::post('/senaraitempkpi',['as'=>'janakpi.senaraitempkpi','uses'=>'KpiController@senaraitempkpi']);
Route::post('/savedatakpi',['as'=>'janakpi.savedatakpi','uses'=>'KpiController@savedatakpi']);
Route::get('/listdatakpi',['as'=>'janakpi.listdatakpi','uses'=>'KpiController@listdatakpi']);
Route::get('/listdatakpidetail/{nokpstaff}/{kodcaw}',['as'=>'janakpi.listdatakpidetail','uses'=>'KpiController@listdatakpidetail']);
Route::get('/checkpenilai/{nokpstaff}/{jawatan}',['as'=>'janakpi.checkpenilai','uses'=>'KpiController@checkpenilai']);
Route::post('/listdatakpidetail2/{nokpstaff}/{kodcaw}',['as'=>'janakpi.listdatakpidetail2','uses'=>'KpiController@listdatakpidetail2']);
Route::get('/listdatakpidetailall/{kodcaw}',['as'=>'janakpi.listdatakpidetailall','uses'=>'KpiController@listdatakpidetailall']);
Route::post('/listdatakpidetailall2/{kodcaw}',['as'=>'janakpi.listdatakpidetailall2','uses'=>'KpiController@listdatakpidetailall2']);
Route::get('/hapusdatakpi/{recno}',['as'=>'janakpi.hapusdatakpi','uses'=>'KpiController@hapusdatakpi']);
});