From 2cf96352441aa0a63095225c0eb9de11c2bf8be3 Mon Sep 17 00:00:00 2001 From: fifi97 Date: Thu, 24 Jun 2021 03:25:25 +0800 Subject: [PATCH 01/27] perubahan dari segi alirantunai upah semua la okay? --- .../Controllers/AliranTunaiController.php | 1117 ----------------- app/Http/Controllers/KhazanahController.php | 425 ++----- resources/views/aliran_tunai/index.blade.php | 52 +- resources/views/customers/info.blade.php | 36 + .../khazanah/laporan/ansuranupah.blade.php | 112 ++ .../views/khazanah/laporan/gadaian.blade.php | 15 +- .../views/khazanah/laporan/index.blade.php | 4 +- .../khazanah/laporan/penebusan.blade.php | 104 +- .../laporan/ringkasanterkumpul.blade.php | 70 ++ .../views/khazanah/laporan/upah.blade.php | 214 ++++ .../khazanah/pendahuluanserahanmain.blade.php | 2 +- resources/views/layouts/app.blade.php | 6 +- resources/views/modal/historytebus.blade.php | 18 + .../views/print/laporan_gadaian.blade.php | 50 +- .../views/print/laporan_penebusan.blade.php | 82 +- .../laporan_ringkasanterkumpulv2.blade.php | 188 +++ resources/views/print/laporan_upah.blade.php | 317 +++++ routes/web.php | 4 + 18 files changed, 1228 insertions(+), 1588 deletions(-) create mode 100644 resources/views/khazanah/laporan/ansuranupah.blade.php create mode 100644 resources/views/khazanah/laporan/ringkasanterkumpul.blade.php create mode 100644 resources/views/khazanah/laporan/upah.blade.php create mode 100644 resources/views/print/laporan_ringkasanterkumpulv2.blade.php create mode 100644 resources/views/print/laporan_upah.blade.php diff --git a/app/Http/Controllers/AliranTunaiController.php b/app/Http/Controllers/AliranTunaiController.php index ce238f7..441e690 100644 --- a/app/Http/Controllers/AliranTunaiController.php +++ b/app/Http/Controllers/AliranTunaiController.php @@ -110,1069 +110,6 @@ class AliranTunaiController extends Controller $requestkodlaluan = Http::get(config('api.url').'/api/get/pengguna/'.$auth_user['cawangan'],["namateller" => Auth::user()->name ])->json(); $advansur = Http::get(config('api.url').'/api/AnsuranByTarikh/'.$auth_user['cawangan'],['kodlaluan' => Auth::user()->name])->json(); - // dd($advansur); - //******************* INITIALIZE LEJER AM START HERE****************************// - - - $get_glcode=Http::get(config('api.url').'/api/getProduct/'. $auth_user['cawangan'])->json(); - $gl=$get_glcode[0]; - $prCode=$gl['prkod']; - $Gl_Code=$gl['glcode']; - - //new glcode 2021-02-22 - $GL_Code_BayaranOnline="1000/210"; - $GL_CodeUntungSebenar="1000/213"; - $GL_CodeHutangArrahn="1000/211"; - $GL_CodeHutangAkru="2000/007"; - $GL_Code_Tawarruq="1000/017";// new glcode 20210405 - $GL_Code_Untung="5000/017";//new glcode 20210405 - $KOD_Upah='5000/013'; - $KOD_Rebate_L='5000/021'; - $KOD_Rebate_A='1000/021'; - $KOD_ANS='5000/511'; - - $Bayaran_Pendahuluan='1000/019'; - //dapat keterangan glcode - // $gadai_transaction = Http::get(config('api.url') . '/api/gadai/'. $auth_user['cawangan'] . '/' . $current->toDateString())- - $get_glCode_Details=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$Gl_Code])->json(); - - $gl_cdetails=$get_glCode_Details[0]; - $keterangan=$get_glCode_Details[0]['descpt']; //keterangan glcode - $actype=$get_glCode_Details[0]['acttype']; //keterangan acctype - - - // carian perincian glejer untk glcode=1000/010 - $get_current_GLejer_Details=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$Gl_Code])->json(); - - if(sizeof($get_current_GLejer_Details)==0) - { //start kalau xdak data - $jumlah=0.0; - - $getGLedjer=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$Gl_Code])->json(); - - if(sizeof($getGLedjer)==0) - { - $jumlah=0.0; - } - else - { - - //$glejer=$getGLedjer[0]; - $jumlahSemalam=$getGLedjer[0]['jumlah']; - - $hariIniSemalam=$getGLedjer[0]['hariini']; - $jumlah=$jumlahSemalam+$hariIniSemalam; - - - } - - $jumlahBulan_ini=0.0; - $get_GlejerBulan_Tahun=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$Gl_Code])->json(); - - if( sizeof($get_GlejerBulan_Tahun)==0) - { - $jumlahBulan_ini=0.0; - } - else - { - $jumlahBulan_ini=$get_GlejerBulan_Tahun[0]['jumlah']; - $jumlahBulan_ini=$jumlah-$jumlahBulan_ini; - - - }//end bulan tahun - $Jumlah_TahunIni=0.0; - $get_Glejer_Tahun=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$Gl_Code])->json(); - if(sizeof($get_Glejer_Tahun)==0) - { - $Jumlah_TahunIni=0.0; - } - else - { - - - $JumTahunIni=$get_Glejer_Tahun[0]['jumlah']; - - $Jumlah_TahunIni=$jumlah-$JumTahunIni; - - - } - - $HariIni=0.0; - $kelmarin=$jumlah-$HariIni; - //insert glejer untuk current date /hari ini - $daftarGlejer=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[ - - 'kodcaw'=>$auth_user['cawangan'], - 'glcode'=>$Gl_Code, - 'descpt'=>$keterangan, - 'debit'=>0.0, - 'kredit'=>0.0, - 'hariini'=>$HariIni, - 'kelmarin'=>$kelmarin, - 'jumlah'=>$jumlah, - 'bulanini'=>$jumlahBulan_ini, - 'tahunini'=>$Jumlah_TahunIni, - 'acttype'=> $actype - - ]); - - } - else - { - - } - - $getBayarOnline_GL=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$GL_Code_BayaranOnline])->json(); - $keteranganBayaranOnlie=$getBayarOnline_GL[0]['descpt']; //keterangan glcode - $actypeBayaranOnline=$getBayarOnline_GL[0]['acttype']; //keterangan acctype - - $get_current_GLejer_Details_BayaranOnline=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$GL_Code_BayaranOnline])->json(); - - if(sizeof($get_current_GLejer_Details_BayaranOnline)==0) - { //start kalau xdak data - $jumlah=0.0; - - $getGLedjer=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$GL_Code_BayaranOnline])->json(); - - if(sizeof($getGLedjer)==0) - { - $jumlah=0.0; - } - else - { - - //$glejer=$getGLedjer[0]; - $jumlahSemalam=$getGLedjer[0]['jumlah']; - - $hariIniSemalam=$getGLedjer[0]['hariini']; - $jumlah=$jumlahSemalam+$hariIniSemalam; - - - } - - - $jumlahBulan_ini=0.0; - $get_GlejerBulan_Tahun=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$GL_Code_BayaranOnline])->json(); - - if( sizeof($get_GlejerBulan_Tahun)==0) - { - $jumlahBulan_ini=0.0; - } - else - { - $jumlahBulan_ini=$get_GlejerBulan_Tahun[0]['jumlah']; - $jumlahBulan_ini=$jumlah-$jumlahBulan_ini; - }//end bulan tahun - $Jumlah_TahunIni=0.0; - $get_Glejer_Tahun=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$GL_Code_BayaranOnline])->json(); - if(sizeof($get_Glejer_Tahun)==0) - { - $Jumlah_TahunIni=0.0; - } - else - { - - - $JumTahunIni=$get_Glejer_Tahun[0]['jumlah']; - $Jumlah_TahunIni=$jumlah-$JumTahunIni; - - } - - $HariIni=0.0; - $kelmarin=$jumlah-$HariIni; - //insert glejer untuk current date /hari ini - $daftarGlejer=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[ - - 'kodcaw' =>$auth_user['cawangan'], - 'glcode' =>$GL_Code_BayaranOnline, - 'descpt' =>$keteranganBayaranOnlie, - 'debit'=>0.0, - 'kredit'=>0.0, - 'hariini'=>$HariIni, - 'kelmarin'=>$kelmarin, - 'jumlah'=>$jumlah, - 'bulanini'=>$jumlahBulan_ini, - 'tahunini'=>$Jumlah_TahunIni, - 'acttype'=> $actypeBayaranOnline - - ]); - - } - else - { - - - - } - - //GL Penghutang Ar-Rahn - $GL_penghutang_Arrahn=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$GL_CodeHutangArrahn])->json(); - $keterangan_PenghutangArrahn=$GL_penghutang_Arrahn[0]['descpt']; //keterangan glcode - $actype_PenghutangArrahn=$GL_penghutang_Arrahn[0]['acttype']; //details_code - - $jumlah_PenghutangArrahn=0.0; - $get_current_GLejer_Details_PA=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$GL_CodeHutangArrahn])->json(); - if( sizeof($get_current_GLejer_Details_PA)==0) - { - - $getGLedjer_Semalam=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$GL_CodeHutangArrahn])->json(); - - $jumlah_hutangArrahn=0.0; - if(sizeof($getGLedjer_Semalam)==0) - { - - $jumlah_hutangArrahn =0.0; - - } - else - { - - $jumlahSemalam=$getGLedjer_Semalam[0]['jumlah']; - $hariIniSemalam=$getGLedjer_Semalam[0]['hariini']; - $jumlah_hutangArrahn=$jumlahSemalam+$hariIniSemalam; - } - - $jumlahBulan_iniArrahn=0.0; - $get_GlejerBulan_Tahun=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$GL_CodeHutangArrahn])->json(); - if(sizeof($get_GlejerBulan_Tahun)==0) - { - - $jumlahBulan_iniArrahn=0.0; - } - else - { - - $jumlahBulan_iniArrahn=$get_GlejerBulan_Tahun[0]['jumlah']; - $jumlahBulan_iniArrahn=$jumlah_hutangArrahn-$jumlahBulan_iniArrahn; - - } - - $Jumlah_TahunIni=0.0; - $get_Glejer_Tahun=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$GL_CodeHutangArrahn])->json(); - $jumlah=0.0; - if(sizeof($get_Glejer_Tahun)==0) - { - $Jumlah_TahunIniArrahn=0.0; - - } - else - { - - $Jumlah_TahunIniArrahn=$get_Glejer_Tahun[0]['jumlah']; - $Jumlah_TahunIniArrahn=$jumlah_hutangArrahn-$Jumlah_TahunIniArrahn; - - } - - $HariIniHutangArrahn=0.0; - $kelmarinHutangArrahn=$jumlah_hutangArrahn-$HariIniHutangArrahn; - - - $daftarGlejer=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[ - 'kodcaw' =>$auth_user['cawangan'], - 'glcode' =>$GL_CodeHutangArrahn, - 'descpt' =>$keterangan_PenghutangArrahn, - 'debit'=>0.0, - 'kredit'=>0.0, - 'hariini'=>$HariIniHutangArrahn, - 'kelmarin'=>$kelmarinHutangArrahn, - 'jumlah'=>$jumlah_hutangArrahn, - 'bulanini'=>$jumlahBulan_iniArrahn, - 'tahunini'=>$Jumlah_TahunIniArrahn, - 'acttype'=> $actype_PenghutangArrahn - - ]); - - }//END OF CARIAN GET GLEJER PENGHUTANG AR-RAHN - else - { - - } - //GL Penghutang Ar-Rahn - $GL_penghutang_Akru=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$GL_CodeHutangAkru])->json(); - $keterangan_PenghutangAkru=$GL_penghutang_Akru[0]['descpt']; //keterangan glcode - $actype_PenghutangAkru=$GL_penghutang_Akru[0]['acttype']; //details_code - - $get_current_GLejer_Details_HA=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$GL_CodeHutangAkru])->json(); - - if(sizeof($get_current_GLejer_Details_HA)==0) - { - $jumlahAkru=0.0; - $getGLedjer_Semalam_HA=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$GL_CodeHutangAkru])->json(); - if(sizeof($getGLedjer_Semalam_HA)==0) - { - $jumlahAkru=0.0; - - } - else - { - $jumlahSemalam=$getGLedjer_Semalam_HA[0]['jumlah']; - $hariIniSemalam=$getGLedjer_Semalam_HA[0]['hariini']; - $jumlahAkru=$jumlahSemalam+$hariIniSemalam; - - } - - $jumlahBulan_ini_HA=0.0; - $get_GlejerBulan_Tahun_HA=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$GL_CodeHutangAkru])->json(); - if(sizeof($get_GlejerBulan_Tahun_HA)==0) - { - - $jumlahBulan_iniAkru=0.0; - } - else - { - - $jumlahBulan_ini_HA=$get_GlejerBulan_Tahun_HA[0]['jumlah']; - $jumlahBulan_ini_HA=$jumlahAkru-$jumlahBulan_ini_HA; - - } - - $Jumlah_TahunIni_HA=0.0; - $get_Glejer_Tahun_HA=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$GL_CodeHutangAkru])->json(); - if(sizeof($get_GlejerBulan_Tahun_HA)==0) - { - $Jumlah_TahunIni_HA=0.0; - - } - else - { - - $Jumlah_TahunIni_HA=$get_GlejerBulan_Tahun_HA[0]['jumlah']; - $Jumlah_TahunIni_HA=$jumlahAkru-$Jumlah_TahunIni_HA; - - - } - $hariIni_akru=0.0; - $kelmarin_akru= $jumlahAkru-$hariIni_akru; - - $daftarGlejer=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[ - 'kodcaw' =>$auth_user['cawangan'], - 'glcode' =>$GL_CodeHutangAkru, - 'descpt' =>$keterangan_PenghutangAkru, - 'debit'=>0.0, - 'kredit'=>0.0, - 'hariini'=>$hariIni_akru, - 'kelmarin'=>$kelmarin_akru, - 'jumlah'=>$jumlahAkru, - 'bulanini'=>$jumlahBulan_ini_HA, - 'tahunini'=>$Jumlah_TahunIni_HA, - 'acttype'=> $actype_PenghutangAkru - - ]); - - } - else{ - - - } - - $get_KOD_UPAH=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$KOD_Upah])->json(); - - $gl_cdetails_upah= $get_KOD_UPAH[0]; - $keterangan_upah= $get_KOD_UPAH[0]['descpt']; //keterangan glcode - $actype_upah= $get_KOD_UPAH[0]['acttype']; //keterangan acctype - - // carian perincian glejer untk glcode=1000/010 - $get_current_GLejer_Details_Upah=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$KOD_Upah])->json(); - - if(sizeof($get_current_GLejer_Details_Upah)==0) - { //start kalau xdak data - $jumlah_Upah=0.0; - - $getGLedjer_Upah=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$KOD_Upah])->json(); - - if(sizeof($getGLedjer_Upah)==0) - { - $jumlah_upah=0.0; - } - else - { - - //$glejer=$getGLedjer[0]; - $jumlahSemalam_Upah=$getGLedjer_Upah[0]['jumlah']; - $hariIniSemalam_Upah=$getGLedjer_Upah[0]['hariini']; - $jumlah_Upah=$jumlahSemalam_Upah+$hariIniSemalam_Upah; - - - } - - $jumlahBulan_ini_Upah=0.0; - $get_GlejerBulan_Tahun_Upah=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$KOD_Upah])->json(); - - if( sizeof($get_GlejerBulan_Tahun_Upah)==0) - { - $jumlahBulan_ini_Upah=0.0; - } - else - { - $jumlahBulan_ini_Upah=$get_GlejerBulan_Tahun_Upah[0]['jumlah']; //try mcm tadi - $jumlahBulan_ini_Upah=$jumlah_Upah-$jumlahBulan_ini_Upah; - - - }//end bulan tahun - $Jumlah_TahunIni_Upah=0.0; - $get_Glejer_Tahun_Upah=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$KOD_Upah])->json(); - if(sizeof($get_Glejer_Tahun_Upah)==0) - { - $Jumlah_TahunIni_Upah=0.0; - } - else - { - - $JumTahunIni_Upah=$get_Glejer_Tahun_Upah[0]['jumlah']; - $Jumlah_TahunIni_Upah=$jumlah_Upah-$JumTahunIni_Upah; - - } - - $HariIni_Upah=0.0; - $kelmarin_Upah=$jumlah_Upah-$HariIni_Upah; - //insert glejer untuk current date /hari ini - $daftarGlejer=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[ - - 'kodcaw'=>$auth_user['cawangan'], - 'glcode'=>$KOD_Upah, - 'descpt'=>$keterangan_upah, - 'debit'=>0.0, - 'kredit'=>0.0, - 'hariini'=>$HariIni_Upah, - 'kelmarin'=>$kelmarin_Upah, - 'jumlah'=>$jumlah_Upah, - 'bulanini'=>$jumlahBulan_ini_Upah, - 'tahunini'=>$Jumlah_TahunIni_Upah, - 'acttype'=> $actype_upah - - ]); - - } - else - { - - - } - //initial Pinjaman DiBeri untuk hari ini... - $KOD_Pinjam='1000/013'; - - $get_KOD_Pinjam=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$KOD_Pinjam])->json(); - - $gl_cdetails_pinjam= $get_KOD_Pinjam[0]; - $keterangan_pinjam= $get_KOD_Pinjam[0]['descpt']; //keterangan glcode - $actype_pinjam= $get_KOD_Pinjam[0]['acttype']; //keterangan acctype - - $get_current_GLejer_Details_Pinjam=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$KOD_Pinjam])->json(); - - - if(sizeof($get_current_GLejer_Details_Pinjam)==0) - { - - - $jumlah_Pinjam=0.0; - - $getGLedjer_Pinjam_Semalam=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$KOD_Pinjam])->json(); - if(sizeof($getGLedjer_Pinjam_Semalam)==0) - { - $jumlah_pinjam=0.0; - } - else - { - - $jumlahSemalam_Pinjam=$getGLedjer_Pinjam_Semalam[0]['jumlah']; - - $hariIniSemalam_Pinjam=$getGLedjer_Pinjam_Semalam[0]['hariini']; - $jumlah_Pinjam=$jumlahSemalam_Pinjam+$hariIniSemalam_Pinjam; - - - } - - - - $jumlahBulan_ini_Pinjam=0.0; - $get_GlejerBulan_Tahun_Pinjam=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$KOD_Pinjam])->json(); - if( sizeof($get_GlejerBulan_Tahun_Pinjam)==0) - { - $jumlahBulan_ini_Pinjam=0.0; - } - else - { - - $jumlahBulan_ini_Pinjam=$get_GlejerBulan_Tahun_Pinjam[0]['jumlah']; - $jumlahBulan_ini_Pinjam=$jumlah_Pinjam-$jumlahBulan_ini_Pinjam; - - } - - $Jumlah_TahunIni_Pinjam=0.0; - $get_Glejer_Tahun_Pinjam=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$KOD_Pinjam])->json(); - - if(sizeof($get_Glejer_Tahun_Pinjam)==0) - { - $Jumlah_TahunIni_Pinjam=0.0; - } - else - { - $JumTahunIni_Pinjam=$get_Glejer_Tahun_Pinjam[0]['jumlah']; - $Jumlah_TahunIni_Pinjam=$jumlah_Pinjam-$JumTahunIni_Pinjam; - - } - - $HariIni_Pinjam=0.0; - $kelmarin_Pinjam=$jumlah_Pinjam-$HariIni_Pinjam; - - $daftarGlejer_pinjam=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[ - - 'kodcaw'=>$auth_user['cawangan'], - 'glcode'=>$KOD_Pinjam, - 'descpt'=>$keterangan_pinjam, - 'debit'=>0.0, - 'kredit'=>0.0, - 'hariini'=>$HariIni_Pinjam, - 'kelmarin'=>$kelmarin_Pinjam, - 'jumlah'=>$jumlah_Pinjam, - 'bulanini'=>$jumlahBulan_ini_Pinjam, - 'tahunini'=>$Jumlah_TahunIni_Pinjam, - 'acttype'=> $actype_pinjam - - ]); - - } - else{ - - } - - - $get_KOD_PinjamTawaruqq=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$GL_Code_Tawarruq])->json(); - - $gl_cdetails_pinjam= $get_KOD_PinjamTawaruqq [0]; - $keterangan_pinjam=$get_KOD_PinjamTawaruqq [0]['descpt']; //keterangan glcode - $actype_pinjam= $get_KOD_PinjamTawaruqq[0]['acttype']; //keterangan acctype - - $get_current_GLejer_Details_Pinjam_Tawaruqq=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$GL_Code_Tawarruq])->json(); - - - if(sizeof($get_current_GLejer_Details_Pinjam_Tawaruqq)==0) - { - - - $jumlah_Pinjam=0.0; - - $getGLedjer_Pinjam_Semalam=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$GL_Code_Tawarruq])->json(); - if(sizeof($getGLedjer_Pinjam_Semalam)==0) - { - $jumlah_pinjam=0.0; - } - else - { - - $jumlahSemalam_Pinjam=$getGLedjer_Pinjam_Semalam[0]['jumlah']; - - $hariIniSemalam_Pinjam=$getGLedjer_Pinjam_Semalam[0]['hariini']; - $jumlah_Pinjam=$jumlahSemalam_Pinjam+$hariIniSemalam_Pinjam; - - - } - $jumlahBulan_ini_Pinjam=0.0; - $get_GlejerBulan_Tahun_Pinjam=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$GL_Code_Tawarruq])->json(); - if( sizeof($get_GlejerBulan_Tahun_Pinjam)==0) - { - $jumlahBulan_ini_Pinjam=0.0; - } - else - { - - $jumlahBulan_ini_Pinjam=$get_GlejerBulan_Tahun_Pinjam[0]['jumlah']; - $jumlahBulan_ini_Pinjam=$jumlah_Pinjam-$jumlahBulan_ini_Pinjam; - - } - - $Jumlah_TahunIni_Pinjam=0.0; - $get_Glejer_Tahun_Pinjam=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$GL_Code_Tawarruq])->json(); - - if(sizeof($get_Glejer_Tahun_Pinjam)==0) - { - $Jumlah_TahunIni_Pinjam=0.0; - } - else - { - $JumTahunIni_Pinjam=$get_Glejer_Tahun_Pinjam[0]['jumlah']; - $Jumlah_TahunIni_Pinjam=$jumlah_Pinjam-$JumTahunIni_Pinjam; - - } - - $HariIni_Pinjam=0.0; - $kelmarin_Pinjam=$jumlah_Pinjam-$HariIni_Pinjam; - - $daftarGlejer_pinjam=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[ - - 'kodcaw'=>$auth_user['cawangan'], - 'glcode'=>$GL_Code_Tawarruq, - 'descpt'=>$keterangan_pinjam, - 'debit'=>0.0, - 'kredit'=>0.0, - 'hariini'=>$HariIni_Pinjam, - 'kelmarin'=>$kelmarin_Pinjam, - 'jumlah'=>$jumlah_Pinjam, - 'bulanini'=>$jumlahBulan_ini_Pinjam, - 'tahunini'=>$Jumlah_TahunIni_Pinjam, - 'acttype'=> $actype_pinjam - - ]); - - } - else{ - - } - - $get_KOD_UPAH=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$GL_Code_Untung])->json(); - - $gl_cdetails_upah= $get_KOD_UPAH[0]; - $keterangan_upah= $get_KOD_UPAH[0]['descpt']; //keterangan glcode - $actype_upah= $get_KOD_UPAH[0]['acttype']; //keterangan acctype - - // carian perincian glejer untk glcode=1000/010 - $get_current_GLejer_Details_Upah=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$GL_Code_Untung])->json(); - - if(sizeof($get_current_GLejer_Details_Upah)==0) - { //start kalau xdak data - $jumlah_Upah=0.0; - - $getGLedjer_Upah=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$GL_Code_Untung])->json(); - - if(sizeof($getGLedjer_Upah)==0) - { - $jumlah_upah=0.0; - } - else - { - - $jumlahSemalam_Upah=$getGLedjer_Upah[0]['jumlah']; - $hariIniSemalam_Upah=$getGLedjer_Upah[0]['hariini']; - $jumlah_Upah=$jumlahSemalam_Upah+$hariIniSemalam_Upah; - - } - - $jumlahBulan_ini_Upah=0.0; - $get_GlejerBulan_Tahun_Upah=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$GL_Code_Untung])->json(); - - if( sizeof($get_GlejerBulan_Tahun_Upah)==0) - { - $jumlahBulan_ini_Upah=0.0; - } - else - { - $jumlahBulan_ini_Upah=$get_GlejerBulan_Tahun[0]['jumlah']; - $jumlahBulan_ini_Upah=$jumlah_Upah-$jumlahBulan_ini_Upah; - }//end bulan tahun - $Jumlah_TahunIni_Upah=0.0; - $get_Glejer_Tahun_Upah=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$GL_Code_Untung])->json(); - if(sizeof($get_Glejer_Tahun_Upah)==0) - { - $Jumlah_TahunIni_Upah=0.0; - } - else - { - - $JumTahunIni_Upah=$get_Glejer_Tahun_Upah[0]['jumlah']; - $Jumlah_TahunIni_Upah=$jumlah_Upah-$JumTahunIni_Upah; - - - } - - $HariIni_Upah=0.0; - $kelmarin_Upah=$jumlah_Upah-$HariIni_Upah; - //insert glejer untuk current date /hari ini - $daftarGlejer=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[ - - 'kodcaw'=>$auth_user['cawangan'], - 'glcode'=>$GL_Code_Untung, - 'descpt'=>$keterangan_upah, - 'debit'=>0.0, - 'kredit'=>0.0, - 'hariini'=>$HariIni_Upah, - 'kelmarin'=>$kelmarin_Upah, - 'jumlah'=>$jumlah_Upah, - 'bulanini'=>$jumlahBulan_ini_Upah, - 'tahunini'=>$Jumlah_TahunIni_Upah, - 'acttype'=> $actype_upah - - ]); - - } - else - { - - - } - - $get_KOD_UPAH=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$KOD_Rebate_L])->json(); - - $gl_cdetails_upah= $get_KOD_UPAH[0]; - $keterangan_upah= $get_KOD_UPAH[0]['descpt']; //keterangan glcode - $actype_upah= $get_KOD_UPAH[0]['acttype']; //keterangan acctype - - // carian perincian glejer untk glcode=1000/010 - $get_current_GLejer_Details_Upah=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$KOD_Rebate_L])->json(); - - if(sizeof($get_current_GLejer_Details_Upah)==0) - { //start kalau xdak data - $jumlah_Upah=0.0; - - $getGLedjer_Upah=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$KOD_Rebate_L])->json(); - - if(sizeof($getGLedjer_Upah)==0) - { - $jumlah_upah=0.0; - } - else - { - - //$glejer=$getGLedjer[0]; - $jumlahSemalam_Upah=$getGLedjer_Upah[0]['jumlah']; - $hariIniSemalam_Upah=$getGLedjer_Upah[0]['hariini']; - $jumlah_Upah=$jumlahSemalam_Upah+$hariIniSemalam_Upah; - - - } - - $jumlahBulan_ini_Upah=0.0; - $get_GlejerBulan_Tahun_Upah=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$KOD_Rebate_L])->json(); - - if( sizeof($get_GlejerBulan_Tahun_Upah)==0) - { - $jumlahBulan_ini_Upah=0.0; - } - else - { - $jumlahBulan_ini_Upah=$get_GlejerBulan_Tahun[0]['jumlah']; - $jumlahBulan_ini_Upah=$jumlah_Upah-$jumlahBulan_ini_Upah; - }//end bulan tahun - $Jumlah_TahunIni_Upah=0.0; - $get_Glejer_Tahun_Upah=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$KOD_Rebate_L])->json(); - if(sizeof($get_Glejer_Tahun_Upah)==0) - { - $Jumlah_TahunIni_Upah=0.0; - } - else - { - - $JumTahunIni_Upah=$get_Glejer_Tahun_Upah[0]['jumlah']; - $Jumlah_TahunIni_Upah=$jumlah_Upah-$JumTahunIni_Upah; - - } - - $HariIni_Upah=0.0; - $kelmarin_Upah=$jumlah_Upah-$HariIni_Upah; - //insert glejer untuk current date /hari ini - $daftarGlejer=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[ - - 'kodcaw'=>$auth_user['cawangan'], - 'glcode'=>$KOD_Rebate_L, - 'descpt'=>$keterangan_upah, - 'debit'=>0.0, - 'kredit'=>0.0, - 'hariini'=>$HariIni_Upah, - 'kelmarin'=>$kelmarin_Upah, - 'jumlah'=>$jumlah_Upah, - 'bulanini'=>$jumlahBulan_ini_Upah, - 'tahunini'=>$Jumlah_TahunIni_Upah, - 'acttype'=> $actype_upah - - ]); - - } - else - { - - - - } - - $get_KOD_UPAH=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$KOD_Rebate_A])->json(); - - $gl_cdetails_upah= $get_KOD_UPAH[0]; - $keterangan_upah= $get_KOD_UPAH[0]['descpt']; //keterangan glcode - $actype_upah= $get_KOD_UPAH[0]['acttype']; //keterangan acctype - - // carian perincian glejer untk glcode=1000/010 - $get_current_GLejer_Details_Upah=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$KOD_Rebate_A])->json(); - - if(sizeof($get_current_GLejer_Details_Upah)==0) - { //start kalau xdak data - $jumlah_Upah=0.0; - - $getGLedjer_Upah=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$KOD_Rebate_A])->json(); - - if(sizeof($getGLedjer_Upah)==0) - { - $jumlah_upah=0.0; - } - else - { - - //$glejer=$getGLedjer[0]; - $jumlahSemalam_Upah=$getGLedjer_Upah[0]['jumlah']; - $hariIniSemalam_Upah=$getGLedjer_Upah[0]['hariini']; - $jumlah_Upah=$jumlahSemalam_Upah+$hariIniSemalam_Upah; - - - } - - $jumlahBulan_ini_Upah=0.0; - $get_GlejerBulan_Tahun_Upah=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$KOD_Rebate_A])->json(); - - if( sizeof($get_GlejerBulan_Tahun_Upah)==0) - { - $jumlahBulan_ini_Upah=0.0; - } - else - { - $jumlahBulan_ini_Upah=$get_GlejerBulan_Tahun[0]['jumlah']; - $jumlahBulan_ini_Upah=$jumlah_Upah-$jumlahBulan_ini_Upah; - }//end bulan tahun - $Jumlah_TahunIni_Upah=0.0; - $get_Glejer_Tahun_Upah=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$KOD_Rebate_A])->json(); - if(sizeof($get_Glejer_Tahun_Upah)==0) - { - $Jumlah_TahunIni_Upah=0.0; - } - else - { - - - $JumTahunIni_Upah=$get_Glejer_Tahun_Upah[0]['jumlah']; - - $Jumlah_TahunIni_Upah=$jumlah_Upah-$JumTahunIni_Upah; - - - } - $HariIni_Upah=0.0; - $kelmarin_Upah=$jumlah_Upah-$HariIni_Upah; - //insert glejer untuk current date /hari ini - $daftarGlejer=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[ - - 'kodcaw'=>$auth_user['cawangan'], - 'glcode'=>$KOD_Rebate_A, - 'descpt'=>$keterangan_upah, - 'debit'=>0.0, - 'kredit'=>0.0, - 'hariini'=>$HariIni_Upah, - 'kelmarin'=>$kelmarin_Upah, - 'jumlah'=>$jumlah_Upah, - 'bulanini'=>$jumlahBulan_ini_Upah, - 'tahunini'=>$Jumlah_TahunIni_Upah, - 'acttype'=> $actype_upah - - ]); - - } - else - { - - - - } - - $get_KOD_UPAH=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$Bayaran_Pendahuluan])->json(); - - $gl_cdetails_upah= $get_KOD_UPAH[0]; - $keterangan_upah= $get_KOD_UPAH[0]['descpt']; //keterangan glcode - $actype_upah= $get_KOD_UPAH[0]['acttype']; //keterangan acctype - - // carian perincian glejer untk glcode=1000/010 - $get_current_GLejer_Details_Upah=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$Bayaran_Pendahuluan])->json(); - - if(sizeof($get_current_GLejer_Details_Upah)==0) - { //start kalau xdak data - $jumlah_Upah=0.0; - - $getGLedjer_Upah=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$Bayaran_Pendahuluan])->json(); - - if(sizeof($getGLedjer_Upah)==0) - { - $jumlah_upah=0.0; - } - else - { - - //$glejer=$getGLedjer[0]; - $jumlahSemalam_Upah=$getGLedjer_Upah[0]['jumlah']; - $hariIniSemalam_Upah=$getGLedjer_Upah[0]['hariini']; - $jumlah_Upah=$jumlahSemalam_Upah+$hariIniSemalam_Upah; - - - } - - $jumlahBulan_ini_Upah=0.0; - $get_GlejerBulan_Tahun_Upah=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$Bayaran_Pendahuluan])->json(); - - if( sizeof($get_GlejerBulan_Tahun_Upah)==0) - { - $jumlahBulan_ini_Upah=0.0; - } - else - { - $jumlahBulan_ini_Upah=$get_GlejerBulan_Tahun[0]['jumlah']; - $jumlahBulan_ini_Upah=$jumlah_Upah-$jumlahBulan_ini_Upah; - }//end bulan tahun - $Jumlah_TahunIni_Upah=0.0; - $get_Glejer_Tahun_Upah=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$Bayaran_Pendahuluan])->json(); - if(sizeof($get_Glejer_Tahun_Upah)==0) - { - $Jumlah_TahunIni_Upah=0.0; - } - else - { - - - $JumTahunIni_Upah=$get_Glejer_Tahun_Upah[0]['jumlah']; - - $Jumlah_TahunIni_Upah=$jumlah_Upah-$JumTahunIni_Upah; - - - } - - $HariIni_Upah=0.0; - $kelmarin_Upah=$jumlah_Upah-$HariIni_Upah; - //insert glejer untuk current date /hari ini - $daftarGlejer=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[ - - 'kodcaw'=>$auth_user['cawangan'], - 'glcode'=>$Bayaran_Pendahuluan, - 'descpt'=>$keterangan_upah, - 'debit'=>0.0, - 'kredit'=>0.0, - 'hariini'=>$HariIni_Upah, - 'kelmarin'=>$kelmarin_Upah, - 'jumlah'=>$jumlah_Upah, - 'bulanini'=>$jumlahBulan_ini_Upah, - 'tahunini'=>$Jumlah_TahunIni_Upah, - 'acttype'=> $actype_upah - - ]); - - } - else - { - - - - } - - - - - //UPAH U - - $get_KOD_UPAH=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$KOD_ANS])->json(); - - $gl_cdetails_upah= $get_KOD_UPAH[0]; - $keterangan_upah= $get_KOD_UPAH[0]['descpt']; //keterangan glcode - $actype_upah= $get_KOD_UPAH[0]['acttype']; //keterangan acctype - - // carian perincian glejer untk glcode=1000/010 - $get_current_GLejer_Details_Upah=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$KOD_ANS])->json(); - - if(sizeof($get_current_GLejer_Details_Upah)==0) - { //start kalau xdak data - $jumlah_Upah=0.0; - - $getGLedjer_Upah=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$KOD_ANS])->json(); - - if(sizeof($getGLedjer_Upah)==0) - { - $jumlah_upah=0.0; - } - else - { - - //$glejer=$getGLedjer[0]; - $jumlahSemalam_Upah=$getGLedjer_Upah[0]['jumlah']; - $hariIniSemalam_Upah=$getGLedjer_Upah[0]['hariini']; - $jumlah_Upah=$jumlahSemalam_Upah+$hariIniSemalam_Upah; - - - } - - $jumlahBulan_ini_Upah=0.0; - $get_GlejerBulan_Tahun_Upah=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$KOD_ANS])->json(); - - if( sizeof($get_GlejerBulan_Tahun_Upah)==0) - { - $jumlahBulan_ini_Upah=0.0; - } - else - { - $jumlahBulan_ini_Upah=$get_GlejerBulan_Tahun_Upah[0]['jumlah']; - $jumlahBulan_ini_Upah=$jumlah_Upah-$jumlahBulan_ini_Upah; - }//end bulan tahun - $Jumlah_TahunIni_Upah=0.0; - $get_Glejer_Tahun_Upah=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$KOD_ANS])->json(); - if(sizeof($get_Glejer_Tahun_Upah)==0) - { - $Jumlah_TahunIni_Upah=0.0; - } - else - { - - - $JumTahunIni_Upah=$get_Glejer_Tahun_Upah[0]['jumlah']; - - $Jumlah_TahunIni_Upah=$jumlah_Upah-$JumTahunIni_Upah; - - - } - - $HariIni_Upah=0.0; - $kelmarin_Upah=$jumlah_Upah-$HariIni_Upah; - //insert glejer untuk current date /hari ini - $daftarGlejer=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[ - - 'kodcaw'=>$auth_user['cawangan'], - 'glcode'=>$KOD_ANS, - 'descpt'=>$keterangan_upah, - 'debit'=>0.0, - 'kredit'=>0.0, - 'hariini'=>$HariIni_Upah, - 'kelmarin'=>$kelmarin_Upah, - 'jumlah'=>$jumlah_Upah, - 'bulanini'=>$jumlahBulan_ini_Upah, - 'tahunini'=>$Jumlah_TahunIni_Upah, - 'acttype'=> $actype_upah - - ]); - - } - else - { - - - - } - - - - - - - - - - - - - - - - - - - - - - - - - - - //************************ END LEJER AM********************************** - - return view('aliran_tunai.index',compact('cawangan_info','alirantunai','api_url','GT','denominasi','gadai_tebus','tuntutbaki','advansur','addtunai')); } @@ -1339,60 +276,6 @@ class AliranTunaiController extends Controller 'bakiakhir'=>$bakiakhir ]); - //Lejer AM untuk Transaksi U..; - $KOD_ANS='5000/511'; - $KOD_TUNAI='1000/010'; - - $upahdibayar=$advansur['upahDibayar']; - $get_tunai=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$KOD_TUNAI])->json(); - - $hariini_tunai=$get_tunai[0]['hariini']; - $kelmarin_tunai=$get_tunai[0]['kelmarin']; - $jumlah_tunai=$get_tunai[0]['jumlah']; - $debit_tunai=$get_tunai[0]['debit']; - $recno_tunai=$get_tunai[0]['recno']; - $kredit_tunai=$get_tunai[0]['kredit']; - - $debit_tunai=$debit_tunai+$upahdibayar; - $hariini_tunai=$debit_tunai-$kredit_tunai; - $kelmarin_tunai=$jumlah_tunai-$hariini_tunai; - $update_tunaiupah=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_tunai, - 'debit'=>$debit_tunai, - 'kredit'=>$kredit_tunai, - 'hariini'=>$hariini_tunai, - 'kelmarin'=>$kelmarin_tunai, - - ]); - $get_upah=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$KOD_ANS])->json(); - - $hariini_upah=$get_upah[0]['hariini']; - $kelmarin_upah=$get_upah[0]['kelmarin']; - $jumlah_upah=$get_upah[0]['jumlah']; - $debit_upah=$get_upah[0]['debit']; - $recno_upah=$get_upah[0]['recno']; - $kredit_upah=$get_upah[0]['kredit']; - $kredit_upah=$kredit_upah+$upahdibayar; - $hariini_upah=$debit_upah-$kredit_upah; - $kelmarin_upah=$jumlah_upah-$hariini_upah; - $update_tunaiupahU=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_upah, - 'debit'=>$debit_upah, - 'kredit'=>$kredit_upah, - 'hariini'=>$hariini_upah, - 'kelmarin'=>$kelmarin_upah, - - ]); - - - - - - - - - - } public function LaporanSerahan(Request $request) diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index e4ac06a..b45eb97 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -3182,6 +3182,15 @@ class KhazanahController extends Controller return view('print.laporan_marhunterkumpul', compact('marhun','cawangan_detail','tarikh_cetak','tebus_date','api_url')); } + public function laporanRingkasanTerkumpul(){ + $auth_user = Auth::user(); + $api_url = config('api.url'); + + $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); + + return view('khazanah.laporan.ringkasanterkumpul',compact('cawangan_info','api_url')); + } + public function laporanRingkasanHarian(){ $auth_user = Auth::user(); $api_url = config('api.url'); @@ -3278,21 +3287,33 @@ class KhazanahController extends Controller $current = Carbon::now(); $current = new Carbon(); $tarikh_cetak = $current->toDateString(); - if($request->datetimepicker1 == null){ - $tebus_date = $current->toDateString(); - }else{ - $split_date = explode('-',$request->datetimepicker1); - $tebus_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0]; - } - $marhun = Http::get(config('api.url'). '/api/gadai/laporan/ringkasan/'. $auth_user['cawangan'],['tarikh' => $tebus_date])->json(); - $marhun = $marhun[0]; - $keseluruhanupahsimpan = $marhun['lelongupahsimpan'] + $marhun['tebus'][0]['upahsimpan'] + $marhun['advansur'][0]['upahsimpan']; + if($request->datemula == null){ + $mula_date = '2017-01-01'; + }else{ + $split_date = explode('-', $request->datemula); + $mula_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0]; + } + + if($request->datehingga == null){ + $hingga_date = $current->toDateString(); + }else{ + $split_date = explode('-', $request->datehingga); + $hingga_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0]; + } + + $laporan_ringkasan = Http::get(config('api.url') . '/api/laporan/terkumpul',[ + 'kodcaw' => $auth_user['cawangan'], + 'mula' => $mula_date, + 'akhir' => $hingga_date + ])->json(); + + $laporan_ringkasan = $laporan_ringkasan[0]; $cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json(); $cawangan_detail=$cawangan[0]; - // dd($gadai); - return view('print.laporan_ringkasanterkumpul', compact('keseluruhanupahsimpan','marhun','cawangan_detail','tarikh_cetak','tebus_date','api_url')); + + return view('print.laporan_ringkasanterkumpulv2', compact('laporan_ringkasan','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url')); } public function laporanKawalanStok(){ @@ -3486,335 +3507,6 @@ class KhazanahController extends Controller $amaun=$request->amaun; - if($request->jenisgldetail == 'serahan') - { - - - - $KOD_SERAH='1000/020'; - $TUNAI='1000/010'; - $get_glCode_Details=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json(); - - $gl_cdetails=$get_glCode_Details[0]; - $keterangan=$get_glCode_Details[0]['descpt']; //keterangan glcode - $actype=$get_glCode_Details[0]['acttype']; //keterangan acctype - - $get_current_GLejer_Details=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json(); - if(sizeof($get_current_GLejer_Details)==0) - { - - $jumlah=0.0; - - - $getGLedjer=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json(); - if(sizeof($getGLedjer)==0) - { - $jumlah=0.0; - } - else - { - - //$glejer=$getGLedjer[0]; - $jumlahSemalam=$getGLedjer[0]['jumlah']; - - $hariIniSemalam=$getGLedjer[0]['hariini']; - $jumlah=$jumlahSemalam+$hariIniSemalam; - - - } - $jumlahBulan_ini=0.0; - $get_GlejerBulan_Tahun=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json(); - - if( sizeof($get_GlejerBulan_Tahun)==0) - { - $jumlahBulan_ini=0.0; - } - else - { - $jumlahBulan_ini=$get_GlejerBulan_Tahun[0]['jumlah']; - $jumlahBulan_ini=$jumlah-$jumlahBulan_ini; - - - }//end bulan tahun - $Jumlah_TahunIni=0.0; - $get_Glejer_Tahun=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json(); - if(sizeof($get_Glejer_Tahun)==0) - { - $Jumlah_TahunIni=0.0; - } - else - { - - - $JumTahunIni=$get_Glejer_Tahun[0]['jumlah']; - - $Jumlah_TahunIni=$jumlah-$JumTahunIni; - - - } - - $HariIni=0.0; - $kelmarin=$jumlah-$HariIni; - //insert glejer untuk current date /hari ini - $daftarGlejer=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[ - - 'kodcaw'=>$auth_user['cawangan'], - 'glcode'=>$KOD_SERAH, - 'descpt'=>$keterangan, - 'debit'=>$amaun, - 'kredit'=>0.0, - 'hariini'=>$HariIni, - 'kelmarin'=>$kelmarin, - 'jumlah'=>$jumlah, - 'bulanini'=>$jumlahBulan_ini, - 'tahunini'=>$Jumlah_TahunIni, - 'acttype'=> $actype - - ]); - - $get_lejer=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$TUNAI])->json(); - - $hariIni=$get_lejer[0]['hariini']; - $jumlah=$get_lejer[0]['kelmarin']; - $kredit=$get_lejer[0]['kredit']; - $debit=$get_lejer[0]['debit']; - $recno=$get_lejer[0]['recno']; - - $kredit=$kredit+$amaun; - $Hari_Ini=$debit-$kredit; - $Kelmarin=$jumlah-$Hari_Ini; - $update_lejerTunai=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno, - 'debit'=>$debit, - 'kredit'=>$kredit, - 'hariini'=>$Hari_Ini, - 'kelmarin' =>$kelmarin, - - ]); - - } - else - { - - $hariIni_serah=$get_current_GLejer_Details=[0]['hariini']; - $jumlah_serah=$get_current_GLejer_Details=[0]['kelmarin']; - $kredit_serah=$get_current_GLejer_Details=[0]['kredit']; - $debit_serah=$get_current_GLejer_Details=[0]['debit']; - $recno_serah=$get_current_GLejer_Details=[0]['recno']; - - - - $debit_serah=$debit_serah+$amaun; - $hariIni_serah=$debit_serah-$kredit_serah; - $kelmarin_serah=$jumlah_serah-$hariIni_serah; - $update_lejerSerah=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_serah, - 'debit'=>$debit_serah, - 'kredit'=>$kredit_serah, - 'hariini'=>$hariIni_serah, - 'kelmarin' =>$kelmarin_serah, - - ]); - - - $get_lejer=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$TUNAI])->json(); - - $hariIni=$get_lejer[0]['hariini']; - $jumlah=$get_lejer[0]['kelmarin']; - $kredit=$get_lejer[0]['kredit']; - $debit=$get_lejer[0]['debit']; - $recno=$get_lejer[0]['recno']; - - $kredit=$kredit+$amaun; - $Hari_Ini=$debit-$kredit; - $Kelmarin=$jumlah-$Hari_Ini; - $update_lejerTunai=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno, - 'debit'=>$debit, - 'kredit'=>$kredit, - 'hariini'=>$Hari_Ini, - 'kelmarin' =>$Kelmarin, - - ]); - - } - - - - } - - - - - if($request->jenisgldetail == 'pendahuluan') - { - - - - $KOD_SERAH='7000/102'; - $TUNAI='1000/010'; - $get_glCode_Details=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json(); - - $gl_cdetails=$get_glCode_Details[0]; - $keterangan=$get_glCode_Details[0]['descpt']; //keterangan glcode - $actype=$get_glCode_Details[0]['acttype']; //keterangan acctype - - $get_current_GLejer_Details=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json(); - if(sizeof($get_current_GLejer_Details)==0) - { - - $jumlah=0.0; - - - $getGLedjer=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json(); - if(sizeof($getGLedjer)==0) - { - $jumlah=0.0; - } - else - { - - //$glejer=$getGLedjer[0]; - $jumlahSemalam=$getGLedjer[0]['jumlah']; - - $hariIniSemalam=$getGLedjer[0]['hariini']; - $jumlah=$jumlahSemalam+$hariIniSemalam; - - - } - $jumlahBulan_ini=0.0; - $get_GlejerBulan_Tahun=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json(); - - if( sizeof($get_GlejerBulan_Tahun)==0) - { - $jumlahBulan_ini=0.0; - } - else - { - $jumlahBulan_ini=$get_GlejerBulan_Tahun[0]['jumlah']; - $jumlahBulan_ini=$jumlah-$jumlahBulan_ini; - - - }//end bulan tahun - $Jumlah_TahunIni=0.0; - $get_Glejer_Tahun=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json(); - if(sizeof($get_Glejer_Tahun)==0) - { - $Jumlah_TahunIni=0.0; - } - else - { - - - $JumTahunIni=$get_Glejer_Tahun[0]['jumlah']; - - $Jumlah_TahunIni=$jumlah-$JumTahunIni; - - - } - - $HariIni=0.0; - $kelmarin=$jumlah-$HariIni; - //insert glejer untuk current date /hari ini - $daftarGlejer=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[ - - 'kodcaw'=>$auth_user['cawangan'], - 'glcode'=>$KOD_SERAH, - 'descpt'=>$keterangan, - 'debit'=>0.0, - 'kredit'=>$amaun, - 'hariini'=>$HariIni, - 'kelmarin'=>$kelmarin, - 'jumlah'=>$jumlah, - 'bulanini'=>$jumlahBulan_ini, - 'tahunini'=>$Jumlah_TahunIni, - 'acttype'=> $actype - - ]); - - $get_lejer=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$TUNAI])->json(); - - $hariIni=$get_lejer[0]['hariini']; - $jumlah=$get_lejer[0]['kelmarin']; - $kredit=$get_lejer[0]['kredit']; - $debit=$get_lejer[0]['debit']; - $recno=$get_lejer[0]['recno']; - - $debit=$debit+$amaun; - $Hari_Ini=$debit-$kredit; - $Kelmarin=$jumlah-$Hari_Ini; - $update_lejerTunai=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno, - 'debit'=>$debit, - 'kredit'=>$kredit, - 'hariini'=>$Hari_Ini, - 'kelmarin' =>$kelmarin, - - ]); - - } - else - { - - $hariIni_serah=$get_current_GLejer_Details=[0]['hariini']; - $jumlah_serah=$get_current_GLejer_Details=[0]['kelmarin']; - $kredit_serah=$get_current_GLejer_Details=[0]['kredit']; - $debit_serah=$get_current_GLejer_Details=[0]['debit']; - $recno_serah=$get_current_GLejer_Details=[0]['recno']; - - - - $kredit_serah=$kredit_serah+$amaun; - $hariIni_serah=$debit_serah-$kredit_serah; - $kelmarin_serah=$jumlah_serah-$hariIni_serah; - $update_lejerSerah=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_serah, - 'debit'=>$debit_serah, - 'kredit'=>$kredit_serah, - 'hariini'=>$hariIni_serah, - 'kelmarin' =>$kelmarin_serah, - - ]); - - - $get_lejer=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$TUNAI])->json(); - - $hariIni=$get_lejer[0]['hariini']; - $jumlah=$get_lejer[0]['kelmarin']; - $kredit=$get_lejer[0]['kredit']; - $debit=$get_lejer[0]['debit']; - $recno=$get_lejer[0]['recno']; - - $debit=$debit+$amaun; - $Hari_Ini=$debit-$kredit; - $Kelmarin=$jumlah-$Hari_Ini; - $update_lejerTunai=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno, - 'debit'=>$debit, - 'kredit'=>$kredit, - 'hariini'=>$Hari_Ini, - 'kelmarin' =>$Kelmarin, - - ]); - - } - - - - } - - - - - - - - - - - - - $peti_besi_terkini=Http::get(config('api.url').'/api/VaultController/'.$auth_user['cawangan'])->json(); if(sizeof($peti_besi_terkini) == 0){ @@ -3826,7 +3518,6 @@ class KhazanahController extends Controller ])->json(); }else{ - $pendahuluanserahan = Http::put(config('api.url').'/api/UpdateVaultPendahuluanSerahan/'. $auth_user['cawangan'],[ 'jenispendahuluanserahan' => $request->jenisgldetail, @@ -4518,4 +4209,56 @@ class KhazanahController extends Controller return view('print.suratgadaianhilang', compact('polis','gadai','customers','cawangan_detail','api_url')); } + public function PemilihanAnsUpah() + { + $auth_user = Auth::user(); + $api_url = config('api.url'); + + $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); + + + return view('khazanah.laporan.ansuranupah', compact('cawangan_info','api_url')); + } + + public function LaporanUpah() + { + $auth_user = Auth::user(); + $api_url = config('api.url'); + + $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); + + + return view('khazanah.laporan.upah', compact('cawangan_info','api_url')); + } + + public function cetaklaporan_Upah(Request $request) + { + $api_url = config('api.url'); + $auth_user = Auth::user(); + $current = Carbon::now(); + $current = new Carbon(); + $tarikh_cetak = $current->toDateString(); + + if($request->datemula == null){ + $mula_date = '2017-01-01'; + }else{ + $split_date = explode('-', $request->datemula); + $mula_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0]; + } + + if($request->datehingga == null){ + $hingga_date = $current->toDateString(); + }else{ + $split_date = explode('-', $request->datehingga); + $hingga_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0]; + } + + $advansur = Http::get(config('api.url'). '/api/AnsuranByRangeTarikh/' . $auth_user['cawangan'],['mula' => $mula_date,'akhir' => $hingga_date])->json(); + + $cawangan = Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json(); + $cawangan_detail=$cawangan[0]; + + return view('print.laporan_upah', compact('advansur','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url')); + } + } diff --git a/resources/views/aliran_tunai/index.blade.php b/resources/views/aliran_tunai/index.blade.php index acddf57..021c54b 100644 --- a/resources/views/aliran_tunai/index.blade.php +++ b/resources/views/aliran_tunai/index.blade.php @@ -116,7 +116,7 @@
- +
@@ -292,6 +292,56 @@ var tele = "{{ $auth_user['name'] }}"; + function serahankemaskini(data) + { + + $.ajax({ + type: 'get', + url: "{{ route('periksa.alirantunai') }}", + success: function(balasbalik){ + if(balasbalik == 'sama') + { + openuptambahdanserah(data); + }else{ + + $.ajax({ + type: 'get', + url: "{{ route('kemaskini.alirantunai') }}", + data: { "bakiakhir" : balasbalik['bakisemasa'], + "pendahuluan" : balasbalik['pendahuluan'], + "serahan" : balasbalik['serahan'], + "gadaian" : balasbalik['gadaian'], + "penebusan" : balasbalik['penebusan'] + }, + success: function(balas){ + if(balas == 'berjaya') + { + Swal.fire({ + icon: 'success', + title: 'Berjaya', + text: 'Kemaskini Berjaya!', + closeOnClickOutside: false + }).then(function() { + location.reload(); + }); + + }else{ + Swal.fire({ + icon: 'danger', + title: 'Tidak Berjaya', + text: 'Kemaskini tidak berjaya!', + closeOnClickOutside: false + }).then(function() { + location.reload(); + }); + } + } + }); + } + } + }); + } + function periksaalirantunai() { diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php index 9876021..cc15ea7 100644 --- a/resources/views/customers/info.blade.php +++ b/resources/views/customers/info.blade.php @@ -470,6 +470,10 @@ "ordering": false }); + var bayaranupah = $('#tablehistoryupah').DataTable({ + "ordering": false + }); + const formatter = new Intl.NumberFormat('en-US', { minimumFractionDigits: 2 }); @@ -821,6 +825,13 @@ rekodasal(gadai); } }); + $.ajax({ + method:'get', + url: api_url + '/api/ansuran/' + "{{ $cawangan_info['kodcaw'] }}" + '/' + histid, + success:function(ansuran){ + rekodansuran(ansuran); + } + }); } }else if($("input[name='options']:checked").val() == 'sudah_tebus'){ let histid = $('input[name="sudahtebus"]:checked').val(); @@ -858,6 +869,13 @@ rekodasal(gadai); } }); + $.ajax({ + method:'get', + url: api_url + '/api/ansuran/' + "{{ $cawangan_info['kodcaw'] }}" + '/' + histid, + success:function(ansuran){ + rekodansuran(ansuran); + } + }); } } } @@ -868,6 +886,24 @@ $('#nilaimarhunmodal').text('RM ' + formatter.format(gadaian[0][0]['nilaimarhun'])); } + function rekodansuran(data){ + var counter = 1; + + bayaranupah.clear().draw(); + $.each(data,function(index,bayaran){ + + var urlroute = '{{ route("resit.advansur", ":id") }}'; + urlroute = urlroute.replace(':id', bayaran['norujukan']); + bayaranupah.row.add([ + counter, + bayaran['tarikh'], + "RM " + bayaran['upahDibayar'], + 'Cetak' + ]).draw(); + counter = counter + 1; + }); + } + function historybayarantable(data){ var counter = 1; diff --git a/resources/views/khazanah/laporan/ansuranupah.blade.php b/resources/views/khazanah/laporan/ansuranupah.blade.php new file mode 100644 index 0000000..a50bc9b --- /dev/null +++ b/resources/views/khazanah/laporan/ansuranupah.blade.php @@ -0,0 +1,112 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+ + +
+ +
+
+
+ Ansuran +
+
+
+
+ Upah +
+
+
+
+
+
+
+
+ + + +@endsection diff --git a/resources/views/khazanah/laporan/gadaian.blade.php b/resources/views/khazanah/laporan/gadaian.blade.php index dd4b71e..61f1da9 100644 --- a/resources/views/khazanah/laporan/gadaian.blade.php +++ b/resources/views/khazanah/laporan/gadaian.blade.php @@ -28,7 +28,7 @@
Tarikh
- +
@@ -78,7 +78,7 @@ "ordering": false }); $(document).ready( function () { - $('#datetimepicker1').datepicker({ + $('#datetarikh').datepicker({ format: 'dd-mm-yyyy' }); var current = new Date(); @@ -95,7 +95,7 @@ }); }); - $('#datetimepicker1').change(function(){ + $('#datetarikh').change(function(){ var input_date = this.value; var split_date = input_date.split('-'); var today_date = split_date[2] + '-' +split_date[1]+'-'+split_date[0]; @@ -121,17 +121,13 @@ tablegadai.clear().draw(); $.each(data,function(index,gadai){ - $.ajax({ - method:'get', - url:api_url + '/api/customers/' + gadai['nokp'], - success:function(customer){ total_pinjaman += Number(gadai['pinjaman']); total_upah12 += Number(gadai['upah12']); total_nm += Number(gadai['nilaimarhun']); total_berat += Number(gadai['berat']); tablegadai.row.add([ counter, - customer['nama'], + gadai['nama'], gadai['nokp'], gadai['norujukan'], formatter.format(gadai['pinjaman']), @@ -144,11 +140,8 @@ $('#nmtotal').text(formatter.format(total_nm.toFixed(2))); $('#berattotal').text(formatter.format(total_berat.toFixed(2))); counter = counter + 1; - } - }); }); } @endsection - diff --git a/resources/views/khazanah/laporan/index.blade.php b/resources/views/khazanah/laporan/index.blade.php index 959af9b..f7f3e5a 100644 --- a/resources/views/khazanah/laporan/index.blade.php +++ b/resources/views/khazanah/laporan/index.blade.php @@ -26,7 +26,7 @@ Pelanggan Baru
- Ringkasan Terkumpul + Ringkasan Terkumpul
Aging Bulan @@ -70,7 +70,7 @@
Stok Audit diff --git a/resources/views/khazanah/laporan/penebusan.blade.php b/resources/views/khazanah/laporan/penebusan.blade.php index b722677..79e3f74 100644 --- a/resources/views/khazanah/laporan/penebusan.blade.php +++ b/resources/views/khazanah/laporan/penebusan.blade.php @@ -28,7 +28,8 @@
Tarikh
- + +
@@ -40,17 +41,16 @@ Bil - Nama + Nama No K/P No Rujukan - Tarikh Tebus Pembiayaan (RM) Keuntungan (RM) Bayaran (RM) - TOTAL + TOTAL @@ -76,30 +76,31 @@ "ordering": true }); $(document).ready( function () { - $('#datetimepicker1').datepicker({ + $('#datetarikh').datepicker({ format: 'dd-mm-yyyy' }); + var current = new Date(); var current_date = current.getDate(); var current_month = current.getMonth()+1; var current_year = current.getFullYear(); - var today_date = current_year + '-' +current_month+'-'+current_date; + var today_date = current_year + '-' + current_month + '-' + current_date; $.ajax({ method:'get', - url: api_url + '/api/tebus/laporan/'+kodcaw+'/' + today_date, + url: api_url + '/api/tebus/laporan/' +kodcaw+ '/' + today_date, success: function(tebus){ tebustable(tebus); } }); }); - $('#datetimepicker1').change(function(){ + $('#datetarikh').change(function(){ var input_date = this.value; var split_date = input_date.split('-'); - var today_date = split_date[2] + '-' +split_date[1]+'-'+split_date[0]; + var today_date = split_date[2] + '-' + split_date[1] + '-' + split_date[0]; $.ajax({ method:'get', - url: api_url + '/api/tebus/laporan/'+kodcaw+'/' + today_date, + url: api_url + '/api/tebus/laporan/' + kodcaw + '/' + today_date, success: function(tebus){ tebustable(tebus); } @@ -110,7 +111,6 @@ }); - const formatter = new Intl.NumberFormat('en-US', { minimumFractionDigits: 2 }); @@ -120,40 +120,62 @@ var total_pinjaman = 0; var total_keuntungan = 0; var total_bayaran = 0; + + console.log(data); tabletebus.clear().draw(); $.each(data,function(index,tebus){ - $.ajax({ - url:api_url + '/api/gadai/norujukan/' + tebus['norujukan'], - method:'get', - success:function(gadai){ - $.ajax({ - url:api_url + '/api/customers/' + gadai[0][0]['nokp'], - method:'get', - success:function(customer){ - total_pinjaman += parseFloat(tebus['pinjaman']); - total_keuntungan += parseFloat(tebus['bakiupah']); - total_bayaran += parseFloat(tebus['bakipjm']); - tabletebus.row.add([ - counter, - customer['nama'], - gadai[0][0]['nokp'], - tebus['norujukan'], - tebus['t_tebus'], - formatter.format(tebus['pinjaman']), - formatter.format(tebus['bakiupah']), - formatter.format(tebus['bakipjm']) - ]).draw(); - counter = counter + 1; - $('#pinjamantotal').text(formatter.format(total_pinjaman.toFixed(2))); - $('#keuntungantotal').text(formatter.format(total_keuntungan.toFixed(2))); - $('#bayarantotal').text(formatter.format(total_bayaran.toFixed(2))); - - } - }); - } - }); + total_pinjaman += parseFloat(tebus['pinjaman']); + total_keuntungan += parseFloat(tebus['bakiupah']); + total_bayaran += parseFloat(tebus['bakipjm']); + tabletebus.row.add([ + counter, + tebus['nama'], + tebus['nokp'], + tebus['norujukan'], + formatter.format(tebus['pinjaman']), + formatter.format(tebus['bakiupah']), + formatter.format(tebus['bakipjm']) + ]).draw(); + counter = counter + 1; + $('#pinjamantotal').text(formatter.format(total_pinjaman.toFixed(2))); + $('#keuntungantotal').text(formatter.format(total_keuntungan.toFixed(2))); + $('#bayarantotal').text(formatter.format(total_bayaran.toFixed(2))); }); + + + // $.each(data,function(index,tebus){ + // $.ajax({ + // url:api_url + '/api/gadai/norujukan/' + tebus['norujukan'], + // method:'get', + // success:function(gadai){ + // $.ajax({ + // url:api_url + '/api/customers/' + gadai[0][0]['nokp'], + // method:'get', + // success:function(customer){ + // total_pinjaman += parseFloat(tebus['pinjaman']); + // total_keuntungan += parseFloat(tebus['bakiupah']); + // total_bayaran += parseFloat(tebus['bakipjm']); + // tabletebus.row.add([ + // counter, + // customer['nama'], + // gadai[0][0]['nokp'], + // tebus['norujukan'], + // tebus['t_tebus'], + // formatter.format(tebus['pinjaman']), + // formatter.format(tebus['bakiupah']), + // formatter.format(tebus['bakipjm']) + // ]).draw(); + // counter = counter + 1; + // $('#pinjamantotal').text(formatter.format(total_pinjaman.toFixed(2))); + // $('#keuntungantotal').text(formatter.format(total_keuntungan.toFixed(2))); + // $('#bayarantotal').text(formatter.format(total_bayaran.toFixed(2))); + + // } + // }); + // } + // }); + // }); // console.log('Total Pinjam : ' + total_pinjaman); // $('#jumlah_pinjaman').text('RM '+ total_pinjaman); diff --git a/resources/views/khazanah/laporan/ringkasanterkumpul.blade.php b/resources/views/khazanah/laporan/ringkasanterkumpul.blade.php new file mode 100644 index 0000000..29e492d --- /dev/null +++ b/resources/views/khazanah/laporan/ringkasanterkumpul.blade.php @@ -0,0 +1,70 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+ @csrf +
+
+ Mula +
+ + +
+ Hingga +
+ + + + +
+
+
+
+ +
+
+
+
+
+ +@endsection + diff --git a/resources/views/khazanah/laporan/upah.blade.php b/resources/views/khazanah/laporan/upah.blade.php new file mode 100644 index 0000000..2600868 --- /dev/null +++ b/resources/views/khazanah/laporan/upah.blade.php @@ -0,0 +1,214 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+ @csrf +
+
+ Mula +
+ + +
+ Hingga +
+ + + + +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + +
BilTarikhNo RujukanTellerPinjamanJBGUpah Dibayar
TOTAL
+
+
+ +
+
+
+
+
+ +@endsection + diff --git a/resources/views/khazanah/pendahuluanserahanmain.blade.php b/resources/views/khazanah/pendahuluanserahanmain.blade.php index 4d6230a..c99617f 100644 --- a/resources/views/khazanah/pendahuluanserahanmain.blade.php +++ b/resources/views/khazanah/pendahuluanserahanmain.blade.php @@ -298,7 +298,7 @@ $('#denominasiHQModal').modal('hide'); $('#pendahuluanserahanModal').modal('hide'); - + location.reload(); }); }else if(data == 'GAGAL'){ diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 57f4d5e..a5fb0ab 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -172,7 +172,7 @@ }); - @elseif($auth_user['roles'] == 'teller') + @elseif($auth_user['role_harian'] == 'teller')
+ @@ -44,6 +47,21 @@ +
+
+ + + + + + + + + + + +
BilTarikhUpahAction
+

diff --git a/resources/views/print/laporan_gadaian.blade.php b/resources/views/print/laporan_gadaian.blade.php index f7b6e19..addd58a 100644 --- a/resources/views/print/laporan_gadaian.blade.php +++ b/resources/views/print/laporan_gadaian.blade.php @@ -180,14 +180,14 @@ $formattedweddingdate = $myDateTime->format('d-m-Y'); echo($formattedweddingdate) @endphp - - + + @@ -214,9 +214,9 @@ - @php $counter = 1; $totalpinjaman = 0; @endphp + @php $counter = 1; $totalpinjaman = 0; $totalberat = 0; $totalnm = 0; $totalupah = 0;@endphp @foreach($gadai as $index=>$item) - @php $totalpinjaman += $item['pinjaman'] @endphp + @php $totalpinjaman += $item['pinjaman']; $totalberat += $item['berat']; $totalnm += $item['nilaimarhun']; $totalupah += $item['upah12']; @endphp @if($index > 0) @if($item['teller'] != $gadai[$index - 1]['teller']) @@ -235,12 +235,9 @@ - + @@ -275,8 +272,25 @@ @endif @endforeach
Tarikh Cetak @php $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak); $formattedweddingdate = $myDateTime->format('d-m-Y'); echo($formattedweddingdate) @endphp
Keuntungan Peratus (%)
{{ $counter }} {{$item['norujukan']}} - @php - $customer_detail = Http::get($api_url . '/api/customers/' . $item['nokp'])->json(); - echo $customer_detail['nama']; - @endphp + {{ $item['nama'] }} {{$customer_detail['alamat1']}}{{ $item['alamat1'] }} {{ $item['nokp'] }} {{ $item['masa'] }} {{ number_format($item['berat'],2) }}
+

+ + + + + + + + + + + + + + + +
Berat (g/m)Nilai Marhun (RM)Pembiayaan (RM)Upah/Keuntungan (RM)
JUMLAH KESELURUHAN{{ number_format($totalberat,2) }}{{ number_format($totalnm,2) }}{{ number_format($totalpinjaman,2) }}{{ number_format($totalupah,2) }}
-
JUMLAH KESELURUHAN GADAIAN : RM {{ number_format($totalpinjaman,2) }}
+{{--
JUMLAH KESELURUHAN GADAIAN : RM {{ number_format($totalpinjaman,2) }}
--}}

@@ -298,22 +312,6 @@ -

Laporan Transaksi Gadaian

-
- - - - - - - - - - - - -
BilJenisPenebusan(RM)
0 Rugi Lelong 0.00
- diff --git a/resources/views/print/laporan_penebusan.blade.php b/resources/views/print/laporan_penebusan.blade.php index 49fbfca..0fcc15a 100644 --- a/resources/views/print/laporan_penebusan.blade.php +++ b/resources/views/print/laporan_penebusan.blade.php @@ -145,12 +145,6 @@ - - - - - - {{-- --}} @@ -186,7 +180,7 @@ - + - - - - - - @@ -219,9 +207,9 @@ Bayaran(RM) Jumlah(RM) - @php $counter = 1; $totalbayaran = 0;@endphp + @php $counter = 1; $totalbayaran = 0; $totalpinjaman = 0; $totalupah = 0;@endphp @foreach($tebus as $index=>$item) - @php $totalbayaran += ($item['jenistebus'] === 'S') ? ($item['pinjaman']+$item['bakiupah']) : $item['bakipjm']; @endphp + @php $totalbayaran += ($item['jenistebus'] === 'S') ? ($item['pinjaman']+$item['bakiupah']) : $item['bakipjm']; $totalpinjaman += $item['pinjaman']; $totalupah += $item['bakiupah'];@endphp @if($index > 0) @if($item['teller'] != $tebus[$index - 1]['teller']) @@ -238,18 +226,11 @@ {{ $counter }} {{ $item['norujukan'] }} - - @php - $gadai_detail = Http::get($api_url . '/api/gadai/norujukan/'. $item['norujukan'])->json(); - $customer_detail = Http::get($api_url . '/api/customers/' . $gadai_detail[0][0]['nokp'])->json(); - - echo $customer_detail['nama']; - @endphp - - {{$gadai_detail[0][0]['nokp']}} + {{ $item['nama'] }} + {{ $item['nokp'] }} @php - $myDateTime = DateTime::createFromFormat('Y-m-d', $gadai_detail[0][0]['t_gadai']); + $myDateTime = DateTime::createFromFormat('Y-m-d', $item['t_gadai']); $formattedweddingdate = $myDateTime->format('d-m-Y'); echo($formattedweddingdate); @endphp @@ -296,24 +277,19 @@ @endforeach -
JUMLAH KESELURUHAN BAYARAN : RM {{ number_format($totalbayaran,2) }}
- -
-
- +

+
- - - - - + + + + - - - - - + + + +
.................................................................. .................................................................. Pembiayaan (RM)Upah/Keuntungan (RM)Jumlah (RM)
DI SEMAK DI SAHKAN JUMLAH KESELURUHAN{{ number_format($totalpinjaman,2) }}{{ number_format($totalupah,2) }}{{ number_format($totalbayaran,2) }}
@@ -349,12 +325,26 @@ {{ number_format($upahlama['total'],2) }} Not Applicable + + +{{--
JUMLAH KESELURUHAN BAYARAN : RM {{ number_format($totalbayaran,2) }}
--}} + +
+
+ - - - - - + + + + + + + + + + + +
0 Baki Lelong 0.00 Not Applicable Not Applicable .................................................................. ..................................................................
DI SEMAK DI SAHKAN
@@ -363,3 +353,5 @@ + + diff --git a/resources/views/print/laporan_ringkasanterkumpulv2.blade.php b/resources/views/print/laporan_ringkasanterkumpulv2.blade.php new file mode 100644 index 0000000..f294468 --- /dev/null +++ b/resources/views/print/laporan_ringkasanterkumpulv2.blade.php @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + +

+

Tarikh Mula: {{ $mula_date }} Tarikh Hingga : {{ $hingga_date }} Tarikh Cetak : {{ $tarikh_cetak }}

+ +
+
+
+
+

A) LAPORAN TERKUMPUL

+
+
1. PEMBIAYAAN
+
RM {{ number_format($laporan_ringkasan['total_gadai'],2) }}
+
2. PENEBUSAN
+
RM {{ number_format($laporan_ringkasan['total_tebus'],2) }}
+
3. ANSURAN PEMBIAYAAN
+
RM {{ number_format($laporan_ringkasan['total_ansuran'],2) }}
+
4. BAYARAN ONLINE
+
RM 0.00
+
5. KEUNTUNGAN
+
RM {{ number_format($laporan_ringkasan['total_keuntungan'],2) }}
+
6. KEUNTUNGAN ONLINE
+
RM 0.00
+
+
+
+
+
+

B) BIL TRANSAKSI

+
+
1. PEMBIAYAAN
+
{{ $laporan_ringkasan['bilangan_gadai'] }}
+
2. PENEBUSAN
+
{{ $laporan_ringkasan['bilangan_tebus'] }}
+
3. ANSURAN PEMBIAYAAN
+
{{ $laporan_ringkasan['bilangan_ansuran'] }}
+
4. BAYARAN ONLINE
+
0
+
5. PELANGGAN BARU
+
{{ $laporan_ringkasan['bilangan_customer_baru'] }}
+
+
+
+ +
+
+
+
+

F) LELONG

+
+
1. LELONG HARI INI
+
RM {{ number_format($laporan_ringkasan['jumlah_lelong'],2) }}
+
2. BAKI
+
RM {{ number_format($laporan_ringkasan['baki_lelong'],2) }}
+
3. RUGI
+
RM {{ number_format($laporan_ringkasan['rugi_lelong'],2) }}
+
4. CAJ LELONG
+
RM {{ number_format($laporan_ringkasan['cas_lelong'],2) }}
+
5. BIL
+
{{ $laporan_ringkasan['bilangan_lelong'] }}
+
+
+
+
+
+

G) BAYAR BAKI LELONG

+
+
RM
+
+
+
+
+ +
+
+
+
+

H) PERATUSAN PEMBIAYAAN

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MARGIN70%75%80%
1PEMBIAYAANRM {{ number_format($laporan_ringkasan['gadai_70'],2) }}RM {{ number_format($laporan_ringkasan['gadai_75'],2) }}RM {{ number_format($laporan_ringkasan['gadai_80'],2) }}
2NILAI MARHUNRM {{ number_format($laporan_ringkasan['nilaimarhun_70'],2) }}RM {{ number_format($laporan_ringkasan['nilaimarhun_75'],2) }}RM {{ number_format($laporan_ringkasan['nilaimarhun_80'],2) }}
3BILANGAN{{ $laporan_ringkasan['bilangan_70'] }}{{ $laporan_ringkasan['bilangan_75'] }}{{ $laporan_ringkasan['bilangan_80'] }}
+
+
+
+
+

+
+
+
+
DISEMAK
+
+
+
................................................
+
+
+
+
+
DISAHKAN
+
+
+
................................................
+
+
+
\ No newline at end of file diff --git a/resources/views/print/laporan_upah.blade.php b/resources/views/print/laporan_upah.blade.php new file mode 100644 index 0000000..cfb975b --- /dev/null +++ b/resources/views/print/laporan_upah.blade.php @@ -0,0 +1,317 @@ + + + + + + + + + + + + + + + + + + + + + + + + + {{-- --}} + {{-- --}} + + + + + + {{-- + + + + + + + --}} + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LAPORAN UPAH
TARIKH CETAK: + @php + $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak); + $formattedweddingdate = $myDateTime->format('d-m-Y'); + echo($formattedweddingdate); + @endphp +
MULA:@php + $myDateTime = DateTime::createFromFormat('Y-m-d', $mula_date); + $formattedweddingdate = $myDateTime->format('d-m-Y'); + echo($formattedweddingdate); + @endphp HINGGA:@php + $myDateTime = DateTime::createFromFormat('Y-m-d', $hingga_date); + $formattedweddingdate = $myDateTime->format('d-m-Y'); + echo($formattedweddingdate); + @endphp
+ +
+ + + + + + + + + + + @php $counter = 1; $totalbayaran = 0; $totalpembiayaan = 0; $totalpembiayaanteller = 0; $totalbayaranteller = 0; @endphp + @foreach($advansur as $index=>$item) + @php $totalbayaran += $item['upahDibayar']; $totalpembiayaan += $item['pinjaman'];$totalbayaranteller += $item['upahDibayar']; $totalpembiayaanteller += $item['pinjaman']; @endphp + @if($index > 0) + @if($item['teller'] != $advansur[$index - 1]['teller']) + + + + @php $counter = 1;$totalpembiayaanteller = 0; $totalbayaranteller = 0; @endphp + @endif + @else + + + + @php $counter = 1;$totalpembiayaanteller = 0; $totalbayaranteller = 0; @endphp + + @endif + + + + + + + + + + + @php $counter++; @endphp + @if($index+1 < sizeof($advansur)) + @if($item['teller'] != $advansur[$index + 1]['teller']) + + + + + + + @php @endphp + @endif +@else + + + + + + +@endif + @endforeach +
BilTarikhNo RujukanTellerPinjamanJBGUpah Dibayar
Teller : {{ $item['teller'] }}
Teller : {{ $item['teller'] }}
{{ $counter }}{{ $item['tarikh'] }}{{ $item['norujukan'] }}{{ $item['teller'] }}{{ number_format($item['pinjaman'],2) }}{{ $item['jbg'] }}{{ number_format($item['upahDibayar'],2) }}
{{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }}{{ number_format($totalpembiayaanteller,2) }} {{ number_format($totalbayaranteller,2) }}
{{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }}{{ number_format($totalpembiayaanteller,2) }} {{ number_format($totalbayaranteller,2) }}
+

+ + + + + + + + + + + +
Pembiayaan (RM)Upah Dibayar (RM)
JUMLAH KESELURUHAN{{ number_format($totalpembiayaan,2) }}{{ number_format($totalbayaran,2) }}
+ +
+


+ + + + + + + + + + + + + + + + + + + +
.................................................................. .................................................................. ..................................................................
Disediakan Disemak Disahkan
+ + + + + + diff --git a/routes/web.php b/routes/web.php index fbc9f25..a783457 100644 --- a/routes/web.php +++ b/routes/web.php @@ -181,6 +181,9 @@ Route::put('/simpantuntutbaki',['as'=>'lelong.tuntutbaki','uses'=>'LelongControl //Laporan Baru Route::get('/laporan/lelongan',['as'=>'laporan.lelongan','uses'=>'KhazanahController@laporanLelongan'])->middleware('auth','khazanah'); Route::post('laporan/lelongan/cetak',['as'=>'lelongan.laporancetak','uses'=>'KhazanahController@cetaklaporanLelongan'])->middleware('auth','khazanah'); +Route::get('/laporan/homepage/ansuranupah',['as'=>'homepage.ansuranupah','uses'=>'KhazanahController@PemilihanAnsUpah'])->middleware('auth','khazanah'); +Route::get('/laporan/upah',['as'=>'laporan.upah','uses'=>'KhazanahController@LaporanUpah'])->middleware('auth','khazanah'); +Route::post('laporan/upah/cetak',['as'=>'upah.laporancetak','uses'=>'KhazanahController@cetaklaporan_Upah'])->middleware('auth','khazanah'); Route::get('/laporan/ansuran',['as'=>'laporan.ansuran','uses'=>'KhazanahController@laporanAnsuran'])->middleware('auth','khazanah'); Route::post('laporan/ansuran/cetak',['as'=>'ansuran.laporancetak','uses'=>'KhazanahController@cetakLaporanAnsuran'])->middleware('auth','khazanah'); Route::get('/laporan/pelangganbaru',['as'=>'laporan.pelangganbaru','uses'=>'KhazanahController@laporanPelangganBaru'])->middleware('auth','khazanah'); @@ -199,6 +202,7 @@ Route::get('/laporan/marhunterkumpul',['as'=>'laporan.marhunterkumpul','uses'=>' Route::post('laporan/marhunterkumpul/cetak',['as'=>'marhunterkumpul.laporancetak','uses'=>'KhazanahController@cetakLaporanMarhunTerkumpul'])->middleware('auth','khazanah'); Route::get('laporan/ringkasanharian/',['as'=>'laporan.ringkasanharian','uses'=>'KhazanahController@laporanRingkasanHarian'])->middleware('auth','khazanah'); Route::get('laporan/ringkasanharian/cetak',['as'=>'ringkasanharian.laporancetak','uses'=>'KhazanahController@cetakLaporanRingkasanHarian'])->middleware('auth','khazanah'); +Route::get('laporan/ringkasanterkumpul/',['as'=>'laporan.ringkasanterkumpul','uses'=>'KhazanahController@laporanRingkasanTerkumpul'])->middleware('auth','khazanah'); Route::get('laporan/ringkasanterkumpul/cetak',['as'=>'ringkasanterkumpul.laporancetak','uses'=>'KhazanahController@cetakLaporanRingkasanTerkumpul'])->middleware('auth','khazanah'); Route::get('/laporan/agingbulanan', [ 'as'=>'laporan.agingbulanan', 'uses'=>'KhazanahController@laporanAging_Bulanan'])->middleware('auth','khazanah'); Route::post('/laporan/agingbulanan/cetak', ['as'=>'agingbulan.cetaklaporan', 'uses'=>'KhazanahController@cetaklaporang_Aging'])->middleware('auth','khazanah'); From 6b3ca90f69b2557ac72947280c10a278f50ab3c6 Mon Sep 17 00:00:00 2001 From: fifi97 Date: Thu, 24 Jun 2021 10:34:41 +0800 Subject: [PATCH 02/27] fix lejeram deleted --- app/Http/Controllers/PenebusanController.php | 222 +----------------- .../views/khazanah/laporan/index.blade.php | 2 +- 2 files changed, 10 insertions(+), 214 deletions(-) diff --git a/app/Http/Controllers/PenebusanController.php b/app/Http/Controllers/PenebusanController.php index f8569e7..3ec99ce 100644 --- a/app/Http/Controllers/PenebusanController.php +++ b/app/Http/Controllers/PenebusanController.php @@ -93,15 +93,15 @@ class PenebusanController extends Controller // $bakiakhir = $bakiawal-$keluar+$totalmasuk+$pendahuluan-$serahan; $bakiakhir = $baki + $request->bayaran; - // Add on 20210411 - $gadaidetail = Http::get(config('api.url') . '/api/gadai/norujukan/'. $request->kodcaw.'/'.$request->norujukan)->json(); - $tempohGadai=$gadaidetail[0]['tempoh']; - $upah12bulan=$gadaidetail[0]['upah12']; - $bakiPinjaman=$gadaidetail[0]['bakipjm']; - $teller=$gadaidetail[0]['teller']; - $upah6bulan= $upah12bulan/2; //add on 202104011 - $tempoh_bayar=$gadaidetail[0]['tempohbayar']; //add on 202104011 - $tarikhgadai=$gadaidetail[0]['t_gadai'];//Add on 20210411 + // // Add on 20210411 + // $gadaidetail = Http::get(config('api.url') . '/api/gadai/norujukan/'. $request->kodcaw.'/'.$request->norujukan)->json(); + // $tempohGadai=$gadaidetail[0]['tempoh']; + // $upah12bulan=$gadaidetail[0]['upah12']; + // $bakiPinjaman=$gadaidetail[0]['bakipjm']; + // $teller=$gadaidetail[0]['teller']; + // $upah6bulan= $upah12bulan/2; //add on 202104011 + // $tempoh_bayar=$gadaidetail[0]['tempohbayar']; //add on 202104011 + // $tarikhgadai=$gadaidetail[0]['t_gadai'];//Add on 20210411 //masuk dalam tunai aliran $updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$request->kodcaw, [ @@ -111,210 +111,6 @@ class PenebusanController extends Controller 'bakiakhir' => $bakiakhir ]); - //************** KIRAAN LEJER AM BERMULA **************** - - - $Bayaran_Pendahuluan='1000/019'; - $GL_CODE='1000/010'; - $KOD_PINJAMAN='1000/017'; - $KOD_UT='1000/211'; - $KOD_US='2000/007'; - $Untung_Semasa='5000/017'; - $KOD_ANS='5000/511'; - - - - $jumlahBayaran_ansuran=Http::get(config('api.url').'/api/ansuranByrKaunter/'.$request->kodcaw.'/'.$request->norujukan)->json(); - $jumlah_telah_bayaransuran=$jumlahBayaran_ansuran[0]['cash_in']; - $jumbayaran=$request->bayaran; - - $Transaksi_keuntungan=Http::get(config('api.url').'/api/transaksi_keuntungan/'.$request->norujukan)->json(); - $bayaran_keuntungan=$Transaksi_keuntungan[0]['bayaran_keuntungan']; - $bayaran_pembiayaan=$Transaksi_keuntungan[0]['bayaran_pembiayaan']; - $tarikh_bayaran=$Transaksi_keuntungan[0]['tarikh_bayaran']; - - //tahun gadaian - $tahun_gadai=substr($tarikhgadai,0,4); - $month_gadai=substr($tarikhgadai, 5,2); - // bulan gadaian - $year_bayar=substr($tarikh_bayaran, 0, 4); - $month_bayar=substr($tarikh_bayaran, 5,2); - - - $get_latest_bayarUntung=Http::get(config('api.url').'/api/latest_transaksi_untung/data/'.$request->norujukan)->json(); - $bayaran_latest_untung=$get_latest_bayarUntung[0]['bayaran_keuntungan']; - $bayaran_latest_pendahuluan=$get_latest_bayarUntung[0]['bayaran_pembiayaan']; - - $hargajualan=$gadaidetail[0]['hargajualan']; - - - - //ansuran tawaruq - //check sama ada jumlah bayaran melebihi keuntungan semasa..kalau lebih dia akan masuk dalam bayaran pendahuluan... - if($jumbayaran<$bayaran_keuntungan) - { - - $LejerTunaiDitangan=Http::get(config('api.url').'/api/getGlejer/'.$request->kodcaw,['glcode'=> $GL_CODE])->json(); - - $hariini_Tunai=$LejerTunaiDitangan[0]['hariini']; - $kelmarin_Tunai=$LejerTunaiDitangan[0]['kelmarin']; - $jumlah_Tunai=$LejerTunaiDitangan[0]['jumlah']; - $debit_Tunai=$LejerTunaiDitangan[0]['debit']; - $recno_Tunai=$LejerTunaiDitangan[0]['recno']; - $kredit_Tunai=$LejerTunaiDitangan[0]['kredit']; - - - $debit_Tunai=$debit_Tunai+$jumbayaran; - - $hariIni_Tunai=$debit_Tunai-$kredit_Tunai; - $kelmarin_Tunai=$jumlah_Tunai-$hariIni_Tunai; - - $update_TunaiDiTangan=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$request->kodcaw,[ - 'recno'=>$recno_Tunai, - 'debit'=>$debit_Tunai, - 'kredit'=>$kredit_Tunai, - 'hariini'=>$hariIni_Tunai, - 'kelmarin'=>$kelmarin_Tunai, - - ]); - - - - $get_lejerBP=Http::get(config('api.url').'/api/getGlejer/'.$request->kodcaw,['glcode'=> $Bayaran_Pendahuluan])->json(); - - $hariini_BP=$get_lejerBP[0]['hariini']; - $kelmarin_BP=$get_lejerBP[0]['kelmarin']; - $jumlah_BP=$get_lejerBP[0]['jumlah']; - $debit_BP= $get_lejerBP[0]['debit']; - $recno_BP= $get_lejerBP[0]['recno']; - - $kredit_BP= $get_lejerBP[0]['kredit']; - - $kredit_BP=$kredit_BP+$bayaran_latest_pendahuluan; - - $hariini_BP=$debit_BP-$kredit_BP; - $kelmarin_BP=$jumlah_BP-$hariini_BP; - - $updateGlejer_BP=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$request->kodcaw,[ - 'recno'=>$recno_BP, - 'debit'=>$debit_BP, - 'kredit'=>$kredit_BP, - 'hariini'=>$hariini_BP, - 'kelmarin' =>$kelmarin_BP, - - ]); - - - $get_latest_bayarUntung=Http::get(config('api.url').'/api/latest_transaksi_untung/data/'.$request->norujukan)->json(); - $bayaran_latest_untung=$get_latest_bayarUntung[0]['bayaran_keuntungan']; - - $get_lejer_Untung=Http::get(config('api.url').'/api/getGlejer/'.$request->kodcaw,['glcode'=>$Untung_Semasa])->json(); - - $hariini_untung=$get_lejer_Untung[0]['hariini']; - $kelmarin_untung=$get_lejer_Untung[0]['kelmarin']; - $jumlah_untung=$get_lejer_Untung[0]['jumlah']; - $debit_untung=$get_lejer_Untung [0]['debit']; - $recno_untung=$get_lejer_Untung [0]['recno']; - $kredit_untung=$get_lejer_Untung [0]['kredit']; - - - $kredit_untung=$kredit_untung+$bayaran_latest_untung; - - $hariini_untung=$debit_untung-$kredit_untung; - $kelmarin_untung=$jumlah_untung-$hariini_untung; - - $updateGlejer_Untung=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$request->kodcaw,[ - 'recno'=>$recno_untung, - 'debit'=>$debit_untung, - 'kredit'=>$kredit_untung, - 'hariini'=>$hariini_untung, - 'kelmarin' =>$kelmarin_untung, - - ]); - - } - - else - { - $LejerTunaiDitangan=Http::get(config('api.url').'/api/getGlejer/'.$request->kodcaw,['glcode'=> $GL_CODE])->json(); - - $hariini_Tunai=$LejerTunaiDitangan[0]['hariini']; - $kelmarin_Tunai=$LejerTunaiDitangan[0]['kelmarin']; - $jumlah_Tunai=$LejerTunaiDitangan[0]['jumlah']; - $debit_Tunai=$LejerTunaiDitangan[0]['debit']; - $recno_Tunai=$LejerTunaiDitangan[0]['recno']; - $kredit_Tunai=$LejerTunaiDitangan[0]['kredit']; - - $debit_Tunai=$debit_Tunai+$jumbayaran; - - - $hariini_Tunai=$debit_Tunai-$kredit_Tunai; - $kelmarin_Tunai=$jumlah_Tunai-$hariini_Tunai; - - $update_TunaiDiTangan=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$request->kodcaw,[ - 'recno'=>$recno_Tunai, - 'debit'=>$debit_Tunai, - 'kredit'=>$kredit_Tunai, - 'hariini'=>$hariini_Tunai, - 'kelmarin'=>$kelmarin_Tunai, - - ]); - - - $get_lejerBP=Http::get(config('api.url').'/api/getGlejer/'.$request->kodcaw,['glcode'=> $Bayaran_Pendahuluan])->json(); - - $hariini_BP=$get_lejerBP[0]['hariini']; - $kelmarin_BP=$get_lejerBP[0]['kelmarin']; - $jumlah_BP=$get_lejerBP[0]['jumlah']; - $debit_BP= $get_lejerBP[0]['debit']; - $recno_BP= $get_lejerBP[0]['recno']; - $kredit_BP= $get_lejerBP[0]['kredit']; - - - $kredit_BP=$kredit_BP+$bayaran_latest_pendahuluan; - $hariini_BP=$debit_BP-$kredit_BP; - $kelmarin_BP=$jumlah_BP-$hariini_BP; - - $updateGlejer_BP=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$request->kodcaw,[ - 'recno'=>$recno_BP, - 'debit'=>$debit_BP, - 'kredit'=>$kredit_BP, - 'hariini'=>$hariini_BP, - 'kelmarin' =>$kelmarin_BP, - - ]); - - $get_latest_bayarUntung=Http::get(config('api.url').'/api/latest_transaksi_untung/data/'.$request->norujukan)->json(); - $bayaran_latest_untung=$get_latest_bayarUntung[0]['bayaran_keuntungan']; - $get_lejer_Untung=Http::get(config('api.url').'/api/getGlejer/'.$request->kodcaw,['glcode'=>$Untung_Semasa])->json(); - - $hariini_untung=$get_lejer_Untung[0]['hariini']; - $kelmarin_untung=$get_lejer_Untung[0]['kelmarin']; - $jumlah_untung=$get_lejer_Untung[0]['jumlah']; - $debit_untung=$get_lejer_Untung [0]['debit']; - $recno_untung=$get_lejer_Untung [0]['recno']; - $kredit_untung=$get_lejer_Untung [0]['kredit']; - - $kredit_untung=$kredit_untung+$bayaran_latest_untung; - $hariini_untung=$debit_untung-$kredit_untung; - $kelmarin_untung=$jumlah_untung-$hariini_untung; - - $updateGlejer_Untung=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$request->kodcaw,[ - 'recno'=>$recno_untung, - 'debit'=>$debit_untung, - 'kredit'=>$kredit_untung, - 'hariini'=>$hariini_untung, - 'kelmarin' =>$kelmarin_untung, - - ]); - - } - - // end kiraan lejer am untuk tawaruq - - - //***************KIRAAN LEJER AM TAMAT******************************* - return response()->json($updateTunai,200); } diff --git a/resources/views/khazanah/laporan/index.blade.php b/resources/views/khazanah/laporan/index.blade.php index f7f3e5a..7b8677c 100644 --- a/resources/views/khazanah/laporan/index.blade.php +++ b/resources/views/khazanah/laporan/index.blade.php @@ -61,7 +61,7 @@ Aging Pelanggan
- Lejer Am + Lejer Am
Tuntut Baki From d10bbc9025fec9bfb350ed622e3c3971b88439d4 Mon Sep 17 00:00:00 2001 From: Afiq Zakwan Hamdan Date: Thu, 24 Jun 2021 10:36:30 +0800 Subject: [PATCH 03/27] buang lajer am --- app/Http/Controllers/KhazanahController.php | 1375 +------------------ 1 file changed, 3 insertions(+), 1372 deletions(-) diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index b45eb97..07abd1c 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -298,132 +298,11 @@ class KhazanahController extends Controller $bakiakhir = $getTunai2['baki']; $totalkeluar = 0; - // initialized value glcode lejer_am - $KOD_tunai='1000/010'; - $KOD_Pembiayaan='1000/017'; - $KOD_BP='1000/019'; - $Rebet_A='1000/021'; - $Rebet_B='5000/021'; - $Untung_Semasa='5000/017'; - $U_TG='1000/211'; - $U_HG='2000/007'; - $KOD_Pinjam='1000/013'; - $Upah_Simpan='5000/013'; - - - $jum_bayaran=Http::get(config('api.url').'/api/transaction/one/'.$request->norujukan_barcode)->json(); - $jumlah_bayaran=$jum_bayaran['duit_masuk']; + $jum_bayaran=Http::get(config('api.url').'/api/transaction/one/'.$request->norujukan_barcode)->json(); + $jumlah_bayaran=$jum_bayaran['duit_masuk']; - - - //tarikh tawawruqq - $tarikh_gadai_tawaruq_start='2021-04-14'; - if($upah12==null && $hargajual==null) - { - - - - $get_lejerPinjam=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$KOD_Pinjam])->json(); - - $hariIni_Pinjaman=$get_lejerPinjam[0]['hariini']; - $kelmarin_Pinjaman=$get_lejerPinjam[0]['kelmarin']; - $jumlah_Pinjaman=$get_lejerPinjam[0]['jumlah']; - $kredit_Pinjaman=$get_lejerPinjam[0]['kredit']; - $debit_Pinjaman=$get_lejerPinjam[0]['debit']; - $recno_Pinjaman=$get_lejerPinjam[0]['recno']; - - - if($jenis_tebus=='T') - { - - $kredit_Pinjaman=$kredit_Pinjaman+$pinjaman; - - } - else - { - - - - } - $hariIni_Pinjaman=$debit_Pinjaman-$kredit_Pinjaman; - $kelmarin_Pinjaman=$jumlah_Pinjaman-$hariIni_Pinjaman; - $updateGlejer_Pinjaman=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_Pinjaman, - 'debit'=>$debit_Pinjaman, - 'kredit'=>$kredit_Pinjaman, - 'hariini'=>$hariIni_Pinjaman, - 'kelmarin' =>$kelmarin_Pinjaman, - - ]); - - - $get_latest_bayarUntung=Http::get(config('api.url').'/api/latest_transaksi_untung/data/'.$request->norujukan_barcode)->json(); - $bayaran_latest_untung=$get_latest_bayarUntung[0]['bayaran_keuntungan']; - - - $get_lejerTunai=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$KOD_tunai])->json(); - $hariIni_Tunai=$get_lejerTunai[0]['hariini']; - $kelmarin_Tunai=$get_lejerTunai[0]['kelmarin']; - $jumlah_Tunai=$get_lejerTunai[0]['jumlah']; - $kredit_Tunai=$get_lejerTunai[0]['kredit']; - $debit_Tunai=$get_lejerTunai[0]['debit']; - $recno_Tunai=$get_lejerTunai[0]['recno']; - - - if($jenis_tebus='T') + if($tebus_detail['jenistebus'] == 'P') { - - $debit_Tunai=$debit_Tunai+$bakipjm; - - } - else - { - $debit_Tunai=$debit_Tunai+$jumlah_bayaran; - - } - - $hariIni_Tunai=$debit_Tunai-$kredit_Tunai; - $updateGlejer_Tunai=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_Tunai, - 'debit'=>$debit_Tunai, - 'kredit'=>$kredit_Tunai, - 'hariini'=>$hariIni_Tunai, - 'kelmarin' =>$kelmarin_Tunai, - - ]); - - $get_latest_bayarUntung=Http::get(config('api.url').'/api/latest_transaksi_untung/data/'.$request->norujukan_barcode)->json(); - $bayaran_latest_untung=$get_latest_bayarUntung[0]['bayaran_keuntungan']; - - // $get_lejer_UntungS=Http::get(config('api.url').'/api/getGlejer/'.$request->kodcaw,['glcode'=>$Upah_Simpan])->json(); - - $get_lejer_UntungS=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$Upah_Simpan])->json(); - - $hariini_untungS=$get_lejer_UntungS[0]['hariini']; - $kelmarin_untungS=$get_lejer_UntungS[0]['kelmarin']; - $jumlah_untungS=$get_lejer_UntungS[0]['jumlah']; - $debit_untungS=$get_lejer_UntungS[0]['debit']; - $recno_untungS=$get_lejer_UntungS[0]['recno']; - $kredit_untungS=$get_lejer_UntungS[0]['kredit']; - - - $kredit_untungS=$kredit_untungS+$bayaran_latest_untung; - $hariini_untungS=$debit_untungS-$kredit_untungS; - $kelmarin_untungS=$jumlah_untungS-$hariini_untungS; - - - $updateGlejer_UntungS=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_untungS, - 'debit'=>$debit_untungS, - 'kredit'=>$kredit_untungS, - 'hariini'=>$hariini_untungS, - 'kelmarin' =>$kelmarin_untungS, - - ]); - - if($tebus_detail['jenistebus'] == 'P') - { - $totalmasuk = $tebus_detail['pinjaman'] + $tebus_detail['bakiupah'] + $masuk; $updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [ @@ -483,708 +362,9 @@ class KhazanahController extends Controller } } } - - } - else - { - - // dd(request()->all()); - - if($tebus_detail['jenistebus'] == 'P') - { - - // $totalkeluar = $tebus_detail['addpinjaman'] + $keluar; - $totalmasuk = $tebus_detail['pinjaman'] + $tebus_detail['bakiupah'] + $masuk; - // $bakiakhir = $bakiawal-$totalkeluar+$totalmasuk+$pendahuluan-$serahan; - - - $get_latest_bayarUntung=Http::get(config('api.url').'/api/latest_transaksi_untung/data/'.$request->norujukan_barcode)->json(); - $bayaran_latest_untung=$get_latest_bayarUntung[0]['bayaran_keuntungan']; - - - //KIRAAN LEJER AM PENEBUSAN P BERMULA - $get_GLCode_Tunai=Http::get(config('api.url').'/api/getGlCode/'.$auth_user['cawangan'],['glcode'=>$KOD_tunai])->json(); - $keterangan_Tunai=$get_GLCode_Tunai[0]['descpt']; - $acctype_Tunai=$get_GLCode_Tunai[0]['acttype']; - $get_lejerTunai=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$KOD_tunai])->json(); - $hariIni_Tunai=$get_lejerTunai[0]['hariini']; - $kelmarin_Tunai=$get_lejerTunai[0]['kelmarin']; - $jumlah_Tunai=$get_lejerTunai[0]['jumlah']; - $kredit_Tunai=$get_lejerTunai[0]['kredit']; - $debit_Tunai=$get_lejerTunai[0]['debit']; - $recno_Tunai=$get_lejerTunai[0]['recno']; - - - $debit_Tunai=$debit_Tunai+$jumlah_bayaran+$pinjaman; - - - $hariIni_Tunai=$debit_Tunai-$kredit_Tunai; - $kelmarin_Tunai=$jumlah_Tunai-$hariIni_Tunai; - - $updateGlejer_Tunai=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_Tunai, - 'debit'=>$debit_Tunai, - 'kredit'=>$kredit_Tunai, - 'hariini'=>$hariIni_Tunai, - 'kelmarin' =>$kelmarin_Tunai, - - ]); - - - - - $get_lejerPinjaman=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$KOD_Pembiayaan])->json(); - - $hariIni_Pinjaman=$get_lejerPinjaman[0]['hariini']; - $kelmarin_Pinjaman=$get_lejerPinjaman[0]['kelmarin']; - $jumlah_Pinjaman=$get_lejerPinjaman[0]['jumlah']; - $kredit_Pinjaman=$get_lejerPinjaman[0]['kredit']; - $debit_Pinjaman=$get_lejerPinjaman[0]['debit']; - $recno_Pinjaman=$get_lejerPinjaman[0]['recno']; - - $kredit_Pinjaman=$kredit_Pinjaman+$pinjaman; - - $hariIni_Pinjaman=$debit_Pinjaman-$kredit_Pinjaman; - $kelmarin_Pinjaman=$jumlah_Pinjaman-$hariIni_Pinjaman; - - $updateGlejer_Pinjaman=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_Pinjaman, - 'debit'=>$debit_Pinjaman, - 'kredit'=>$kredit_Pinjaman, - 'hariini'=>$hariIni_Pinjaman, - 'kelmarin' =>$kelmarin_Pinjaman, - - ]); - - $get_latest_bayarUntung=Http::get(config('api.url').'/api/latest_transaksi_untung/data/'.$request->norujukan_barcode)->json(); - $bayaran_latest_untung=$get_latest_bayarUntung[0]['bayaran_keuntungan']; - $get_lejer_Untung=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$Untung_Semasa])->json(); - - $hariini_untung=$get_lejer_Untung[0]['hariini']; - $kelmarin_untung=$get_lejer_Untung[0]['kelmarin']; - $jumlah_untung=$get_lejer_Untung[0]['jumlah']; - $debit_untung=$get_lejer_Untung[0]['debit']; - $recno_untung=$get_lejer_Untung[0]['recno']; - $kredit_untung=$get_lejer_Untung[0]['kredit']; - - $kredit_untung=$kredit_untung+$bayaran_latest_untung; - $hariini_untung=$debit_untung-$kredit_untung; - $kelmarin_untung=$jumlah_untung-$hariini_untung; - - $updateGlejer_Untung=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_untung, - 'debit'=>$debit_untung, - 'kredit'=>$kredit_untung, - 'hariini'=>$hariini_untung, - 'kelmarin' =>$kelmarin_untung, - - ]); - - - - $get_latest_bayarRebate=Http::get(config('api.url').'/api/latest_transaksi_untung/data/'.$request->norujukan_barcode)->json(); - $latest_rebate=$get_latest_bayarRebate[0]['keuntungan_rebet']; - - $get_GLCode_Rebate=Http::get(config('api.url').'/api/getGlCode/'.$auth_user['cawangan'],['glcode'=>$Rebet_A])->json(); - $keterangan_Rebate=$get_GLCode_Tunai[0]['descpt']; - $acctype_Rebate=$get_GLCode_Tunai[0]['acttype']; - $get_lejerRebet=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$Rebet_A])->json(); - $hariIni_lejerRebet=$get_lejerRebet[0]['hariini']; - $kelmarin_lejerRebet=$get_lejerRebet[0]['kelmarin']; - $jumlah_lejerRebet=$get_lejerRebet[0]['jumlah']; - $kredit_lejerRebet=$get_lejerRebet[0]['kredit']; - $debit_lejerRebet=$get_lejerRebet[0]['debit']; - $recno_lejerRebet=$get_lejerRebet[0]['recno']; - - - $debit_lejerRebet=$debit_lejerRebet+$rebet; - $hariIni_lejerRebet=$debit_lejerRebet-$kredit_lejerRebet; - $kelmarin_lejerRebet=$jumlah_lejerRebet-$hariIni_lejerRebet; - - $updateGlejer_RebetA=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_lejerRebet, - 'debit'=>$debit_lejerRebet, - 'kredit'=>$kredit_lejerRebet, - 'hariini'=>$hariIni_lejerRebet, - 'kelmarin' =>$kelmarin_lejerRebet, - - ]); - - - - - $get_latest_bayarRebate=Http::get(config('api.url').'/api/latest_transaksi_untung/data/'.$request->norujukan_barcode)->json(); - $latest_rebate=$get_latest_bayarRebate[0]['keuntungan_rebet']; - - $get_GLCode_RebateB=Http::get(config('api.url').'/api/getGlCode/'.$auth_user['cawangan'],['glcode'=>$Rebet_B])->json(); - $keterangan_RebateB=$get_GLCode_Tunai[0]['descpt']; - $acctype_RebateB=$get_GLCode_Tunai[0]['acttype']; - $get_lejerRebetB=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$Rebet_B])->json(); - $hariIni_lejerRebetB=$get_lejerRebetB[0]['hariini']; - $kelmarin_lejerRebetB=$get_lejerRebetB[0]['kelmarin']; - $jumlah_lejerRebetB=$get_lejerRebetB[0]['jumlah']; - $kredit_lejerRebetB=$get_lejerRebetB[0]['kredit']; - $debit_lejerRebetB=$get_lejerRebetB[0]['debit']; - $recno_lejerRebetB=$get_lejerRebetB[0]['recno']; - - - $kredit_lejerRebetB=$kredit_lejerRebetB+$rebet; - $hariIni_lejerRebetB=$debit_lejerRebetB-$kredit_lejerRebetB; - $kelmarin_lejerRebetB=$jumlah_lejerRebetB-$hariIni_lejerRebetB; - - $updateGlejer_RebetB=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_lejerRebetB, - 'debit'=>$debit_lejerRebetB, - 'kredit'=>$kredit_lejerRebetB, - 'hariini'=>$hariIni_lejerRebetB, - 'kelmarin' =>$kelmarin_lejerRebetB, - - ]); - - - - - - - //KIRAAN LEJER AM PENEBUSAN P BERAKHIR - - $updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [ - 'kodlaluan' => $tebus_detail['teller'], - 'keluar'=>$keluar, - 'masuk'=>$totalmasuk, - 'bakiakhir'=>$bakiakhir - ]); - - if($updateTunai) - { - $update=Http::put(config('api.url').'/api/updatetagterima/'.$auth_user['cawangan'].'/'.$request->norujukan_barcode)->json(); - } - else - { - dd('x masuk aliran tunai'); - } - - }else{ - - if($tebus_detail['jenistebus'] == 'S') - { - $totalmasuk = $tebus_detail['pinjaman'] + $tebus_detail['bakiupah'] + $masuk; - - $updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [ - 'kodlaluan' => $tebus_detail['teller'], - 'keluar'=>$keluar, - 'masuk'=>$totalmasuk, - 'bakiakhir'=>$bakiakhir - ]); - - if($updateTunai) - { - $update=Http::put(config('api.url').'/api/updatetagterima/'.$auth_user['cawangan'].'/'.$request->norujukan_barcode)->json(); - } - else - { - dd('x masuk aliran tunai'); - } - - - $get_GLCode_Tunai=Http::get(config('api.url').'/api/getGlCode/'.$auth_user['cawangan'],['glcode'=>$KOD_tunai])->json(); - $keterangan_Tunai=$get_GLCode_Tunai[0]['descpt']; - $acctype_Tunai=$get_GLCode_Tunai[0]['acttype']; - $get_lejerTunai=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$KOD_tunai])->json(); - $hariIni_Tunai=$get_lejerTunai[0]['hariini']; - $kelmarin_Tunai=$get_lejerTunai[0]['kelmarin']; - $jumlah_Tunai=$get_lejerTunai[0]['jumlah']; - $kredit_Tunai=$get_lejerTunai[0]['kredit']; - $debit_Tunai=$get_lejerTunai[0]['debit']; - $recno_Tunai=$get_lejerTunai[0]['recno']; - - $get_latest_bayarUntung=Http::get(config('api.url').'/api/latest_transaksi_untung/'.$request->norujukan_barcode)->json(); - $bayaran_latest_untung=$get_latest_bayarUntung[0]['bayaran_keuntungan']; - $pinjaman_baru=$pinjaman+$bayaran_latest_untung; - - //$pinjaman_baru=$bakipjm-$bayaran_latest_untung; - $debit_Tunai=$debit_Tunai+$pinjaman+$bayaran_latest_untung; - // $kredit_Tunai=$kredit_Tunai+$pinjaman; - - $hariIni_Tunai=$debit_Tunai-$kredit_Tunai; - $kelmarin_Tunai=$jumlah_Tunai-$hariIni_Tunai; - - - - $updateGlejer_Tunai=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_Tunai, - 'debit'=>$debit_Tunai, - 'kredit'=>$kredit_Tunai, - 'hariini'=>$hariIni_Tunai, - 'kelmarin' =>$kelmarin_Tunai, - - ]); - - - - - - - - $gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $auth_user['cawangan'] .'/' .$request->norujukan_barcode)->json(); - $upah_semasa=$gadai[0]['upah12']; - - - - - $get_GLCode_UT=Http::get(config('api.url').'/api/getGlCode/'.$auth_user['cawangan'],['glcode'=>$U_TG])->json(); - $keterangan_UT=$get_GLCode_Tunai[0]['descpt']; - $acctype_UT=$get_GLCode_Tunai[0]['acttype']; - - - $get_lejerUT=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$U_TG])->json(); - $hariIni_UT=$get_lejerUT[0]['hariini']; - $kelmarin_UT=$get_lejerUT[0]['kelmarin']; - $jumlah_UT=$get_lejerUT[0]['jumlah']; - $kredit_UT=$get_lejerUT[0]['kredit']; - $debit_UT=$get_lejerUT[0]['debit']; - $recno_UT=$get_lejerUT[0]['recno']; - - - if($debit_UT==0) - { - - $debit_UT=$debit_UT+$upah12; - $hariIni_UT=$debit_UT-$kredit_UT; - $kelmarin_UT=$jumlah_UT-$hariIni_UT; - - $updateGlejer_UT=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_UT, - 'debit'=>$debit_UT, - 'kredit'=>$kredit_UT, - 'hariini'=>$hariIni_UT, - 'kelmarin' =>$kelmarin_UT, - - ]); - - } - else - { - - $hariIni_UT=$get_lejerUT[0]['hariini']; - $kelmarin_UT=$get_lejerUT[0]['kelmarin']; - $jumlah_UT=$get_lejerUT[0]['jumlah']; - $kredit_UT=$get_lejerUT[0]['kredit']; - $debit_UT=$get_lejerUT[0]['debit']; - $recno_UT=$get_lejerUT[0]['recno']; - - - - $updateGlejer_UT=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_UT, - 'debit'=>$debit_UT, - 'kredit'=>$kredit_UT, - 'hariini'=>$hariIni_UT, - 'kelmarin' =>$kelmarin_UT, - - ]); - - } - - - - - $U_HG='2000/007'; - - - $get_GLCode_U_HG=Http::get(config('api.url').'/api/getGlCode/'.$auth_user['cawangan'],['glcode'=>$U_HG])->json(); - $keterangan_U_HG=$get_GLCode_Tunai[0]['descpt']; - $acctype_U_HG=$get_GLCode_Tunai[0]['acttype']; - - - $get_lejerUG=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$U_HG])->json(); - - - $hariIni_UG=$get_lejerUG[0]['hariini']; - $kelmarin_UG=$get_lejerUG[0]['kelmarin']; - $jumlah_UG=$get_lejerUG[0]['jumlah']; - $kredit_UG=$get_lejerUG[0]['kredit']; - $debit_UG=$get_lejerUG[0]['debit']; - $recno_UG=$get_lejerUG[0]['recno']; - - if($kredit_UG==0) - { - - - $kredit_UG=$kredit_UG+$upah12; - - $hariIni_UG=$debit_UG-$kredit_UG; - $kelmarin_UG=$jumlah_UG-$hariIni_UG; - - $updateGlejer_UG=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_UG, - 'debit'=>$debit_UG, - 'kredit'=>$kredit_UG, - 'hariini'=>$hariIni_UG, - 'kelmarin' =>$kelmarin_UG, - - ]); - - } - else - { - - $hariIni_UG=$get_lejerUG[0]['hariini']; - $kelmarin_UG=$get_lejerUG[0]['kelmarin']; - $jumlah_UG=$get_lejerUG[0]['jumlah']; - $kredit_UG=$get_lejerUG[0]['kredit']; - $debit_UG=$get_lejerUG[0]['debit']; - $recno_UG=$get_lejerUG[0]['recno']; - - - $updateGlejer_UG=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_UG, - 'debit'=>$debit_UG, - 'kredit'=>$kredit_UG, - 'hariini'=>$hariIni_UG, - 'kelmarin' =>$kelmarin_UG, - - ]); - - - - } - - - - //kira upah 12 bulan pembiayaan baru.. - - $get_lejerPinjaman=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$KOD_Pembiayaan])->json(); - - $hariIni_Pinjaman=$get_lejerPinjaman[0]['hariini']; - $kelmarin_Pinjaman=$get_lejerPinjaman[0]['kelmarin']; - $jumlah_Pinjaman=$get_lejerPinjaman[0]['jumlah']; - $kredit_Pinjaman=$get_lejerPinjaman[0]['kredit']; - $debit_Pinjaman=$get_lejerPinjaman[0]['debit']; - $recno_Pinjaman=$get_lejerPinjaman[0]['recno']; - - $kredit_Pinjaman=$kredit_Pinjaman+$pinjaman; - - - $hariIni_Pinjaman=$debit_Pinjaman-$kredit_Pinjaman; - $kelmarin_Pinjaman=$jumlah_Pinjaman-$hariIni_Pinjaman; - - $updateGlejer_Pinjaman=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_Pinjaman, - 'debit'=>$debit_Pinjaman, - 'kredit'=>$kredit_Pinjaman, - 'hariini'=>$hariIni_Pinjaman, - 'kelmarin' =>$kelmarin_Pinjaman, - - ]); - - $get_latest_bayarUntung=Http::get(config('api.url').'/api/latest_transaksi_untung/'.$request->norujukan_barcode)->json(); - $bayaran_latest_untung=$get_latest_bayarUntung[0]['bayaran_keuntungan']; - $bayaran_rebate=$get_latest_bayarUntung[0]['keuntungan_rebet']; - $get_lejer_Untung=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$Untung_Semasa])->json(); - - $hariini_untung=$get_lejer_Untung[0]['hariini']; - $kelmarin_untung=$get_lejer_Untung[0]['kelmarin']; - $jumlah_untung=$get_lejer_Untung[0]['jumlah']; - $debit_untung=$get_lejer_Untung [0]['debit']; - $recno_untung=$get_lejer_Untung [0]['recno']; - $kredit_untung=$get_lejer_Untung [0]['kredit']; - - $kredit_untung=$kredit_untung+$bayaran_latest_untung; - $hariini_untung=$debit_untung-$kredit_untung; - $kelmarin_untung=$jumlah_untung-$hariini_untung; - - $updateGlejer_Untung=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_untung, - 'debit'=>$debit_untung, - 'kredit'=>$kredit_untung, - 'hariini'=>$hariini_untung, - 'kelmarin' =>$kelmarin_untung, - - ]); - - - $get_latest_bayarRebate=Http::get(config('api.url').'/api/latest_transaksi_untung/data/'.$request->norujukan_barcode)->json(); - $latest_rebate=$get_latest_bayarRebate[0]['keuntungan_rebet']; - - $get_GLCode_Rebate=Http::get(config('api.url').'/api/getGlCode/'.$auth_user['cawangan'],['glcode'=>$Rebet_A])->json(); - $keterangan_Rebate=$get_GLCode_Tunai[0]['descpt']; - $acctype_Rebate=$get_GLCode_Tunai[0]['acttype']; - $get_lejerRebet=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$Rebet_A])->json(); - $hariIni_lejerRebet=$get_lejerRebet[0]['hariini']; - $kelmarin_lejerRebet=$get_lejerRebet[0]['kelmarin']; - $jumlah_lejerRebet=$get_lejerRebet[0]['jumlah']; - $kredit_lejerRebet=$get_lejerRebet[0]['kredit']; - $debit_lejerRebet=$get_lejerRebet[0]['debit']; - $recno_lejerRebet=$get_lejerRebet[0]['recno']; - - - $debit_lejerRebet=$debit_lejerRebet+$rebet; - $hariIni_lejerRebet=$debit_lejerRebet-$kredit_lejerRebet; - $kelmarin_lejerRebet=$jumlah_lejerRebet-$hariIni_lejerRebet; - - $updateGlejer_RebetA=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_lejerRebet, - 'debit'=>$debit_lejerRebet, - 'kredit'=>$kredit_lejerRebet, - 'hariini'=>$hariIni_lejerRebet, - 'kelmarin' =>$kelmarin_lejerRebet, - - ]); - - - $get_latest_bayarRebate=Http::get(config('api.url').'/api/latest_transaksi_untung/data/'.$request->norujukan_barcode)->json(); - $latest_rebate=$get_latest_bayarRebate[0]['keuntungan_rebet']; - $get_GLCode_RebateB=Http::get(config('api.url').'/api/getGlCode/'.$auth_user['cawangan'],['glcode'=>$Rebet_B])->json(); - $keterangan_RebateB=$get_GLCode_Tunai[0]['descpt']; - $acctype_RebateB=$get_GLCode_Tunai[0]['acttype']; - $get_lejerRebetB=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$Rebet_B])->json(); - $hariIni_lejerRebetB=$get_lejerRebetB[0]['hariini']; - $kelmarin_lejerRebetB=$get_lejerRebetB[0]['kelmarin']; - $jumlah_lejerRebetB=$get_lejerRebetB[0]['jumlah']; - $kredit_lejerRebetB=$get_lejerRebetB[0]['kredit']; - $debit_lejerRebetB=$get_lejerRebetB[0]['debit']; - $recno_lejerRebetB=$get_lejerRebetB[0]['recno']; - - - $kredit_lejerRebetB=$kredit_lejerRebetB+$rebet; - $hariIni_lejerRebetB=$debit_lejerRebetB-$kredit_lejerRebetB; - $kelmarin_lejerRebetB=$jumlah_lejerRebetB-$hariIni_lejerRebetB; - - $updateGlejer_RebetB=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_lejerRebetB, - 'debit'=>$debit_lejerRebetB, - 'kredit'=>$kredit_lejerRebetB, - 'hariini'=>$hariIni_lejerRebetB, - 'kelmarin' =>$kelmarin_lejerRebetB, - - - ]); - //KIRAAN LEJER AM PENEBUSAN S BERAKHIR - }else{ - - $totalmasuk = $tebus_detail['bakipjm'] + $masuk; - - $get_GLCode_Tunai=Http::get(config('api.url').'/api/getGlCode/'.$auth_user['cawangan'],['glcode'=>$KOD_tunai])->json(); - $keterangan_Tunai=$get_GLCode_Tunai[0]['descpt']; - $acctype_Tunai=$get_GLCode_Tunai[0]['acttype']; - $get_lejerTunai=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$KOD_tunai])->json(); - $hariIni_Tunai=$get_lejerTunai[0]['hariini']; - $kelmarin_Tunai=$get_lejerTunai[0]['kelmarin']; - $jumlah_Tunai=$get_lejerTunai[0]['jumlah']; - $kredit_Tunai=$get_lejerTunai[0]['kredit']; - $debit_Tunai=$get_lejerTunai[0]['debit']; - $recno_Tunai=$get_lejerTunai[0]['recno']; - - - $debit_Tunai=$debit_Tunai+$bakipjm;; - // $kredit_Tunai=$kredit_Tunai+$pinjaman; - - $hariIni_Tunai=$debit_Tunai-$kredit_Tunai; - $kelmarin_Tunai=$jumlah_Tunai-$hariIni_Tunai; - - $updateGlejer_Tunai=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_Tunai, - 'debit'=>$debit_Tunai, - 'kredit'=>$kredit_Tunai, - 'hariini'=>$hariIni_Tunai, - 'kelmarin' =>$kelmarin_Tunai, - - ]); - - - - - $get_lejerPinjaman=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$KOD_Pembiayaan])->json(); - - $hariIni_Pinjaman=$get_lejerPinjaman[0]['hariini']; - $kelmarin_Pinjaman=$get_lejerPinjaman[0]['kelmarin']; - $jumlah_Pinjaman=$get_lejerPinjaman[0]['jumlah']; - $kredit_Pinjaman=$get_lejerPinjaman[0]['kredit']; - $debit_Pinjaman=$get_lejerPinjaman[0]['debit']; - $recno_Pinjaman=$get_lejerPinjaman[0]['recno']; - - $kredit_Pinjaman=$kredit_Pinjaman+$pinjaman; - $hariIni_Pinjaman=$debit_Pinjaman-$kredit_Pinjaman; - $kelmarin_Pinjaman=$jumlah_Pinjaman-$hariIni_Pinjaman; - - $updateGlejer_Pinjaman=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_Pinjaman, - 'debit'=>$debit_Pinjaman, - 'kredit'=>$kredit_Pinjaman, - 'hariini'=>$hariIni_Pinjaman, - 'kelmarin' =>$kelmarin_Pinjaman, - - ]); - - - - $get_latest_bayarUntung=Http::get(config('api.url').'/api/latest_transaksi_untung/'.$request->norujukan_barcode)->json(); - $bayaran_latest_untung=$get_latest_bayarUntung[0]['bayaran_keuntungan']; - $bayaran_rebate=$get_latest_bayarUntung[0]['keuntungan_rebet']; - $get_lejer_Untung=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$Untung_Semasa])->json(); - - $hariini_untung=$get_lejer_Untung[0]['hariini']; - $kelmarin_untung=$get_lejer_Untung[0]['kelmarin']; - $jumlah_untung=$get_lejer_Untung[0]['jumlah']; - $debit_untung=$get_lejer_Untung [0]['debit']; - $recno_untung=$get_lejer_Untung [0]['recno']; - $kredit_untung=$get_lejer_Untung [0]['kredit']; - - - $kredit_untung=$kredit_untung+$bayaran_latest_untung; - $hariini_untung=$debit_untung-$kredit_untung; - $kelmarin_untung=$jumlah_untung-$hariini_untung; - - $updateGlejer_Untung=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_untung, - 'debit'=>$debit_untung, - 'kredit'=>$kredit_untung, - 'hariini'=>$hariini_untung, - 'kelmarin' =>$kelmarin_untung, - - ]); - - - - - $get_bayaranPD=Http::get(config('api.url').'/api/jumlah_bayaran_pendahuluan/'.$request->norujukan_barcode)->json(); - $jumlah_bayaran_pendahuluan=$get_bayaranPD[0]['total_byr_pendahuluan']; - - $get_lejerBayaran_Pendahuluan=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$KOD_BP])->json(); - - $hariini_bp=$get_lejerBayaran_Pendahuluan[0]['hariini']; - $kelmarin_bp=$get_lejerBayaran_Pendahuluan[0]['kelmarin']; - $jumlah_bp=$get_lejerBayaran_Pendahuluan[0]['jumlah']; - $debit_bp=$get_lejerBayaran_Pendahuluan[0]['debit']; - $recno_bp=$get_lejerBayaran_Pendahuluan[0]['recno']; - $kredit_bp=$get_lejerBayaran_Pendahuluan[0]['kredit']; - - $bayaran_latest_bayaran_pembiayaan=$get_latest_bayarUntung[0]['bayaran_pembiayaan']; - $kredit_tebus_bp=$bayaran_latest_bayaran_pembiayaan-$jumlah_bayaran_pendahuluan; - - $debit_bp=0.0; - $kredit_bp=0.0; - - - - - $hariini_bp=$debit_bp-$kredit_bp; - $kelmarin_bp=$jumlah_bp-$hariini_bp; - - - $updateGlejer_BP=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_bp, - 'debit'=>$debit_bp, - 'kredit'=>$kredit_bp, - 'hariini'=>$hariini_bp, - 'kelmarin'=>$kelmarin_bp, - ]); - - - - - $get_latest_bayarRebate=Http::get(config('api.url').'/api/latest_transaksi_untung/data/'.$request->norujukan_barcode)->json(); - $latest_rebate=$get_latest_bayarRebate[0]['keuntungan_rebet']; - - $get_GLCode_Rebate=Http::get(config('api.url').'/api/getGlCode/'.$auth_user['cawangan'],['glcode'=>$Rebet_A])->json(); - $keterangan_Rebate=$get_GLCode_Tunai[0]['descpt']; - $acctype_Rebate=$get_GLCode_Tunai[0]['acttype']; - $get_lejerRebet=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$Rebet_A])->json(); - $hariIni_lejerRebet=$get_lejerRebet[0]['hariini']; - $kelmarin_lejerRebet=$get_lejerRebet[0]['kelmarin']; - $jumlah_lejerRebet=$get_lejerRebet[0]['jumlah']; - $kredit_lejerRebet=$get_lejerRebet[0]['kredit']; - $debit_lejerRebet=$get_lejerRebet[0]['debit']; - $recno_lejerRebet=$get_lejerRebet[0]['recno']; - - - $debit_lejerRebet=$debit_lejerRebet+$rebet; - $hariIni_lejerRebet=$debit_lejerRebet-$kredit_lejerRebet; - $kelmarin_lejerRebet=$jumlah_lejerRebet-$hariIni_lejerRebet; - - $updateGlejer_RebetA=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_lejerRebet, - 'debit'=>$debit_lejerRebet, - 'kredit'=>$kredit_lejerRebet, - 'hariini'=>$hariIni_lejerRebet, - 'kelmarin' =>$kelmarin_lejerRebet, - - ]); - - - - - - $get_latest_bayarRebate=Http::get(config('api.url').'/api/latest_transaksi_untung/data/'.$request->norujukan_barcode)->json(); - $latest_rebate=$get_latest_bayarRebate[0]['keuntungan_rebet']; - - $get_GLCode_RebateB=Http::get(config('api.url').'/api/getGlCode/'.$auth_user['cawangan'],['glcode'=>$Rebet_B])->json(); - $keterangan_RebateB=$get_GLCode_Tunai[0]['descpt']; - $acctype_RebateB=$get_GLCode_Tunai[0]['acttype']; - $get_lejerRebetB=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$Rebet_B])->json(); - $hariIni_lejerRebetB=$get_lejerRebetB[0]['hariini']; - $kelmarin_lejerRebetB=$get_lejerRebetB[0]['kelmarin']; - $jumlah_lejerRebetB=$get_lejerRebetB[0]['jumlah']; - $kredit_lejerRebetB=$get_lejerRebetB[0]['kredit']; - $debit_lejerRebetB=$get_lejerRebetB[0]['debit']; - $recno_lejerRebetB=$get_lejerRebetB[0]['recno']; - - - $kredit_lejerRebetB=$kredit_lejerRebetB+$rebet; - $hariIni_lejerRebetB=$debit_lejerRebetB-$kredit_lejerRebetB; - $kelmarin_lejerRebetB=$jumlah_lejerRebetB-$hariIni_lejerRebetB; - - $updateGlejer_RebetB=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_lejerRebetB, - 'debit'=>$debit_lejerRebetB, - 'kredit'=>$kredit_lejerRebetB, - 'hariini'=>$hariIni_lejerRebetB, - 'kelmarin' =>$kelmarin_lejerRebetB, - - ]); - - } - // $bakiakhir = $bakiawal-$keluar+$totalmasuk+$pendahuluan-$serahan; - $updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [ - 'kodlaluan' => $tebus_detail['teller'], - 'keluar'=>$keluar, - 'masuk'=>$totalmasuk, - 'bakiakhir'=>$bakiakhir - ]); - - if($updateTunai) - { - $update=Http::put(config('api.url').'/api/updatetagterima/'.$auth_user['cawangan'].'/'.$request->norujukan_barcode)->json(); - } - else - { - // - - //dd('x masuk aliran tunai'); - } - - } - - } - //end tawaruq tebus - // $bakiakhir = $bakiawal-$keluar+$totalmasuk+$pendahuluan-$serahan; - //masuk dalam tunai aliran - - - // return $this->tebus(); - return redirect()->route('khazanah.tebus'); - - - - - - } - //END KHAZANAH FARIS - public function pendahuluanserah($id) { @@ -1616,451 +796,6 @@ class KhazanahController extends Controller ])->json(); - - //Lejer AM untuk Panjar bermula - - - $PANJAR_AM='3000/018'; - $KERAIAN='3000/019'; - $SELENGGARA='3000/017'; - - $TUNAI='1000/010'; - - if($kategori=="Belanja AM - Perubatan"||$kategori== "Belanja AM" || $kategori=="Belanja AM - Barangan Dapur" || $kategori=="Belanja AM - Postage") - { - - $get_glCode_Details=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$PANJAR_AM])->json(); - $gl_cdetails=$get_glCode_Details[0]; - $keterangan=$get_glCode_Details[0]['descpt']; //keterangan glcode - $actype=$get_glCode_Details[0]['acttype']; //keterangan acctype - - $get_Panjar_AM=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$PANJAR_AM])->json(); - if(sizeof($get_Panjar_AM)==0) - { - $jumlah=0.0; - $getGLedjer_Semalam=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$PANJAR_AM])->json(); - if(sizeof($getGLedjer_Semalam)==0) - { - $jumlah=0.0; - } - else - { - - $jumlah_semalam=$getGLedjer_Semalam[0]['jumlah']; - $hariIniSemalam=$getGLedjer_Semalam[0]['hariini']; - $jumlah=$jumlah_semalam+$hariIniSemalam; - } - $jumlahBulan_ini=0.0; - $get_GlejerBulan_Tahun=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$PANJAR_AM])->json(); - - if( sizeof($get_GlejerBulan_Tahun)==0) - { - $jumlahBulan_ini=0.0; - } - else - { - $jumlahBulan_ini=$get_GlejerBulan_Tahun[0]['jumlah']; - $jumlahBulan_ini=$jumlah-$jumlahBulan_ini; - - }//end bulan tahun - $Jumlah_TahunIni=0.0; - $get_Glejer_Tahun=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$PANJAR_AM])->json(); - if(sizeof($get_Glejer_Tahun)==0) - { - $Jumlah_TahunIni=0.0; - } - else - { - - $JumTahunIni=$get_Glejer_Tahun[0]['jumlah']; - $Jumlah_TahunIni=$jumlah-$JumTahunIni; - - } - - $HariIni=0.0-$request->bayaran;; - $kelmarin=$jumlah-$HariIni; - - //insert glejer untuk current date /hari ini - $daftarGlejer=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[ - 'kodcaw'=>$auth_user['cawangan'], - 'glcode'=>$PANJAR_AM, - 'descpt'=>$keterangan, - 'debit'=>$request->bayaran, - 'kredit'=>0.0, - 'hariini'=>$HariIni, - 'kelmarin'=>$kelmarin, - 'jumlah'=>$jumlah, - 'bulanini'=>$jumlahBulan_ini, - 'tahunini'=>$Jumlah_TahunIni, - 'acttype'=> $actype - - ]); - - - $LejerTunaiDitangan=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$TUNAI])->json(); - $hariini_Tunai=$LejerTunaiDitangan[0]['hariini']; - $kelmarin_Tunai=$LejerTunaiDitangan[0]['kelmarin']; - $jumlah_Tunai=$LejerTunaiDitangan[0]['jumlah']; - $debit_Tunai=$LejerTunaiDitangan[0]['debit']; - $recno_Tunai=$LejerTunaiDitangan[0]['recno']; - $kredit_Tunai=$LejerTunaiDitangan[0]['kredit']; - - $kredit_Tunai=$kredit_Tunai+$request->bayaran; - $hariini_Tunai=$debit_Tunai-$kredit_Tunai; - $kelmarin_Tunai=$jumlah_Tunai-$hariini_Tunai; - - - $update_TunaiDiTangan=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_Tunai, - 'debit'=>$debit_Tunai, - 'kredit'=>$kredit_Tunai, - 'hariini'=>$hariini_Tunai, - 'kelmarin'=>$kelmarin_Tunai, - - ]); - - - - - } - else - { - - $hariini_panjar= $get_Panjar_AM[0]['hariini']; - $kelmarin_panjar= $get_Panjar_AM[0]['kelmarin']; - $jumlah_panjar= $get_Panjar_AM[0]['jumlah']; - $debit_panjar= $get_Panjar_AM[0]['debit']; - $recno_panjar= $get_Panjar_AM[0]['recno']; - $kredit_panjar= $get_Panjar_AM[0]['kredit']; - - - $debit_panjar=$debit_panjar+$request->bayaran; - $harini_panjar=$debit_panjar-$kredit_panjar; - $kelmarin_panjar=$jumlah_panjar-$harini_panjar; - - $update_PanjarAM=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_panjar, - 'debit'=>$debit_panjar, - 'kredit'=>$kredit_panjar, - 'hariini'=>$hariini_panjar, - 'kelmarin'=>$kelmarin_panjar, - - - ]); - - $LejerTunaiDitangan=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$TUNAI])->json(); - $hariini_Tunai=$LejerTunaiDitangan[0]['hariini']; - $kelmarin_Tunai=$LejerTunaiDitangan[0]['kelmarin']; - $jumlah_Tunai=$LejerTunaiDitangan[0]['jumlah']; - $debit_Tunai=$LejerTunaiDitangan[0]['debit']; - $recno_Tunai=$LejerTunaiDitangan[0]['recno']; - $kredit_Tunai=$LejerTunaiDitangan[0]['kredit']; - - $kredit_Tunai=$kredit_Tunai+$request->bayaran; - $hariini_Tunai=$debit_Tunai-$kredit_Tunai; - $kelmarin_Tunai=$jumlah_Tunai-$hariini_Tunai; - - $update_TunaiDiTangan=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_Tunai, - 'debit'=>$debit_Tunai, - 'kredit'=>$kredit_Tunai, - 'hariini'=>$hariini_Tunai, - 'kelmarin'=>$kelmarin_Tunai, - - ]); - - - } - - } //end belanja AM - else if( $kategori=="Keraian & Promosi") - { - - $get_glCode_Details=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$KERAIAN])->json(); - $gl_cdetails=$get_glCode_Details[0]; - $keterangan=$get_glCode_Details[0]['descpt']; //keterangan glcode - $actype=$get_glCode_Details[0]['acttype']; //keterangan acctype - - $get_Panjar_AM=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$KERAIAN])->json(); - if(sizeof($get_Panjar_AM)==0) - { - $jumlah=0.0; - $getGLedjer_Semalam=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$KERAIAN])->json(); - if(sizeof($getGLedjer_Semalam)==0) - { - $jumlah=0.0; - } - else - { - - $jumlah_semalam=$getGLedjer_Semalam[0]['jumlah']; - $hariIniSemalam=$getGLedjer_Semalam[0]['hariini']; - $jumlah=$jumlah_semalam+$hariIniSemalam; - } - $jumlahBulan_ini=0.0; - $get_GlejerBulan_Tahun=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$KERAIAN])->json(); - - if( sizeof($get_GlejerBulan_Tahun)==0) - { - $jumlahBulan_ini=0.0; - } - else - { - $jumlahBulan_ini=$get_GlejerBulan_Tahun[0]['jumlah']; - $jumlahBulan_ini=$jumlah-$jumlahBulan_ini; - - }//end bulan tahun - $Jumlah_TahunIni=0.0; - $get_Glejer_Tahun=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$KERAIAN])->json(); - if(sizeof($get_Glejer_Tahun)==0) - { - $Jumlah_TahunIni=0.0; - } - else - { - - $JumTahunIni=$get_Glejer_Tahun[0]['jumlah']; - $Jumlah_TahunIni=$jumlah-$JumTahunIni; - - } - - $HariIni=0.00-$request->bayaran; - $kelmarin=$jumlah-$HariIni; - - //insert glejer untuk current date /hari ini - $daftarGlejer=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[ - 'kodcaw'=>$auth_user['cawangan'], - 'glcode'=>$KERAIAN, - 'descpt'=>$keterangan, - 'debit'=>$request->bayaran, - 'kredit'=>0.0, - 'hariini'=>$HariIni, - 'kelmarin'=>$kelmarin, - 'jumlah'=>$jumlah, - 'bulanini'=>$jumlahBulan_ini, - 'tahunini'=>$Jumlah_TahunIni, - 'acttype'=> $actype - - ]); - - $LejerTunaiDitangan=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$TUNAI])->json(); - $hariini_Tunai=$LejerTunaiDitangan[0]['hariini']; - $kelmarin_Tunai=$LejerTunaiDitangan[0]['kelmarin']; - $jumlah_Tunai=$LejerTunaiDitangan[0]['jumlah']; - $debit_Tunai=$LejerTunaiDitangan[0]['debit']; - $recno_Tunai=$LejerTunaiDitangan[0]['recno']; - $kredit_Tunai=$LejerTunaiDitangan[0]['kredit']; - - $kredit_Tunai=$kredit_Tunai+$request->bayaran; - $hariini_Tunai=$debit_Tunai-$kredit_Tunai; - $kelmarin_Tunai=$jumlah_Tunai-$hariini_Tunai; - - $update_TunaiDiTangan=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_Tunai, - 'debit'=>$debit_Tunai, - 'kredit'=>$kredit_Tunai, - 'hariini'=>$hariini_Tunai, - 'kelmarin'=>$kelmarin_Tunai, - - ]); - - } - else - { - - $hariini_panjar= $get_Panjar_AM[0]['hariini']; - $kelmarin_panjar= $get_Panjar_AM[0]['kelmarin']; - $jumlah_panjar= $get_Panjar_AM[0]['jumlah']; - $debit_panjar= $get_Panjar_AM[0]['debit']; - $recno_panjar= $get_Panjar_AM[0]['recno']; - $kredit_panjar= $get_Panjar_AM[0]['kredit']; - - - $debit_panjar=$debit_panjar+$request->bayaran; - $harini_panjar=$debit_panjar-$kredit_panjar; - $kelmarin_panjar=$jumlah_panjar-$harini_panjar; - - $update_PanjarAM=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_panjar, - 'debit'=>$debit_panjar, - 'kredit'=>$kredit_panjar, - 'hariini'=>$hariini_panjar, - 'kelmarin'=>$kelmarin_panjar, - ]); - - $LejerTunaiDitangan=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$TUNAI])->json(); - $hariini_Tunai=$LejerTunaiDitangan[0]['hariini']; - $kelmarin_Tunai=$LejerTunaiDitangan[0]['kelmarin']; - $jumlah_Tunai=$LejerTunaiDitangan[0]['jumlah']; - $debit_Tunai=$LejerTunaiDitangan[0]['debit']; - $recno_Tunai=$LejerTunaiDitangan[0]['recno']; - $kredit_Tunai=$LejerTunaiDitangan[0]['kredit']; - - $kredit_Tunai=$kredit_Tunai+$request->bayaran; - $hariini_Tunai=$debit_Tunai-$kredit_Tunai; - $kelmarin_Tunai=$jumlah_Tunai-$hariini_Tunai; - - $update_TunaiDiTangan=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_Tunai, - 'debit'=>$debit_Tunai, - 'kredit'=>$kredit_Tunai, - 'hariini'=>$hariini_Tunai, - 'kelmarin'=>$kelmarin_Tunai, - - ]); - - - } - - }//emd keraian Promosi - else - { - - $get_glCode_Details=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$SELENGGARA])->json(); - $gl_cdetails=$get_glCode_Details[0]; - $keterangan=$get_glCode_Details[0]['descpt']; //keterangan glcode - $actype=$get_glCode_Details[0]['acttype']; //keterangan acctype - - $get_Panjar_AM=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$SELENGGARA])->json(); - - if(sizeof($get_Panjar_AM)==0) - { - $jumlah=0.0; - $getGLedjer_Semalam=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$SELENGGARA])->json(); - if(sizeof($getGLedjer_Semalam)==0) - { - $jumlah=0.0; - } - else - { - - $jumlah_semalam=$getGLedjer_Semalam[0]['jumlah']; - $hariIniSemalam=$getGLedjer_Semalam[0]['hariini']; - $jumlah=$jumlah_semalam+$hariIniSemalam; - } - $jumlahBulan_ini=0.0; - $get_GlejerBulan_Tahun=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$SELENGGARA])->json(); - - if( sizeof($get_GlejerBulan_Tahun)==0) - { - $jumlahBulan_ini=0.0; - } - else - { - $jumlahBulan_ini=$get_GlejerBulan_Tahun[0]['jumlah']; - $jumlahBulan_ini=$jumlah-$jumlahBulan_ini; - - }//end bulan tahun - $Jumlah_TahunIni=0.0; - $get_Glejer_Tahun=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$SELENGGARA])->json(); - if(sizeof($get_Glejer_Tahun)==0) - { - $Jumlah_TahunIni=0.0; - } - else - { - - $JumTahunIni=$get_Glejer_Tahun[0]['jumlah']; - $Jumlah_TahunIni=$jumlah-$JumTahunIni; - - } - - $HariIni=0.0-$request->bayaran; - $kelmarin=$jumlah-$HariIni; - - //insert glejer untuk current date /hari ini - $daftarGlejer=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[ - 'kodcaw'=>$auth_user['cawangan'], - 'glcode'=>$SELENGGARA, - 'descpt'=>$keterangan, - 'debit'=>$request->bayaran, - 'kredit'=>0.0, - 'hariini'=>$HariIni, - 'kelmarin'=>$kelmarin, - 'jumlah'=>$jumlah, - 'bulanini'=>$jumlahBulan_ini, - 'tahunini'=>$Jumlah_TahunIni, - 'acttype'=> $actype - - ]); - - - - - $LejerTunaiDitangan=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$TUNAI])->json(); - $hariini_Tunai=$LejerTunaiDitangan[0]['hariini']; - $kelmarin_Tunai=$LejerTunaiDitangan[0]['kelmarin']; - $jumlah_Tunai=$LejerTunaiDitangan[0]['jumlah']; - $debit_Tunai=$LejerTunaiDitangan[0]['debit']; - $recno_Tunai=$LejerTunaiDitangan[0]['recno']; - $kredit_Tunai=$LejerTunaiDitangan[0]['kredit']; - - $kredit_Tunai=$kredit_Tunai+$request->bayaran; - $hariini_Tunai=$debit_Tunai-$kredit_Tunai; - $kelmarin_Tunai=$jumlah_Tunai-$hariini_Tunai; - - $update_TunaiDiTangan=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user->kodcaw,[ - 'recno'=>$recno_Tunai, - 'debit'=>$debit_Tunai, - 'kredit'=>$kredit_Tunai, - 'hariini'=>$hariini_Tunai, - 'kelmarin'=>$kelmarin_Tunai, - - ]); - - - - } - else - { - - $hariini_panjar= $get_Panjar_AM[0]['hariini']; - $kelmarin_panjar= $get_Panjar_AM[0]['kelmarin']; - $jumlah_panjar= $get_Panjar_AM[0]['jumlah']; - $debit_panjar= $get_Panjar_AM[0]['debit']; - $recno_panjar= $get_Panjar_AM[0]['recno']; - $kredit_panjar= $get_Panjar_AM[0]['kredit']; - $debit_panjar=$debit_panjar+$request->bayaran; - $harini_panjar=$debit_panjar-$kredit_panjar; - $kelmarin_panjar=$jumlah_panjar-$harini_panjar; - $update_PanjarAM=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_panjar, - 'debit'=>$debit_panjar, - 'kredit'=>$kredit_panjar, - 'hariini'=>$hariini_panjar, - 'kelmarin'=>$kelmarin_panjar, - - - ]); - - $LejerTunaiDitangan=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$TUNAI])->json(); - $hariini_Tunai=$LejerTunaiDitangan[0]['hariini']; - $kelmarin_Tunai=$LejerTunaiDitangan[0]['kelmarin']; - $jumlah_Tunai=$LejerTunaiDitangan[0]['jumlah']; - $debit_Tunai=$LejerTunaiDitangan[0]['debit']; - $recno_Tunai=$LejerTunaiDitangan[0]['recno']; - $kredit_Tunai=$LejerTunaiDitangan[0]['kredit']; - - $kredit_Tunai=$kredit_Tunai+$request->bayaran; - $hariini_Tunai=$debit_Tunai-$kredit_Tunai; - $kelmarin_Tunai=$jumlah_Tunai-$hariini_Tunai; - - $update_TunaiDiTangan=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user->kodcaw,[ - 'recno'=>$recno_Tunai, - 'debit'=>$debit_Tunai, - 'kredit'=>$kredit_Tunai, - 'hariini'=>$hariini_Tunai, - 'kelmarin'=>$kelmarin_Tunai, - - ]); - } - }//end perbelanjaan Selanggara - - - - // lejer am panjar tamat... - - $updateVault = Http::put( config('api.url').'/api/UpdateVault/Panjar/'.$auth_user['cawangan'],[ 'totpanjar'=>$request->bayaran ]); @@ -2150,111 +885,7 @@ class KhazanahController extends Controller 'masuk' => $masuk, 'bakiakhir' => $bakiakhir ]); - - //************KIRAAN LEJER AM BERMULA ***/ - $pembiayaan_tawaruq='1000/017'; - $GL_Untung_Tangguh='1000/211'; - $GL_Untung_Suspense='2000/007'; - - $getProduct=Http::get(config('api.url').'/api/getProduct/'.$auth_user['cawangan'])->json(); - $glcode=$getProduct[0]['glcode']; - $kodGL=$getProduct[0]['kodgl']; - $get_GLCode=Http::get(config('api.url').'/api/getGlCode/'.$auth_user['cawangan'],['glcode'=>$glcode])->json(); - $keterangan=$get_GLCode[0]['descpt']; - $acctype=$get_GLCode[0]['acttype']; - - - $get_lejer=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$glcode])->json(); - if(sizeof($get_lejer)>0) - { - $hariIni=$get_lejer[0]['hariini']; - $jumlah=$get_lejer[0]['kelmarin']; - $kredit=$get_lejer[0]['kredit']; - $debit=$get_lejer[0]['debit']; - $recno=$get_lejer[0]['recno']; - - $kredit=$kredit+$gadai_detail['pinjaman']; - $Hari_Ini=$debit-$kredit; - $Kelmarin=$jumlah-$Hari_Ini; - - $updateGlejer=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno, - 'debit'=>$debit, - 'kredit'=>$kredit, - 'hariini'=>$Hari_Ini, - 'kelmarin'=>$Kelmarin, - ]); - - } - else - { - - } - - $get_lejerPinj=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$pembiayaan_tawaruq])->json(); - $hariIni=$get_lejerPinj[0]['hariini']; - $Kelmarin=$get_lejerPinj[0]['kelmarin']; - $jumlah=$get_lejerPinj[0]['jumlah']; - $kredit=$get_lejerPinj[0]['kredit']; - $debit=$get_lejerPinj[0]['debit']; - $recno=$get_lejerPinj[0]['recno']; - - $debit=$debit+$gadai_detail['pinjaman']; - $hariIni=$debit-$kredit; - $Kelmarin=$jumlah-$hariIni; - - $updateGlejer=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno, - 'kredit'=>$kredit, - 'debit'=>$debit, - 'hariini'=>$hariIni, - 'kelmarin' =>$Kelmarin, - - ]); - - $get_lejerPinj2=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$GL_Untung_Tangguh])->json(); - $hariIni_UT=$get_lejerPinj2[0]['hariini']; - $kelmarin_UT=$get_lejerPinj2[0]['kelmarin']; - $jumlah_UT=$get_lejerPinj2[0]['jumlah']; - $kredit_UT=$get_lejerPinj2[0]['kredit']; - $debit_UT=$get_lejerPinj2[0]['debit']; - $recno_UT=$get_lejerPinj2[0]['recno']; - - $debit_UT=$debit_UT+$upah12; - $hariIni_UT=$debit_UT-$kredit_UT; - $kelmarin_UT=$jumlah_UT-$hariIni_UT; - - $updateGlejer_UT=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_UT, - 'kredit'=>$kredit_UT, - 'debit'=>$debit_UT, - 'hariini'=>$hariIni_UT, - 'kelmarin' =>$kelmarin_UT, - - ]); - $get_lejerPinj3=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$GL_Untung_Suspense])->json(); - $hari_ini_US=$get_lejerPinj3[0]['hariini']; - $kelmarin_US=$get_lejerPinj3[0]['kelmarin']; - $jumlah_US=$get_lejerPinj3[0]['jumlah']; - $kredit_US=$get_lejerPinj3[0]['kredit']; - $debit_US=$get_lejerPinj3[0]['debit']; - $recno_US=$get_lejerPinj3[0]['recno']; - - $kredit_US=$kredit_US+$upah12; - $hari_ini_US=$debit_US-$kredit_US; - $kelmarin_US=$jumlah_US-$hari_ini_US; - - $updateGlejer_US=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno_US, - 'kredit'=>$kredit_US, - 'debit'=>$debit_US, - 'hariini'=>$hari_ini_US, - 'kelmarin' =>$kelmarin_US, - - ]); - - //********TAMAT****************/ event(new NotifikasiPembayaran('TellerkepadaKhazanah')); return redirect()->route('khazanah.gadaian'); From fbd060b36f7ac3fbbab678a2734c89c2bacabf09 Mon Sep 17 00:00:00 2001 From: fifi97 Date: Tue, 29 Jun 2021 10:09:33 +0800 Subject: [PATCH 04/27] biasa --- app/Http/Controllers/KhazanahController.php | 288 ++++++++---------- .../khazanah/laporan/datalejer_am.blade.php | 30 +- .../views/khazanah/laporan/index.blade.php | 2 +- .../views/print/laporan_lejer_am.blade.php | 23 +- 4 files changed, 137 insertions(+), 206 deletions(-) diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index 07abd1c..da029fc 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -2389,7 +2389,9 @@ class KhazanahController extends Controller $upahsimpanxtra = $xtra['upahsimpan']; $bakilelongxtra = $xtra['bakilelong']; $utgterkumpulxtra = $xtra['untungrugiterkumpul']; - $rugilelongxtra = -($xtra['kerugianlelong']); + $rugilelongxtra = -($xtra['kerugianlelong']); + $peruntukanhapuskira = ($xtra['phapuskira']); + } //Terkumpul @@ -2409,6 +2411,7 @@ class KhazanahController extends Controller if($pinjamandiberi['pinjamankoop'] > 0) array_push($hartasemasa,['glcode' => '1000/013','descpt' => 'Pinjaman Diberi - Koop PKB', 'amaun' => $pinjamandiberi['pinjamankoop']]); if($pinjamandiberi['emaspalsu'] > 0) array_push($hartasemasa,['glcode' => '1000/014','descpt' => 'Pinjaman Diberi - Emas Palsu / Kes', 'amaun' => $pinjamandiberi['emaspalsu']]); if($imbangduga['pindahkekpkb'] > 0) array_push($hartasemasa,['glcode' => '1000/090','descpt' => 'Pindah Ke KPKB(IP)', 'amaun' => $imbangduga['pindahkekpkb']]); + if($peruntukanhapuskira > 0) array_push($hartasemasa,['glcode' => '1000/015','descpt' => 'Peruntukan Hapus Kira', 'amaun' => $peruntukanhapuskira]); if($belian1stop > 0) array_push($hartasemasa,['glcode' => '8000/501','descpt' => 'Belian 1 Stop', 'amaun' => $belian1stop]); $totalhartasemasa = 0; @@ -2476,184 +2479,153 @@ class KhazanahController extends Controller public function cetak_lejer_am(Request $request) { - //new glcode 2021-02-22 - $GL_Code_BayaranOnline="1000/210"; - $GL_CodeUntungSebenar="1000/213"; - $GL_CodeHutangArrahn="1000/211"; - $GL_CodeHutangAkru="2000/007"; + //new glcode 2021-02-22 + $GL_Code_BayaranOnline="1000/210"; + $GL_CodeUntungSebenar="1000/213"; + $GL_CodeHutangArrahn="1000/211"; + $GL_CodeHutangAkru="2000/007"; - $auth_user = Auth::user(); - $api_url = config('api.url'); + $auth_user = Auth::user(); + $api_url = config('api.url'); - // dd($tarikh_aging); - $num=$request->num; - $current = Carbon::now(); - $current = new Carbon(); + $num=$request->num; + $current = Carbon::now(); + $current = new Carbon(); + $tarikh_cetak = $current->toDateString(); + + if($request->datetimepicker1 == null){ $tarikh_cetak = $current->toDateString(); - - if($request->datetimepicker1 == null){ - $tarikh_cetak = $current->toDateString(); - }else - { + }else { $split_date = explode('-',$request->datetimepicker1); $tarikh_mula = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0]; - } + } - if($request->datetimepicker2 == null) - { + if($request->datetimepicker2 == null){ $tarikh_cetak = $current->toDateString(); - - } - else - { + } + else{ $split_date = explode('-',$request->datetimepicker2); $tarikh_akhir = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0]; - } + } - //KIRAAN UNTUK LEJER_AM BAYARAN ONLINE & TRANSAKSI BAYARAN UPAH + //Calculation Imbang Duga + $imbangduga = Http::get(config('api.url').'/api/CalculationPendahuluanSerahanLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + + $keuntungan = Http::get(config('api.url').'/api/KeuntunganArRahnLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $rebet = Http::get(config('api.url').'/api/RebetCalculationLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); - $getProduct=Http::get(config('api.url').'/api/getProduct/'.$auth_user['cawangan'])->json(); - $glcode=$getProduct[0]['glcode']; - $kodGL=$getProduct[0]['kodgl']; - $glcode_UP=$getProduct[0]['glcode_up']; + //Harta semasa + $pinjamandiberi = Http::get(config('api.url').'/api/PinjamanDiberiLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $pembiayaantawarruq = Http::get(config('api.url').'/api/PembiayaanDiberiTawarruqLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $tunaiditangan = Http::get(config('api.url').'/api/TunaiDiTanganLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $penghutangkaki = Http::get(config('api.url').'/api/PenghutangKakitanganLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $untungrugi = Http::get(config('api.url').'/api/UntungRugiCalculationLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $bayaranpendahuluan = Http::get(config('api.url').'/api/BayaranPendahuluanLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); - $get_GLCode=Http::get(config('api.url').'/api/getGlCode/'.$auth_user['cawangan'],['glcode'=>$kodGL])->json(); + //Tanggungan Semasa + $panjar = Http::get(config('api.url').'/api/CalculationPanjarLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $bakilelong = Http::get(config('api.url').'/api/BakiLelongCalculationLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $wtd = Http::get(config('api.url').'/api/SerahBakiLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $cajlelong = Http::get(config('api.url').'/api/cajlelongLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $keuntungansebenar = Http::get(config('api.url').'/api/KeuntunganSebenarLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $cajperkhidmatan = Http::get(config('api.url').'/api/cajperkhidmatanterkumpulLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $hapuskira = Http::get(config('api.url').'/api/CalculationHapusKiraLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $xtra = Http::get(config('api.url').'/api/XtraLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + + //TunaiDitangan Sementara Upah + if($tarikh_imbangan2 >= '2021-04-22' && $tarikh_imbangan2 < '2021-05-05') + { + $advansurharini = Http::get(config('api.url').'/api/advansurhariniLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $totaltunaiditangan = floatval($tunaiditangan) - floatval($advansurharini); + }else{ + $totaltunaiditangan = $tunaiditangan; + } - $keterangan=$get_GLCode[0]['descpt']; - $acctype=$get_GLCode[0]['acttype']; + $jualan1stop = 0;$belian1stop = 0;$utgterkumpulxtra = 0;$rugilelongxtra = 0;$bakilelongxtra = 0;$cajlelongxtra = 0;$upahsimpanxtra = 0; + //1Stop Special Case + if($auth_user['cawangan'] === '1STOP') + { + $jualan1stop = floatval(129857.00); + $belian1stop = floatval(122446.50); + $utgterkumpulxtra = floatval(6727.10); + $rugilelongxtra = floatval(10079.30); + $bakilelongxtra = floatval(123.20); + $cajlelongxtra = floatval(25.50); + $upahsimpanxtra = floatval(4894.40); + + }else{ + $upahsimpanxtra = $xtra['upahsimpan']; + $bakilelongxtra = $xtra['bakilelong']; + $utgterkumpulxtra = $xtra['untungrugiterkumpul']; + $rugilelongxtra = -($xtra['kerugianlelong']); + $peruntukanhapuskira = ($xtra['phapuskira']); + } - $total_bayaranOnline=0.0; + //Terkumpul + $untungrugiterkumpul = Http::get(config('api.url'). '/api/UntungRugiTerkumpulLejer/'. $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $hartasemasa = []; + // $hartasemasa = ['serahan' => $imbangduga['serahan'],'pinjamankoop' => $pinjamandiberi['pinjamankoop'],'emaspalsu' => $pinjamandiberi['emaspalsu'],'tunaiditangan' => $tunaiditangan['bakiakhir']]; + + if($totaltunaiditangan > 0) array_push($hartasemasa,['glcode' => '1000/010','descpt' => 'Tunai Di Tangan', 'amaun' => $totaltunaiditangan]); + if($pembiayaantawarruq > 0) array_push($hartasemasa,['glcode' => '1000/010','descpt' => 'Pembiayaan Di Bawah Tawarruq', 'amaun' => $pembiayaantawarruq]); + if($penghutangkaki > 0) array_push($hartasemasa,['glcode' => '1000/011','descpt' => 'Penghutang Kakitangan', 'amaun' => $penghutangkaki]); + //array_push($hartasemasa,['glcode' => '1000/045','descpt' => 'Serahan Bayaran Online', 'amaun' => 0.00]); + if($keuntungan > 0) array_push($hartasemasa,['glcode' => '1000/211','descpt' => 'Keuntungan Tertangguh', 'amaun' => $keuntungan]); + if($bayaranpendahuluan > 0) array_push($hartasemasa,['glcode' => '5000/041','descpt' => 'Bayaran Pendahuluan','amaun' => ($bayaranpendahuluan * -1)]); + if($rebet > 0) array_push($hartasemasa,['glcode' => '5000/241','descpt' => 'Rebet','amaun' => ($rebet * -1)]); + if($imbangduga['serahan'] > 0) array_push($hartasemasa,['glcode' => '1000/020','descpt' => 'Serahan Kepada HQ', 'amaun' => $imbangduga['serahan']]); + if($pinjamandiberi['pinjamankoop'] > 0) array_push($hartasemasa,['glcode' => '1000/013','descpt' => 'Pinjaman Diberi - Koop PKB', 'amaun' => $pinjamandiberi['pinjamankoop']]); + if($pinjamandiberi['emaspalsu'] > 0) array_push($hartasemasa,['glcode' => '1000/014','descpt' => 'Pinjaman Diberi - Emas Palsu / Kes', 'amaun' => $pinjamandiberi['emaspalsu']]); + if($imbangduga['pindahkekpkb'] > 0) array_push($hartasemasa,['glcode' => '1000/090','descpt' => 'Pindah Ke KPKB(IP)', 'amaun' => $imbangduga['pindahkekpkb']]); + if($peruntukanhapuskira > 0) array_push($hartasemasa,['glcode' => '1000/015','descpt' => 'Peruntukan Hapus Kira', 'amaun' => $peruntukanhapuskira]); + if($belian1stop > 0) array_push($hartasemasa,['glcode' => '8000/501','descpt' => 'Belian 1 Stop', 'amaun' => $belian1stop]); + + $totalhartasemasa = 0; + foreach($hartasemasa as $index => $hs) + { + $totalhartasemasa += $hs['amaun']; + } + + $tanggungansemasa = []; - // $getTotalBayaranOnline=Http::get(config('api.url').'/api/ansuranByrOnline/'.$auth_user['cawangan'])->json(); - // if(sizeof($getTotalBayaranOnline)!=0) - // { + // $tanggungansemasa = ['pendahuluan' => $imbangduga['pendahuluan'],'bds' => $panjar['bds'],'perubatan' => $panjar['perubatan'],'keraian' => $panjar['keraian'],'bakilelong' => $bakilelong['bakilelong'],'rugilelong' => $bakilelong['rugilelong'],'wtd' => $wtd,'cajlelong' => $cajlelong]; - // $total_bayaranOnline=$getTotalBayaranOnline[0]['cash_in']; + if($keuntungan > 0) array_push($tanggungansemasa,['glcode' => '2000/007','descpt' => 'Keuntungan Tergantung', 'amaun' => $keuntungan]); + if($keuntungansebenar > 0) array_push($tanggungansemasa,['glcode' => '5000/013','descpt' => 'Upah Simpan','amaun' => $keuntungansebenar]); + if($rebet > 0) array_push($tanggungansemasa,['glcode' => '5000/241','descpt' => 'Rebet','amaun' => ($rebet * -1)]); + if($imbangduga['pendahuluan'] > 0) array_push($tanggungansemasa,['glcode' => '7000/102','descpt' => 'Pendahuluan Daripada HQ','amaun' => $imbangduga['pendahuluan']]); + if($panjar['bds'] > 0) array_push($tanggungansemasa,['glcode' => '3000/017','descpt' => 'PANJAR - Baiki dan Selenggara','amaun' => -$panjar['bds']]); + if($panjar['perubatan'] > 0) array_push($tanggungansemasa,['glcode' => '3000/018','descpt' => 'PANJAR - Belanja AM','amaun' => -$panjar['perubatan']]); + if($panjar['keraian'] > 0) array_push($tanggungansemasa,['glcode' => '3000/019','descpt' => 'PANJAR - Keraian Dan Promosi','amaun' => -$panjar['keraian']]); + if($bakilelong['bakilelong'] != 0) array_push($tanggungansemasa,['glcode' => '7000/090','descpt' => 'Baki Lelong','amaun' => $bakilelong['bakilelong']]); + if($bakilelong['rugilelong'] != 0) array_push($tanggungansemasa,['glcode' => '3000/020','descpt' => 'Kerugian Lelong','amaun' => $bakilelong['rugilelong']]); + if($wtd > 0) array_push($tanggungansemasa,['glcode' => '3000/021','descpt' => 'WANG TAK DITUNTUT','amaun' => $wtd]); + if($cajlelong > 0) array_push($tanggungansemasa,['glcode' => '5000/213','descpt' => 'Pendapatan Caj Lelong','amaun' => $cajlelong]); + if($untungrugiterkumpul > 0) array_push($tanggungansemasa,['glcode' => '7000/101','descpt' => 'Untung/Rugi Terkumpul','amaun' => $untungrugiterkumpul]); + if($cajperkhidmatan > 0) array_push($tanggungansemasa,['glcode' => '5000/213','descpt' => 'Caj Perkhidmatan Terkumpul','amaun' => $cajperkhidmatan]); + if($cajlelongxtra > 0) array_push($tanggungansemasa,['glcode' => '5000/313','descpt' => 'Pendapatan Caj Lelong Xtra ','amaun' => $cajlelongxtra]); + if($upahsimpanxtra > 0) array_push($tanggungansemasa,['glcode' => '5000/413','descpt' => 'Upah Simpan Xtra - Koperasi PKB','amaun' => $upahsimpanxtra]); + if($bakilelongxtra > 0) array_push($tanggungansemasa,['glcode' => '7000/190','descpt' => 'Baki Lelong Xtra','amaun' => $bakilelongxtra]); + if($rugilelongxtra != 0) array_push($tanggungansemasa,['glcode' => '7000/191','descpt' => 'Rugi Lelong Xtra','amaun' => -$rugilelongxtra]); + if($utgterkumpulxtra > 0) array_push($tanggungansemasa,['glcode' => '7000/201','descpt' => 'Untung/Rugi Terkumpul Xtra','amaun' => $utgterkumpulxtra]); + if($jualan1stop > 0) array_push($tanggungansemasa,['glcode' => '9000/501','descpt' => 'Jualan 1 Stop','amaun' => $jualan1stop]); + if($hapuskira > 0) array_push($tanggungansemasa,['glcode' => '3000/011','descpt' => 'Hapus Kira','amaun' => -$hapuskira]); + + $totaltanggungansemasa = 0; + foreach($tanggungansemasa as $index => $ts) + { + $totaltanggungansemasa += $ts['amaun']; + } - // } - // else - // { - - // } - - //START UNTUK GLEJER - - //carian_GLejer untuk Bayaran Online (Update Bayaran) - $getBayarOnline_GL=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$GL_Code_BayaranOnline])->json(); - $keteranganBayaranOnlie=$getBayarOnline_GL[0]['descpt']; //keterangan glcode - $actypeBayaranOnline=$getBayarOnline_GL[0]['acttype']; //keterangan acctype - - $get_current_GLejer_Details_BayaranOnline=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$GL_Code_BayaranOnline])->json(); - if(sizeof($get_current_GLejer_Details_BayaranOnline)==0) - { //start kalau xdak data - $jumlah=0.0; - - $getGLedjer=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$GL_Code_BayaranOnline])->json(); - - if(sizeof($getGLedjer)==0) - { - $jumlah=0.0; - } - else - { - - //$glejer=$getGLedjer[0]; - $jumlahSemalam=$getGLedjer[0]['jumlah']; - - $hariIniSemalam=$getGLedjer[0]['hariini']; - $jumlah=$jumlahSemalam+$hariIniSemalam; - - - } - - - - $jumlahBulan_ini=0.0; - $get_GlejerBulan_Tahun=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$GL_Code_BayaranOnline])->json(); - - if( sizeof($get_GlejerBulan_Tahun)==0) - { - $jumlahBulan_ini=0.0; - } - else - { - $jumlahBulan_ini=$get_GlejerBulan_Tahun[0]['jumlah']; - $jumlahBulan_ini=$jumlah-$jumlahBulan_ini; - }//end bulan tahun - $Jumlah_TahunIni=0.0; - $get_Glejer_Tahun=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$GL_Code_BayaranOnline])->json(); - if(sizeof($get_Glejer_Tahun)==0) - { - $Jumlah_TahunIni=0.0; - } - else - { - - - $JumTahunIni=$get_Glejer_Tahun[0]['jumlah']; - $Jumlah_TahunIni=$jumlah-$JumTahunIni; - - } - - $HariIni=0.0; - $kelmarin=$jumlah-$HariIni; - //insert glejer untuk current date /hari ini - $daftarGlejer=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[ - - 'kodcaw' =>$auth_user['cawangan'], - 'glcode' =>$GL_Code_BayaranOnline, - 'descpt' =>$keteranganBayaranOnlie, - 'debit'=>0.0, - 'kredit'=>0.0, - 'hariini'=>$HariIni, - 'kelmarin'=>$kelmarin, - 'jumlah'=>$jumlah, - 'bulanini'=>$jumlahBulan_ini, - 'tahunini'=>$Jumlah_TahunIni, - 'acttype'=> $actypeBayaranOnline - - ]); - - } - else - { - - $get_lejer=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$glcode])->json(); - - if(sizeof($get_lejer)>0) - { - $hariIni=$get_lejer[0]['hariini']; - $jumlah=$get_lejer[0]['kelmarin']; - $kredit=$get_lejer[0]['kredit']; - $debit=$get_lejer[0]['debit']; - $recno=$get_lejer[0]['recno']; - $kredit=$kredit+ $total_bayaranOnline; - $Hari_Ini=$debit-$kredit; - $Kelmarin=$jumlah-$Hari_Ini; - $updateGlejer=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[ - 'recno'=>$recno, - 'debit'=>$debit, - 'kredit'=>$kredit, - 'hariini'=>$Hari_Ini, - 'kelmarin'=>$Kelmarin, - ]); - - } - - $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); - $cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json(); - $cawangan_detail=$cawangan[0]; - $debit=Http::get(config('api.url').'/api/glejer/sumDebit/'.$tarikh_mula.'/'.$tarikh_akhir.'/'.$auth_user['cawangan'])->json(); - $kredit=Http::get(config('api.url').'/api/glejer/sumKredit/'.$tarikh_mula.'/'.$tarikh_akhir.'/'.$auth_user['cawangan'])->json(); - $data=Http::get(config('api.url').'/api/glejer/getdata/'.$tarikh_mula.'/'.$tarikh_akhir.'/'.$auth_user['cawangan'])->json(); - } - - //return view('print.laporan_imbanduga',compact('tarikh_imbangan','tarikh_cetak','cawangan_info','cawangan','api_url','cawangan_detail')); - return view( 'print.laporan_lejer_am',compact('cawangan','cawangan_info', 'api_url','cawangan_detail','tarikh_akhir','tarikh_mula','data','debit','kredit')); + $untungrugifield = []; + array_push($untungrugifield,['glcode' => '2000/007','descpt' => 'Keuntungan', 'amaun' => $untungrugi]); + $totaluntungrugi = 0; + $totaluntungrugi = $totaltanggungansemasa + $untungrugi; + return view('print.laporan_lejer_am',compact('cawangan','cawangan_info', 'api_url','cawangan_detail','tarikh_akhir','tarikh_mula','data','debit','kredit')); } public function laporan_tuntutbaki(Request $request) diff --git a/resources/views/khazanah/laporan/datalejer_am.blade.php b/resources/views/khazanah/laporan/datalejer_am.blade.php index 88de390..64e39ba 100644 --- a/resources/views/khazanah/laporan/datalejer_am.blade.php +++ b/resources/views/khazanah/laporan/datalejer_am.blade.php @@ -33,7 +33,7 @@
-
+
@@ -51,34 +51,6 @@
- - - - -
-
-
-
- - - - - - - - - - - -
BilBil GadaianJumlah Pinjaman (RM)Peratusan %
-
-
-
-
- Bilangan Surat : 3 - Jumlah Pinjaman : RM 3,000.00 -
-
diff --git a/resources/views/khazanah/laporan/index.blade.php b/resources/views/khazanah/laporan/index.blade.php index 7b8677c..e13ee97 100644 --- a/resources/views/khazanah/laporan/index.blade.php +++ b/resources/views/khazanah/laporan/index.blade.php @@ -61,7 +61,7 @@ Aging Pelanggan
- Lejer Am + Lejer Am
Tuntut Baki diff --git a/resources/views/print/laporan_lejer_am.blade.php b/resources/views/print/laporan_lejer_am.blade.php index 6ead757..220b8ea 100644 --- a/resources/views/print/laporan_lejer_am.blade.php +++ b/resources/views/print/laporan_lejer_am.blade.php @@ -334,7 +334,7 @@ KOD GL KETERANGAN DEBIT KREDITJUMLAH -@foreach($data as $index=>$var) +{{-- @foreach($data as $index=>$var) {{ $var['glcode']}}{{$var['descpt']}} {{$var['debit']}} {{$var['kredit']}} @@ -378,26 +378,13 @@ @endforeach + + + - - - - - - - - - - - - - - - - - + --}} From 0d4097aca2b9ae239b746f41e084d0cc2797340c Mon Sep 17 00:00:00 2001 From: Afiq Zakwan Date: Sun, 4 Jul 2021 01:04:44 +0800 Subject: [PATCH 05/27] tukar taraf --- app/Http/Controllers/Auth/LoginController.php | 16 +- app/Http/Controllers/HomeController.php | 5 +- app/Http/Controllers/KakitanganController.php | 49 +- app/Http/Controllers/OperasiController.php | 8 + composer.json | 1 + composer.lock | 1122 +++-------------- resources/views/homepage/admin/home.blade.php | 23 + resources/views/homepage/akaun/home.blade.php | 23 + resources/views/homepage/audit/home.blade.php | 23 + .../views/homepage/operasi/home.blade.php | 2 +- resources/views/layouts/app.blade.php | 2 +- resources/views/layouts/app_operasi.blade.php | 2 +- resources/views/not_assign.blade.php | 92 ++ .../views/operasi/daftar_kakitangan.blade.php | 50 + .../views/operasi/margin_pembiayaan.blade.php | 61 + resources/views/operasi/parameter.blade.php | 2 +- .../views/operasi/tukar_cawangan.blade.php | 101 ++ resources/views/operasi/tukar_taraf.blade.php | 84 ++ routes/web.php | 15 +- storage/debugbar/.gitignore | 2 + 20 files changed, 727 insertions(+), 956 deletions(-) create mode 100644 resources/views/homepage/admin/home.blade.php create mode 100644 resources/views/homepage/akaun/home.blade.php create mode 100644 resources/views/homepage/audit/home.blade.php create mode 100644 resources/views/not_assign.blade.php create mode 100644 resources/views/operasi/margin_pembiayaan.blade.php create mode 100644 resources/views/operasi/tukar_cawangan.blade.php create mode 100644 resources/views/operasi/tukar_taraf.blade.php create mode 100644 storage/debugbar/.gitignore diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 520fe74..b54f825 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -65,21 +65,27 @@ class LoginController extends Controller if($auth_user['roles'] == 'teller'){ if($auth_user['role_harian'] == 'teller'){ $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); - return view('homepage.'.$auth_user['role_harian'].'.home',compact('cawangan_info','api_url')); + // return view('homepage.'.$auth_user['role_harian'].'.home',compact('cawangan_info','api_url')); + return redirect()->route('home'); }elseif($auth_user['role_harian'] == 'penilai'){ $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); $gadaian_semasa = Http::get(config('api.url') . '/api/gadaiansemasa/'. $auth_user['cawangan'])->json(); $gadaian_belumserah = Http::get(config('api.url') . '/api/gadaiansemasa/belum_serah/'. $auth_user['cawangan'])->json(); - return view('homepage.'.$auth_user['role_harian'].'.home',compact('cawangan_info','gadaian_semasa','gadaian_belumserah','api_url')); + // return view('homepage.'.$auth_user['role_harian'].'.home',compact('cawangan_info','gadaian_semasa','gadaian_belumserah','api_url')); + return redirect()->route('home'); + }else{ + return view('not_assign'); } } elseif($auth_user['roles'] == 'pc' || $auth_user['roles'] == 'ppc'){ $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); - return view('homepage.khazanah.home',compact('cawangan_info','api_url')); + // return view('homepage.khazanah.home',compact('cawangan_info','api_url')); + return redirect()->route('home'); } - elseif($auth_user['roles'] == 'operasi'){ + else{ $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); - return view('homepage.'.$auth_user['roles'].'.home',compact('cawangan_info','api_url')); + // return view('homepage.'.$auth_user['roles'].'.home',compact('cawangan_info','api_url')); + return redirect()->route('home'); } } diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 6fd996c..4bf15b1 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -39,12 +39,15 @@ class HomeController extends Controller $gadaian_belumserah = Http::get(config('api.url') . '/api/gadaiansemasa/belum_serah/'. $auth_user['cawangan'])->json(); return view('homepage.'.$auth_user['role_harian'].'.home',compact('cawangan_info','gadaian_semasa','gadaian_belumserah','api_url')); } + else{ + return view('not_assign'); + } } elseif($auth_user['roles'] == 'pc' || $auth_user['roles'] == 'ppc'){ $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); return view('homepage.khazanah.home',compact('cawangan_info','api_url')); } - elseif($auth_user['roles'] == 'operasi'){ + else{ $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); return view('homepage.'.$auth_user['roles'].'.home',compact('cawangan_info','api_url')); } diff --git a/app/Http/Controllers/KakitanganController.php b/app/Http/Controllers/KakitanganController.php index de1c0f1..59781ed 100644 --- a/app/Http/Controllers/KakitanganController.php +++ b/app/Http/Controllers/KakitanganController.php @@ -22,7 +22,8 @@ class KakitanganController extends Controller $auth_user = Auth::user(); $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); $role = Role::get(); - return view('operasi.daftar_kakitangan',compact('cawangan_info','api_url','role')); + $kakitangan = User::all(); + return view('operasi.daftar_kakitangan',compact('cawangan_info','api_url','role','kakitangan')); } public function registerStaff(Request $request){ @@ -91,4 +92,50 @@ class KakitanganController extends Controller return redirect()->route('home'); } + + public function tukartaraf(Request $request){ + $api_url = config('api.url'); + $auth_user = Auth::user(); + $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); + $user = User::find($request->id); + $role = Role::get(); + return view('operasi.tukar_taraf',compact('cawangan_info','api_url','role','user')); + } + + public function tukartarafUpdate(Request $request){ + $user = User::find($request->user_id); + if($user->role_harian == null){ + if($user->role_asal == 'pc'){ + $user->roles = $request->role; + $user->save(); + } + }else{ + if($user->role_asal == 'pc'){ + $user->roles = $request->role; + $user->role_harian = $request->role; + $user->save(); + } + } + + return redirect()->route('daftar.kakitangan'); + } + + public function tukarcawangan(Request $request){ + $api_url = config('api.url'); + $auth_user = Auth::user(); + $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); + $user = User::find($request->id); + $role = Role::get(); + return view('operasi.tukar_cawangan',compact('cawangan_info','api_url','role','user')); + } + + public function tukarcawanganUpdate(Request $request){ + $user = User::find($request->user_id); + $user->cawangan = $request->cawangan; + $user->roles = $request->role; + $user->role_harian = $request->role; + $user->save(); + + return redirect()->route('daftar.kakitangan'); + } } diff --git a/app/Http/Controllers/OperasiController.php b/app/Http/Controllers/OperasiController.php index 73f1d57..c8d7496 100644 --- a/app/Http/Controllers/OperasiController.php +++ b/app/Http/Controllers/OperasiController.php @@ -185,4 +185,12 @@ class OperasiController extends Controller return view('operasi.hargaemas',compact('cawangan_info','api_url','harga_emas')); } + + public function margin(){ + $auth_user = Auth::user(); + $api_url = config('api.url'); + $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); + $margin_pembiayaan = Http::get(config('api.url') . '/api/maxpinjaman')->json(); + return view('operasi.margin_pembiayaan',compact('cawangan_info','api_url','margin_pembiayaan')); + } } diff --git a/composer.json b/composer.json index fbedd0b..b89b9d7 100644 --- a/composer.json +++ b/composer.json @@ -27,6 +27,7 @@ "yajra/laravel-datatables-oracle": "^9.11" }, "require-dev": { + "barryvdh/laravel-debugbar": "^3.6", "facade/ignition": "^2.0", "fzaninotto/faker": "^1.9.1", "mockery/mockery": "^1.3.1", diff --git a/composer.lock b/composer.lock index 020bb29..5ab0018 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4f26944f77caea167bb120f5fe970820", + "content-hash": "bfd66ab0246126c4f2cc7bbeeacca4ec", "packages": [ { "name": "almasaeed2010/adminlte", @@ -43,10 +43,6 @@ "theme", "web" ], - "support": { - "issues": "https://github.com/ColorlibHQ/AdminLTE/issues", - "source": "https://github.com/ColorlibHQ/AdminLTE/tree/v3.0.5" - }, "time": "2020-05-19T20:41:11+00:00" }, { @@ -216,12 +212,6 @@ "issues": "https://github.com/barryvdh/laravel-dompdf/issues", "source": "https://github.com/barryvdh/laravel-dompdf/tree/master" }, - "funding": [ - { - "url": "https://github.com/barryvdh", - "type": "github" - } - ], "time": "2020-09-07T11:50:18+00:00" }, { @@ -268,16 +258,6 @@ "brick", "math" ], - "support": { - "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/master" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/brick/math", - "type": "tidelift" - } - ], "time": "2020-08-18T23:57:15+00:00" }, { @@ -358,10 +338,6 @@ "MIT" ], "description": "implementation of xdg base directory specification for php", - "support": { - "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", - "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" - }, "time": "2019-12-04T15:06:13+00:00" }, { @@ -439,24 +415,6 @@ "uppercase", "words" ], - "support": { - "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.x" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", - "type": "tidelift" - } - ], "time": "2020-05-29T15:13:26+00:00" }, { @@ -519,24 +477,6 @@ "parser", "php" ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], "time": "2020-05-25T17:44:05+00:00" }, { @@ -667,12 +607,6 @@ "issues": "https://github.com/dragonmantank/cron-expression/issues", "source": "https://github.com/dragonmantank/cron-expression/tree/v2.3.1" }, - "funding": [ - { - "url": "https://github.com/dragonmantank", - "type": "github" - } - ], "time": "2020-10-13T00:52:37+00:00" }, { @@ -735,12 +669,6 @@ "issues": "https://github.com/egulias/EmailValidator/issues", "source": "https://github.com/egulias/EmailValidator/tree/2.1.24" }, - "funding": [ - { - "url": "https://github.com/egulias", - "type": "github" - } - ], "time": "2020-11-14T15:56:27+00:00" }, { @@ -870,12 +798,6 @@ "issues": "https://github.com/fruitcake/laravel-cors/issues", "source": "https://github.com/fruitcake/laravel-cors/tree/v2.0.3" }, - "funding": [ - { - "url": "https://github.com/barryvdh", - "type": "github" - } - ], "time": "2020-10-22T13:57:20+00:00" }, { @@ -943,10 +865,6 @@ "rest", "web service" ], - "support": { - "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/6.5" - }, "time": "2020-06-16T21:01:06+00:00" }, { @@ -998,10 +916,6 @@ "keywords": [ "promise" ], - "support": { - "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.4.0" - }, "time": "2020-09-30T07:37:28+00:00" }, { @@ -1073,10 +987,6 @@ "uri", "url" ], - "support": { - "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.7.0" - }, "time": "2020-09-30T07:37:11+00:00" }, { @@ -1147,10 +1057,6 @@ "thumbnail", "watermark" ], - "support": { - "issues": "https://github.com/Intervention/image/issues", - "source": "https://github.com/Intervention/image/tree/master" - }, "time": "2019-11-02T09:15:47+00:00" }, { @@ -1206,10 +1112,6 @@ "administrator", "laravel" ], - "support": { - "issues": "https://github.com/jeroennoten/Laravel-AdminLTE/issues", - "source": "https://github.com/jeroennoten/Laravel-AdminLTE/tree/v3.5.0" - }, "time": "2020-09-26T21:28:24+00:00" }, { @@ -1570,32 +1472,6 @@ "rss": "https://github.com/thephpleague/commonmark/releases.atom", "source": "https://github.com/thephpleague/commonmark" }, - "funding": [ - { - "url": "https://enjoy.gitstore.app/repositories/thephpleague/commonmark", - "type": "custom" - }, - { - "url": "https://www.colinodell.com/sponsor", - "type": "custom" - }, - { - "url": "https://www.paypal.me/colinpodell/10.00", - "type": "custom" - }, - { - "url": "https://github.com/colinodell", - "type": "github" - }, - { - "url": "https://www.patreon.com/colinodell", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/league/commonmark", - "type": "tidelift" - } - ], "time": "2020-10-31T13:49:32+00:00" }, { @@ -1681,16 +1557,6 @@ "sftp", "storage" ], - "support": { - "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/1.x" - }, - "funding": [ - { - "url": "https://offset.earth/frankdejonge", - "type": "other" - } - ], "time": "2020-08-23T07:39:11+00:00" }, { @@ -1801,16 +1667,6 @@ "issues": "https://github.com/thephpleague/mime-type-detection/issues", "source": "https://github.com/thephpleague/mime-type-detection/tree/1.5.1" }, - "funding": [ - { - "url": "https://github.com/frankdejonge", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/league/flysystem", - "type": "tidelift" - } - ], "time": "2020-10-18T11:50:25+00:00" }, { @@ -1872,16 +1728,6 @@ "stream", "zip" ], - "support": { - "issues": "https://github.com/maennchen/ZipStream-PHP/issues", - "source": "https://github.com/maennchen/ZipStream-PHP/tree/master" - }, - "funding": [ - { - "url": "https://opencollective.com/zipstream", - "type": "open_collective" - } - ], "time": "2020-05-30T13:11:16+00:00" }, { @@ -1946,15 +1792,6 @@ "issues": "https://github.com/milon/barcode/issues", "source": "https://github.com/milon/barcode/tree/7.0.1" }, - "funding": [ - { - "type": "custom" - }, - { - "url": "https://github.com/milon", - "type": "github" - } - ], "time": "2020-08-26T18:58:46+00:00" }, { @@ -2036,20 +1873,6 @@ "logging", "psr-3" ], - "support": { - "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.1.1" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], "time": "2020-07-23T08:41:23+00:00" }, { @@ -2100,16 +1923,6 @@ "issues": "https://github.com/myclabs/php-enum/issues", "source": "https://github.com/myclabs/php-enum/tree/1.7.7" }, - "funding": [ - { - "url": "https://github.com/mnapoli", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum", - "type": "tidelift" - } - ], "time": "2020-11-14T18:14:52+00:00" }, { @@ -2193,16 +2006,6 @@ "issues": "https://github.com/briannesbitt/Carbon/issues", "source": "https://github.com/briannesbitt/Carbon" }, - "funding": [ - { - "url": "https://opencollective.com/Carbon", - "type": "open_collective" - }, - { - "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", - "type": "tidelift" - } - ], "time": "2020-11-28T14:25:28+00:00" }, { @@ -2362,10 +2165,6 @@ } ], "description": "A PHP-Wrapper around the Ghostscript-CLI", - "support": { - "issues": "https://github.com/heiglandreas/Org_Heigl_Ghostscript/issues", - "source": "https://github.com/heiglandreas/Org_Heigl_Ghostscript/tree/2.3.2" - }, "time": "2020-09-23T05:00:00+00:00" }, { @@ -2642,20 +2441,6 @@ "php", "type" ], - "support": { - "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.7.5" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", - "type": "tidelift" - } - ], "time": "2020-07-20T17:29:33+00:00" }, { @@ -2729,12 +2514,6 @@ "issues": "https://github.com/predis/predis/issues", "source": "https://github.com/predis/predis/tree/v1.1.6" }, - "funding": [ - { - "url": "https://github.com/sponsors/tillkruss", - "type": "github" - } - ], "time": "2020-09-11T19:18:05+00:00" }, { @@ -2784,10 +2563,6 @@ "container-interop", "psr" ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/master" - }, "time": "2017-02-14T16:28:37+00:00" }, { @@ -2834,10 +2609,6 @@ "psr", "psr-14" ], - "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" - }, "time": "2019-01-08T18:20:26+00:00" }, { @@ -2888,9 +2659,6 @@ "request", "response" ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/master" - }, "time": "2016-08-06T14:39:51+00:00" }, { @@ -2938,9 +2706,6 @@ "psr", "psr-3" ], - "support": { - "source": "https://github.com/php-fig/log/tree/1.1.3" - }, "time": "2020-03-23T09:12:05+00:00" }, { @@ -2989,9 +2754,6 @@ "psr-16", "simple-cache" ], - "support": { - "source": "https://github.com/php-fig/simple-cache/tree/master" - }, "time": "2017-10-23T01:57:42+00:00" }, { @@ -3166,10 +2928,6 @@ } ], "description": "A polyfill for getallheaders.", - "support": { - "issues": "https://github.com/ralouphie/getallheaders/issues", - "source": "https://github.com/ralouphie/getallheaders/tree/develop" - }, "time": "2019-03-08T08:55:37+00:00" }, { @@ -3233,16 +2991,6 @@ "queue", "set" ], - "support": { - "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/1.1.1" - }, - "funding": [ - { - "url": "https://github.com/ramsey", - "type": "github" - } - ], "time": "2020-09-10T20:58:17+00:00" }, { @@ -3324,17 +3072,6 @@ "identifier", "uuid" ], - "support": { - "issues": "https://github.com/ramsey/uuid/issues", - "rss": "https://github.com/ramsey/uuid/releases.atom", - "source": "https://github.com/ramsey/uuid" - }, - "funding": [ - { - "url": "https://github.com/ramsey", - "type": "github" - } - ], "time": "2020-08-18T17:17:46+00:00" }, { @@ -3572,16 +3309,6 @@ "issues": "https://github.com/spatie/image/issues", "source": "https://github.com/spatie/image/tree/1.10.1" }, - "funding": [ - { - "url": "https://spatie.be/open-source/support-us", - "type": "custom" - }, - { - "url": "https://github.com/spatie", - "type": "github" - } - ], "time": "2020-12-01T20:42:11+00:00" }, { @@ -3726,16 +3453,6 @@ "issues": "https://github.com/spatie/laravel-medialibrary/issues", "source": "https://github.com/spatie/laravel-medialibrary/tree/7.19.5" }, - "funding": [ - { - "url": "https://spatie.be/open-source/support-us", - "type": "custom" - }, - { - "url": "https://github.com/spatie", - "type": "github" - } - ], "time": "2020-11-04T21:08:45+00:00" }, { @@ -3787,10 +3504,6 @@ "pdf-to-image", "spatie" ], - "support": { - "issues": "https://github.com/spatie/pdf-to-image/issues", - "source": "https://github.com/spatie/pdf-to-image/tree/v2" - }, "time": "2017-06-20T05:58:45+00:00" }, { @@ -3907,16 +3620,6 @@ "issues": "https://github.com/swiftmailer/swiftmailer/issues", "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.4" }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/swiftmailer/swiftmailer", - "type": "tidelift" - } - ], "time": "2020-12-08T18:02:06+00:00" }, { @@ -4000,20 +3703,6 @@ "support": { "source": "https://github.com/symfony/console/tree/v5.2.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-11-28T11:24:18+00:00" }, { @@ -4065,20 +3754,6 @@ "support": { "source": "https://github.com/symfony/css-selector/tree/v5.2.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-10-28T21:31:18+00:00" }, { @@ -4129,23 +3804,6 @@ ], "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/master" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-09-07T11:33:47+00:00" }, { @@ -4201,20 +3859,6 @@ "support": { "source": "https://github.com/symfony/error-handler/tree/v5.2.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-10-28T21:46:03+00:00" }, { @@ -4286,20 +3930,6 @@ "support": { "source": "https://github.com/symfony/event-dispatcher/tree/v5.2.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-11-01T16:14:45+00:00" }, { @@ -4362,23 +3992,6 @@ "interoperability", "standards" ], - "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-09-07T11:33:47+00:00" }, { @@ -4426,20 +4039,6 @@ "support": { "source": "https://github.com/symfony/finder/tree/v5.2.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-11-18T09:42:36+00:00" }, { @@ -4505,20 +4104,6 @@ "support": { "source": "https://github.com/symfony/http-client-contracts/tree/v2.3.1" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-10-14T17:08:19+00:00" }, { @@ -4578,20 +4163,6 @@ "support": { "source": "https://github.com/symfony/http-foundation/tree/v5.2.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-11-27T06:13:25+00:00" }, { @@ -4690,20 +4261,6 @@ "support": { "source": "https://github.com/symfony/http-kernel/tree/v5.2.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-11-30T05:54:18+00:00" }, { @@ -4770,20 +4327,6 @@ "support": { "source": "https://github.com/symfony/mime/tree/v5.2.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-10-30T14:55:39+00:00" }, { @@ -4849,20 +4392,6 @@ "support": { "source": "https://github.com/symfony/polyfill-ctype/tree/v1.20.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-10-23T14:02:19+00:00" }, { @@ -4929,20 +4458,6 @@ "support": { "source": "https://github.com/symfony/polyfill-iconv/tree/v1.20.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-10-23T14:02:19+00:00" }, { @@ -5010,20 +4525,6 @@ "support": { "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.20.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-10-23T14:02:19+00:00" }, { @@ -5097,20 +4598,6 @@ "support": { "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.20.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-10-23T14:02:19+00:00" }, { @@ -5181,20 +4668,6 @@ "support": { "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.20.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-10-23T14:02:19+00:00" }, { @@ -5261,20 +4734,6 @@ "support": { "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.20.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-10-23T14:02:19+00:00" }, { @@ -5337,20 +4796,6 @@ "support": { "source": "https://github.com/symfony/polyfill-php72/tree/v1.20.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-10-23T14:02:19+00:00" }, { @@ -5416,20 +4861,6 @@ "support": { "source": "https://github.com/symfony/polyfill-php73/tree/v1.20.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-10-23T14:02:19+00:00" }, { @@ -5499,20 +4930,6 @@ "support": { "source": "https://github.com/symfony/polyfill-php80/tree/v1.20.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-10-23T14:02:19+00:00" }, { @@ -5561,20 +4978,6 @@ "support": { "source": "https://github.com/symfony/process/tree/v5.2.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-11-02T15:47:15+00:00" }, { @@ -5651,20 +5054,6 @@ "support": { "source": "https://github.com/symfony/routing/tree/v5.2.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-11-27T00:39:34+00:00" }, { @@ -5727,23 +5116,6 @@ "interoperability", "standards" ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/master" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-09-07T11:33:47+00:00" }, { @@ -5813,20 +5185,6 @@ "support": { "source": "https://github.com/symfony/string/tree/v5.2.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-10-24T12:08:07+00:00" }, { @@ -5906,20 +5264,6 @@ "support": { "source": "https://github.com/symfony/translation/tree/v5.2.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-11-28T11:24:18+00:00" }, { @@ -5981,23 +5325,6 @@ "interoperability", "standards" ], - "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v2.3.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-09-28T13:05:58+00:00" }, { @@ -6072,20 +5399,6 @@ "support": { "source": "https://github.com/symfony/var-dumper/tree/v5.2.0" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-11-27T00:39:34+00:00" }, { @@ -6135,10 +5448,6 @@ ], "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", - "support": { - "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", - "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.3" - }, "time": "2020-07-13T06:12:54+00:00" }, { @@ -6257,20 +5566,6 @@ "env", "environment" ], - "support": { - "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/4.1" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", - "type": "tidelift" - } - ], "time": "2020-07-14T19:22:52+00:00" }, { @@ -6323,28 +5618,6 @@ "issues": "https://github.com/voku/portable-ascii/issues", "source": "https://github.com/voku/portable-ascii/tree/1.5.6" }, - "funding": [ - { - "url": "https://www.paypal.me/moelleken", - "type": "custom" - }, - { - "url": "https://github.com/voku", - "type": "github" - }, - { - "url": "https://opencollective.com/portable-ascii", - "type": "open_collective" - }, - { - "url": "https://www.patreon.com/voku", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii", - "type": "tidelift" - } - ], "time": "2020-11-12T00:07:28+00:00" }, { @@ -6420,20 +5693,81 @@ "issues": "https://github.com/yajra/laravel-datatables/issues", "source": "https://github.com/yajra/laravel-datatables/tree/v9.15.2" }, - "funding": [ - { - "url": "https://www.paypal.me/yajra", - "type": "custom" - }, - { - "url": "https://www.patreon.com/yajra", - "type": "patreon" - } - ], "time": "2020-12-09T15:42:04+00:00" } ], "packages-dev": [ + { + "name": "barryvdh/laravel-debugbar", + "version": "v3.6.2", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-debugbar.git", + "reference": "70b89754913fd89fef16d0170a91dbc2a5cd633a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/70b89754913fd89fef16d0170a91dbc2a5cd633a", + "reference": "70b89754913fd89fef16d0170a91dbc2a5cd633a", + "shasum": "" + }, + "require": { + "illuminate/routing": "^6|^7|^8", + "illuminate/session": "^6|^7|^8", + "illuminate/support": "^6|^7|^8", + "maximebf/debugbar": "^1.16.3", + "php": ">=7.2", + "symfony/debug": "^4.3|^5", + "symfony/finder": "^4.3|^5" + }, + "require-dev": { + "mockery/mockery": "^1.3.3", + "orchestra/testbench-dusk": "^4|^5|^6", + "phpunit/phpunit": "^8.5|^9.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.5-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\Debugbar\\ServiceProvider" + ], + "aliases": { + "Debugbar": "Barryvdh\\Debugbar\\Facade" + } + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\Debugbar\\": "src/" + }, + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "PHP Debugbar integration for Laravel", + "keywords": [ + "debug", + "debugbar", + "laravel", + "profiler", + "webprofiler" + ], + "time": "2021-06-14T14:29:26+00:00" + }, { "name": "doctrine/instantiator", "version": "1.4.0", @@ -6487,20 +5821,6 @@ "issues": "https://github.com/doctrine/instantiator/issues", "source": "https://github.com/doctrine/instantiator/tree/1.4.0" }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], "time": "2020-11-10T18:47:58+00:00" }, { @@ -6560,12 +5880,6 @@ "issues": "https://github.com/facade/flare-client-php/issues", "source": "https://github.com/facade/flare-client-php/tree/1.3.7" }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], "time": "2020-10-21T16:02:39+00:00" }, { @@ -6693,10 +6007,6 @@ "flare", "ignition" ], - "support": { - "issues": "https://github.com/facade/ignition-contracts/issues", - "source": "https://github.com/facade/ignition-contracts/tree/1.0.1" - }, "time": "2020-07-14T10:10:28+00:00" }, { @@ -6864,12 +6174,69 @@ "keywords": [ "test" ], - "support": { - "issues": "https://github.com/hamcrest/hamcrest-php/issues", - "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" - }, "time": "2020-07-09T08:09:16+00:00" }, + { + "name": "maximebf/debugbar", + "version": "v1.16.5", + "source": { + "type": "git", + "url": "https://github.com/maximebf/php-debugbar.git", + "reference": "6d51ee9e94cff14412783785e79a4e7ef97b9d62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/6d51ee9e94cff14412783785e79a4e7ef97b9d62", + "reference": "6d51ee9e94cff14412783785e79a4e7ef97b9d62", + "shasum": "" + }, + "require": { + "php": "^7.1|^8", + "psr/log": "^1.0", + "symfony/var-dumper": "^2.6|^3|^4|^5" + }, + "require-dev": { + "phpunit/phpunit": "^7.5.20 || ^9.4.2" + }, + "suggest": { + "kriswallsmith/assetic": "The best way to manage assets", + "monolog/monolog": "Log using Monolog", + "predis/predis": "Redis storage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.16-dev" + } + }, + "autoload": { + "psr-4": { + "DebugBar\\": "src/DebugBar/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maxime Bouroumeau-Fuseau", + "email": "maxime.bouroumeau@gmail.com", + "homepage": "http://maximebf.com" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Debug bar in the browser for php application", + "homepage": "https://github.com/maximebf/php-debugbar", + "keywords": [ + "debug", + "debugbar" + ], + "time": "2020-12-07T11:07:24+00:00" + }, { "name": "mockery/mockery", "version": "1.3.3", @@ -6933,10 +6300,6 @@ "test double", "testing" ], - "support": { - "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.3.3" - }, "time": "2020-08-11T18:10:21+00:00" }, { @@ -6989,12 +6352,6 @@ "issues": "https://github.com/myclabs/DeepCopy/issues", "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], "time": "2020-11-13T09:40:50+00:00" }, { @@ -7069,20 +6426,6 @@ "issues": "https://github.com/nunomaduro/collision/issues", "source": "https://github.com/nunomaduro/collision" }, - "funding": [ - { - "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", - "type": "custom" - }, - { - "url": "https://github.com/nunomaduro", - "type": "github" - }, - { - "url": "https://www.patreon.com/nunomaduro", - "type": "patreon" - } - ], "time": "2020-10-29T15:12:23+00:00" }, { @@ -7243,10 +6586,6 @@ "reflection", "static analysis" ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, "time": "2020-06-27T09:03:43+00:00" }, { @@ -7299,10 +6638,6 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" - }, "time": "2020-09-03T19:13:55+00:00" }, { @@ -7348,10 +6683,6 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" - }, "time": "2020-09-17T18:55:26+00:00" }, { @@ -7415,10 +6746,6 @@ "spy", "stub" ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.12.1" - }, "time": "2020-09-29T09:10:42+00:00" }, { @@ -7486,12 +6813,6 @@ "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.14" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-12-02T13:39:03+00:00" }, { @@ -7546,12 +6867,6 @@ "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.3" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-11-30T08:25:21+00:00" }, { @@ -7593,10 +6908,6 @@ "keywords": [ "template" ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" - }, "time": "2015-06-21T13:50:34+00:00" }, { @@ -7650,12 +6961,6 @@ "issues": "https://github.com/sebastianbergmann/php-timer/issues", "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-11-30T08:20:02+00:00" }, { @@ -7709,12 +7014,6 @@ "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.2" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "abandoned": true, "time": "2020-11-30T08:38:46+00:00" }, @@ -7803,16 +7102,6 @@ "issues": "https://github.com/sebastianbergmann/phpunit/issues", "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.13" }, - "funding": [ - { - "url": "https://phpunit.de/donate.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-12-01T04:53:52+00:00" }, { @@ -7886,12 +7175,6 @@ "issues": "https://github.com/scrivo/highlight.php/issues", "source": "https://github.com/scrivo/highlight.php" }, - "funding": [ - { - "url": "https://github.com/allejo", - "type": "github" - } - ], "time": "2020-11-22T06:07:40+00:00" }, { @@ -7941,12 +7224,6 @@ "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-11-30T08:15:22+00:00" }, { @@ -8015,12 +7292,6 @@ "issues": "https://github.com/sebastianbergmann/comparator/issues", "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-11-30T08:04:30+00:00" }, { @@ -8081,12 +7352,6 @@ "issues": "https://github.com/sebastianbergmann/diff/issues", "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-11-30T07:59:04+00:00" }, { @@ -8144,12 +7409,6 @@ "issues": "https://github.com/sebastianbergmann/environment/issues", "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-11-30T07:53:42+00:00" }, { @@ -8221,12 +7480,6 @@ "issues": "https://github.com/sebastianbergmann/exporter/issues", "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-11-30T07:47:53+00:00" }, { @@ -8285,12 +7538,6 @@ "issues": "https://github.com/sebastianbergmann/global-state/issues", "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.1" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-11-30T07:43:24+00:00" }, { @@ -8342,12 +7589,6 @@ "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-11-30T07:40:27+00:00" }, { @@ -8397,12 +7638,6 @@ "issues": "https://github.com/sebastianbergmann/object-reflector/issues", "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-11-30T07:37:18+00:00" }, { @@ -8460,12 +7695,6 @@ "issues": "https://github.com/sebastianbergmann/recursion-context/issues", "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-11-30T07:34:24+00:00" }, { @@ -8512,12 +7741,6 @@ "issues": "https://github.com/sebastianbergmann/resource-operations/issues", "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-11-30T07:30:19+00:00" }, { @@ -8568,12 +7791,6 @@ "issues": "https://github.com/sebastianbergmann/type/issues", "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-11-30T07:25:11+00:00" }, { @@ -8617,12 +7834,60 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/master" - }, "time": "2016-10-03T07:35:21+00:00" }, + { + "name": "symfony/debug", + "version": "v4.4.25", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "a8d2d5c94438548bff9f998ca874e202bb29d07f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/a8d2d5c94438548bff9f998ca874e202bb29d07f", + "reference": "a8d2d5c94438548bff9f998ca874e202bb29d07f", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "psr/log": "~1.0", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "symfony/http-kernel": "<3.4" + }, + "require-dev": { + "symfony/http-kernel": "^3.4|^4.0|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to ease debugging PHP code", + "homepage": "https://symfony.com", + "time": "2021-05-26T17:39:37+00:00" + }, { "name": "theseer/tokenizer", "version": "1.2.0", @@ -8661,16 +7926,6 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/master" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], "time": "2020-07-12T23:59:07+00:00" }, { @@ -8720,10 +7975,6 @@ "check", "validate" ], - "support": { - "issues": "https://github.com/webmozart/assert/issues", - "source": "https://github.com/webmozart/assert/tree/master" - }, "time": "2020-07-08T17:02:28+00:00" } ], @@ -8735,6 +7986,5 @@ "platform": { "php": "^7.2.5" }, - "platform-dev": [], - "plugin-api-version": "2.0.0" + "platform-dev": [] } diff --git a/resources/views/homepage/admin/home.blade.php b/resources/views/homepage/admin/home.blade.php new file mode 100644 index 0000000..fcb7551 --- /dev/null +++ b/resources/views/homepage/admin/home.blade.php @@ -0,0 +1,23 @@ +@extends('layouts.app_operasi') + +@section('content') +
+
+
+
+ + + + +
+
+
+
+@endsection \ No newline at end of file diff --git a/resources/views/homepage/akaun/home.blade.php b/resources/views/homepage/akaun/home.blade.php new file mode 100644 index 0000000..80820f3 --- /dev/null +++ b/resources/views/homepage/akaun/home.blade.php @@ -0,0 +1,23 @@ +@extends('layouts.app_operasi') + +@section('content') +
+
+
+
+ + + +
+

AKAUN

+
+
+
+
+
+@endsection \ No newline at end of file diff --git a/resources/views/homepage/audit/home.blade.php b/resources/views/homepage/audit/home.blade.php new file mode 100644 index 0000000..090ce5d --- /dev/null +++ b/resources/views/homepage/audit/home.blade.php @@ -0,0 +1,23 @@ +@extends('layouts.app_operasi') + +@section('content') +
+
+
+
+ + + +
+

AUDIT

+
+
+
+
+
+@endsection \ No newline at end of file diff --git a/resources/views/homepage/operasi/home.blade.php b/resources/views/homepage/operasi/home.blade.php index 3fb8134..a4135e9 100644 --- a/resources/views/homepage/operasi/home.blade.php +++ b/resources/views/homepage/operasi/home.blade.php @@ -15,7 +15,7 @@ diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index a5fb0ab..8247f3e 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -28,7 +28,7 @@ - + diff --git a/resources/views/layouts/app_operasi.blade.php b/resources/views/layouts/app_operasi.blade.php index 200b721..8b5a7b3 100644 --- a/resources/views/layouts/app_operasi.blade.php +++ b/resources/views/layouts/app_operasi.blade.php @@ -28,7 +28,7 @@ - + diff --git a/resources/views/not_assign.blade.php b/resources/views/not_assign.blade.php new file mode 100644 index 0000000..24016f5 --- /dev/null +++ b/resources/views/not_assign.blade.php @@ -0,0 +1,92 @@ + + + + + + + Laravel + + + + + + + + +
+ + @if (Route::has('login')) + + @endif +
+ @csrf +
+
+
+ Khazanah Belum Menugaskan Jawatan Harian +
+
+
+ + diff --git a/resources/views/operasi/daftar_kakitangan.blade.php b/resources/views/operasi/daftar_kakitangan.blade.php index 2ca8665..dea8faa 100644 --- a/resources/views/operasi/daftar_kakitangan.blade.php +++ b/resources/views/operasi/daftar_kakitangan.blade.php @@ -94,8 +94,58 @@
+
+
+
+
{{ __('Senarai Kakitangan') }}
+
+
+
+ + + + + + + + + + + + @foreach($kakitangan as $index=>$staff) + + + + + + + + @endforeach + +
BilNama StaffJawatanCawanganAction
{{ $loop->iteration }}{{ $staff->name }}{{ strtoupper($staff->roles) }} + @if($staff->cawangan == 'operasi') + {{ ucwords($staff->cawangan) }} + @else + @php + $cawangan_staff = Http::get(config('api.url') . '/api/cawangan/'. $staff->cawangan)->json(); + echo ucwords($cawangan_staff['details_caw']); + @endphp + @endif + + edit + work +
+
+
+
+
+
+
+ +@endsection diff --git a/resources/views/operasi/parameter.blade.php b/resources/views/operasi/parameter.blade.php index 2783400..110e2ca 100644 --- a/resources/views/operasi/parameter.blade.php +++ b/resources/views/operasi/parameter.blade.php @@ -15,7 +15,7 @@
Harga Emas - Contoh 1 + Margin Pembiayaan Contoh 2
diff --git a/resources/views/operasi/tukar_cawangan.blade.php b/resources/views/operasi/tukar_cawangan.blade.php new file mode 100644 index 0000000..2390b35 --- /dev/null +++ b/resources/views/operasi/tukar_cawangan.blade.php @@ -0,0 +1,101 @@ +@extends('layouts.app_operasi') + +@section('content') +
+
+
+
+ + + +
+
+ @csrf + +
+
+
+
+ Nama +
+
+ +
+
+
+
+ Email +
+
+ +
+
+
+
+ Cawangan +
+
+ @php + $cawangan_all = Http::get($api_url . '/api/cawangan')->json(); + @endphp + +
+
+
+
+
+
+ No KP +
+
+ +
+
+
+
+ No Telefon +
+
+ +
+
+
+
+ Jawatan +
+ +
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+@endsection diff --git a/resources/views/operasi/tukar_taraf.blade.php b/resources/views/operasi/tukar_taraf.blade.php new file mode 100644 index 0000000..0941e27 --- /dev/null +++ b/resources/views/operasi/tukar_taraf.blade.php @@ -0,0 +1,84 @@ +@extends('layouts.app_operasi') + +@section('content') +
+
+
+
+ + + +
+
+ @csrf + +
+
+
+
+ Nama +
+
+ +
+
+
+
+ Email +
+
+ +
+
+
+
+
+
+ No KP +
+
+ +
+
+
+
+ No Telefon +
+
+ +
+
+
+
+ Jawatan +
+ +
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+@endsection diff --git a/routes/web.php b/routes/web.php index a783457..72fa756 100644 --- a/routes/web.php +++ b/routes/web.php @@ -243,6 +243,12 @@ Route::get('/operasi/parameter','OperasiController@parameter')->name('parameter' Route::get('/operasi/hargaemas',['as'=>'operasi.hargaemas','uses'=>'OperasiController@hargaemas'])->middleware('auth','operasi'); Route::post('/operasi/hargaemas/update',['as'=>'hargaemas.update','uses'=>'OperasiController@updatehargaemas'])->middleware('auth','operasi'); Route::post('/operasi/hargaemas',['as'=>'hargaemas.create','uses'=>'OperasiController@createhargaemas'])->middleware('auth','operasi'); +Route::get('kakitangan/tukar_taraf',['as'=>'kakitangan.tukartaraf','uses'=>'KakitanganController@tukartaraf'])->middleware('auth','operasi'); +Route::post('kakitangan/tukar_taraf/update',['as'=>'kakitangan.tukartaraf.update','uses'=>'KakitanganController@tukartarafUpdate'])->middleware('auth','operasi'); +Route::get('kakitangan/tukar_cawangan',['as'=>'kakitangan.tukarcawangan','uses'=>'KakitanganController@tukarcawangan'])->middleware('auth','operasi'); +Route::post('kakitangan/tukar_cawangan/update',['as'=>'kakitangan.tukarcawangan.update','uses'=>'KakitanganController@tukarcawanganUpdate'])->middleware('auth','operasi'); + +Route::get('/operasi/margin',['as'=>'operasi.margin','uses'=>'OperasiController@margin'])->middleware('auth','operasi'); Route::get('/komoditi',['as'=>'komuditi','uses'=>'KomuditiController@index']); Route::get('/komoditi/rekod',['as'=>'rekod.komoditi','uses'=>'KomuditiController@rekodKomoditi']); @@ -251,21 +257,12 @@ Route::get('/komoditi/rekod/print',['as'=>'komoditi.rekod.print','uses'=>'Komudi Route::post('/khazanah/suratakuangadaian',['as'=>'agh.create','uses'=>'KhazanahController@SuratAkuanGadaian'])->middleware('auth','khazanah'); Route::get('/khazanah/ulangcetakagh/{norujukan}',['as'=>'agh.ulangcetak','uses'=>'KhazanahController@ulangcetakSuratAkuanGadaianHilang'])->middleware('auth','khazanah'); - Route::get('/laporan/stokauditbersih', ['as'=>'laporan.stokauditbersih', 'uses'=>'KhazanahController@stokAuditBersih'])->middleware('auth','khazanah'); Route::post('/laporan/stokauditbersih_cetak',['as' =>'stokauditbersih.cetakstokauditbersih', 'uses'=>'KhazanahController@cetakStok_AuditBersih'])->middleware('auth','khazanah'); - Route::get('/laporan/stokauditdetails', ['as'=>'laporan.stokauditdetails','uses'=>'KhazanahController@stokAuditDetails'])->middleware('auth','khazanah'); Route::post('laporan/stokauditdetails_cetak',['as'=>'stokauditdetails.stokauditdetails_cetak', 'uses'=>'KhazanahController@cetak_stokAuditDetails'])->middleware('auth', 'khazanah'); - - - - - - - Route::get('/laporan/datalejeram',['as' =>'laporan.datalejer_am', 'uses'=>'KhazanahController@data_lejer_am'])->middleware('auth', 'khazanah'); route::post('/cetaklejer_am',['as'=>'cetak.lejer_am', 'uses'=>'KhazanahController@cetak_lejer_am'])->middleware('auth', 'khazanah'); diff --git a/storage/debugbar/.gitignore b/storage/debugbar/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/debugbar/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore From 17b2b84312ceaa9888299841b071fc84adf82f6b Mon Sep 17 00:00:00 2001 From: fifi97 Date: Sun, 4 Jul 2021 09:00:23 +0800 Subject: [PATCH 06/27] fix lejer am --- app/Http/Controllers/KhazanahController.php | 187 ++++++++++-------- .../views/print/laporan_lejer_am.blade.php | 67 ++----- 2 files changed, 115 insertions(+), 139 deletions(-) diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index da029fc..fd8b4c6 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -2479,6 +2479,13 @@ class KhazanahController extends Controller public function cetak_lejer_am(Request $request) { + $auth_user = Auth::user(); + $api_url = config('api.url'); + + $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); + $cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json(); + $cawangan_detail=$cawangan[0]; + //new glcode 2021-02-22 $GL_Code_BayaranOnline="1000/210"; $GL_CodeUntungSebenar="1000/213"; @@ -2512,120 +2519,128 @@ class KhazanahController extends Controller //Calculation Imbang Duga $imbangduga = Http::get(config('api.url').'/api/CalculationPendahuluanSerahanLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); - $keuntungan = Http::get(config('api.url').'/api/KeuntunganArRahnLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + #$keuntungan = Http::get(config('api.url').'/api/KeuntunganArRahnLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); $rebet = Http::get(config('api.url').'/api/RebetCalculationLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); //Harta semasa $pinjamandiberi = Http::get(config('api.url').'/api/PinjamanDiberiLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $pembiayaantawarruq = Http::get(config('api.url').'/api/PembiayaanDiberiTawarruqLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); - $tunaiditangan = Http::get(config('api.url').'/api/TunaiDiTanganLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); - $penghutangkaki = Http::get(config('api.url').'/api/PenghutangKakitanganLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + + $tunaiditangan = Http::get(config('api.url').'/api/TunaiDiTanganLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + + // $penghutangkaki = Http::get(config('api.url').'/api/PenghutangKakitanganLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); $untungrugi = Http::get(config('api.url').'/api/UntungRugiCalculationLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $bayaranpendahuluan = Http::get(config('api.url').'/api/BayaranPendahuluanLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); //Tanggungan Semasa $panjar = Http::get(config('api.url').'/api/CalculationPanjarLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $bakilelong = Http::get(config('api.url').'/api/BakiLelongCalculationLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); - $wtd = Http::get(config('api.url').'/api/SerahBakiLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); - $cajlelong = Http::get(config('api.url').'/api/cajlelongLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + + // $wtd = Http::get(config('api.url').'/api/SerahBakiLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + // $cajlelong = Http::get(config('api.url').'/api/cajlelongLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); $keuntungansebenar = Http::get(config('api.url').'/api/KeuntunganSebenarLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); - $cajperkhidmatan = Http::get(config('api.url').'/api/cajperkhidmatanterkumpulLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); - $hapuskira = Http::get(config('api.url').'/api/CalculationHapusKiraLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); - $xtra = Http::get(config('api.url').'/api/XtraLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + + // $cajperkhidmatan = Http::get(config('api.url').'/api/cajperkhidmatanterkumpulLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + // $hapuskira = Http::get(config('api.url').'/api/CalculationHapusKiraLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + // $xtra = Http::get(config('api.url').'/api/XtraLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); //TunaiDitangan Sementara Upah - if($tarikh_imbangan2 >= '2021-04-22' && $tarikh_imbangan2 < '2021-05-05') - { - $advansurharini = Http::get(config('api.url').'/api/advansurhariniLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); - $totaltunaiditangan = floatval($tunaiditangan) - floatval($advansurharini); - }else{ - $totaltunaiditangan = $tunaiditangan; - } + // if($tarikh_imbangan2 >= '2021-04-22' && $tarikh_imbangan2 < '2021-05-05') + // { + // $advansurharini = Http::get(config('api.url').'/api/advansurhariniLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + // $totaltunaiditangan = floatval($tunaiditangan) - floatval($advansurharini); + // }else{ + // $totaltunaiditangan = $tunaiditangan; + // } - $jualan1stop = 0;$belian1stop = 0;$utgterkumpulxtra = 0;$rugilelongxtra = 0;$bakilelongxtra = 0;$cajlelongxtra = 0;$upahsimpanxtra = 0; - //1Stop Special Case - if($auth_user['cawangan'] === '1STOP') - { - $jualan1stop = floatval(129857.00); - $belian1stop = floatval(122446.50); - $utgterkumpulxtra = floatval(6727.10); - $rugilelongxtra = floatval(10079.30); - $bakilelongxtra = floatval(123.20); - $cajlelongxtra = floatval(25.50); - $upahsimpanxtra = floatval(4894.40); + // $jualan1stop = 0;$belian1stop = 0;$utgterkumpulxtra = 0;$rugilelongxtra = 0;$bakilelongxtra = 0;$cajlelongxtra = 0;$upahsimpanxtra = 0; + // //1Stop Special Case + // if($auth_user['cawangan'] === '1STOP') + // { + // $jualan1stop = floatval(129857.00); + // $belian1stop = floatval(122446.50); + // $utgterkumpulxtra = floatval(6727.10); + // $rugilelongxtra = floatval(10079.30); + // $bakilelongxtra = floatval(123.20); + // $cajlelongxtra = floatval(25.50); + // $upahsimpanxtra = floatval(4894.40); - }else{ - $upahsimpanxtra = $xtra['upahsimpan']; - $bakilelongxtra = $xtra['bakilelong']; - $utgterkumpulxtra = $xtra['untungrugiterkumpul']; - $rugilelongxtra = -($xtra['kerugianlelong']); - $peruntukanhapuskira = ($xtra['phapuskira']); - } + // }else{ + // $upahsimpanxtra = $xtra['upahsimpan']; + // $bakilelongxtra = $xtra['bakilelong']; + // $utgterkumpulxtra = $xtra['untungrugiterkumpul']; + // $rugilelongxtra = -($xtra['kerugianlelong']); + // $peruntukanhapuskira = ($xtra['phapuskira']); + // } //Terkumpul - $untungrugiterkumpul = Http::get(config('api.url'). '/api/UntungRugiTerkumpulLejer/'. $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + // $untungrugiterkumpul = Http::get(config('api.url'). '/api/UntungRugiTerkumpulLejer/'. $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); - $hartasemasa = []; - // $hartasemasa = ['serahan' => $imbangduga['serahan'],'pinjamankoop' => $pinjamandiberi['pinjamankoop'],'emaspalsu' => $pinjamandiberi['emaspalsu'],'tunaiditangan' => $tunaiditangan['bakiakhir']]; + $Debit = []; + // $Debit = ['serahan' => $imbangduga['serahan'],'pinjamankoop' => $pinjamandiberi['pinjamankoop'],'emaspalsu' => $pinjamandiberi['emaspalsu'],'tunaiditangan' => $tunaiditangan['bakiakhir']]; - if($totaltunaiditangan > 0) array_push($hartasemasa,['glcode' => '1000/010','descpt' => 'Tunai Di Tangan', 'amaun' => $totaltunaiditangan]); - if($pembiayaantawarruq > 0) array_push($hartasemasa,['glcode' => '1000/010','descpt' => 'Pembiayaan Di Bawah Tawarruq', 'amaun' => $pembiayaantawarruq]); - if($penghutangkaki > 0) array_push($hartasemasa,['glcode' => '1000/011','descpt' => 'Penghutang Kakitangan', 'amaun' => $penghutangkaki]); - //array_push($hartasemasa,['glcode' => '1000/045','descpt' => 'Serahan Bayaran Online', 'amaun' => 0.00]); - if($keuntungan > 0) array_push($hartasemasa,['glcode' => '1000/211','descpt' => 'Keuntungan Tertangguh', 'amaun' => $keuntungan]); - if($bayaranpendahuluan > 0) array_push($hartasemasa,['glcode' => '5000/041','descpt' => 'Bayaran Pendahuluan','amaun' => ($bayaranpendahuluan * -1)]); - if($rebet > 0) array_push($hartasemasa,['glcode' => '5000/241','descpt' => 'Rebet','amaun' => ($rebet * -1)]); - if($imbangduga['serahan'] > 0) array_push($hartasemasa,['glcode' => '1000/020','descpt' => 'Serahan Kepada HQ', 'amaun' => $imbangduga['serahan']]); - if($pinjamandiberi['pinjamankoop'] > 0) array_push($hartasemasa,['glcode' => '1000/013','descpt' => 'Pinjaman Diberi - Koop PKB', 'amaun' => $pinjamandiberi['pinjamankoop']]); - if($pinjamandiberi['emaspalsu'] > 0) array_push($hartasemasa,['glcode' => '1000/014','descpt' => 'Pinjaman Diberi - Emas Palsu / Kes', 'amaun' => $pinjamandiberi['emaspalsu']]); - if($imbangduga['pindahkekpkb'] > 0) array_push($hartasemasa,['glcode' => '1000/090','descpt' => 'Pindah Ke KPKB(IP)', 'amaun' => $imbangduga['pindahkekpkb']]); - if($peruntukanhapuskira > 0) array_push($hartasemasa,['glcode' => '1000/015','descpt' => 'Peruntukan Hapus Kira', 'amaun' => $peruntukanhapuskira]); - if($belian1stop > 0) array_push($hartasemasa,['glcode' => '8000/501','descpt' => 'Belian 1 Stop', 'amaun' => $belian1stop]); + array_push($Debit,['glcode' => '1000/010','descpt' => 'Tunai Di Tangan', 'amaun' => $tunaiditangan['totalkeluar']]); + // if($pembiayaantawarruq > 0) array_push($Debit,['glcode' => '1000/010','descpt' => 'Pembiayaan Di Bawah Tawarruq', 'amaun' => $pembiayaantawarruq]); + // // if($penghutangkaki > 0) array_push($Debit,['glcode' => '1000/011','descpt' => 'Penghutang Kakitangan', 'amaun' => $penghutangkaki]); + // //array_push($Debit,['glcode' => '1000/045','descpt' => 'Serahan Bayaran Online', 'amaun' => 0.00]); + // if($keuntungan > 0) array_push($Debit,['glcode' => '1000/211','descpt' => 'Keuntungan Tertangguh', 'amaun' => $keuntungan]); + // if($bayaranpendahuluan > 0) array_push($Debit,['glcode' => '5000/041','descpt' => 'Bayaran Pendahuluan','amaun' => ($bayaranpendahuluan * -1)]); + // if($rebet > 0) array_push($Debit,['glcode' => '5000/241','descpt' => 'Rebet','amaun' => ($rebet * -1)]); + // if($imbangduga['serahan'] > 0) array_push($Debit,['glcode' => '1000/020','descpt' => 'Serahan Kepada HQ', 'amaun' => $imbangduga['serahan']]); + // if($pinjamandiberi['pinjamankoop'] > 0) array_push($Debit,['glcode' => '1000/013','descpt' => 'Pinjaman Diberi - Koop PKB', 'amaun' => $pinjamandiberi['pinjamankoop']]); + // if($pinjamandiberi['emaspalsu'] > 0) array_push($Debit,['glcode' => '1000/014','descpt' => 'Pinjaman Diberi - Emas Palsu / Kes', 'amaun' => $pinjamandiberi['emaspalsu']]); + // if($imbangduga['pindahkekpkb'] > 0) array_push($Debit,['glcode' => '1000/090','descpt' => 'Pindah Ke KPKB(IP)', 'amaun' => $imbangduga['pindahkekpkb']]); + // if($peruntukanhapuskira > 0) array_push($Debit,['glcode' => '1000/015','descpt' => 'Peruntukan Hapus Kira', 'amaun' => $peruntukanhapuskira]); + // if($belian1stop > 0) array_push($Debit,['glcode' => '8000/501','descpt' => 'Belian 1 Stop', 'amaun' => $belian1stop]); - $totalhartasemasa = 0; - foreach($hartasemasa as $index => $hs) - { - $totalhartasemasa += $hs['amaun']; - } + // $totalhartasemasa = 0; + // foreach($hartasemasa as $index => $hs) + // { + // $totalhartasemasa += $hs['amaun']; + // } - $tanggungansemasa = []; + $Kredit = []; - // $tanggungansemasa = ['pendahuluan' => $imbangduga['pendahuluan'],'bds' => $panjar['bds'],'perubatan' => $panjar['perubatan'],'keraian' => $panjar['keraian'],'bakilelong' => $bakilelong['bakilelong'],'rugilelong' => $bakilelong['rugilelong'],'wtd' => $wtd,'cajlelong' => $cajlelong]; + // // $Kredit = ['pendahuluan' => $imbangduga['pendahuluan'],'bds' => $panjar['bds'],'perubatan' => $panjar['perubatan'],'keraian' => $panjar['keraian'],'bakilelong' => $bakilelong['bakilelong'],'rugilelong' => $bakilelong['rugilelong'],'wtd' => $wtd,'cajlelong' => $cajlelong]; - if($keuntungan > 0) array_push($tanggungansemasa,['glcode' => '2000/007','descpt' => 'Keuntungan Tergantung', 'amaun' => $keuntungan]); - if($keuntungansebenar > 0) array_push($tanggungansemasa,['glcode' => '5000/013','descpt' => 'Upah Simpan','amaun' => $keuntungansebenar]); - if($rebet > 0) array_push($tanggungansemasa,['glcode' => '5000/241','descpt' => 'Rebet','amaun' => ($rebet * -1)]); - if($imbangduga['pendahuluan'] > 0) array_push($tanggungansemasa,['glcode' => '7000/102','descpt' => 'Pendahuluan Daripada HQ','amaun' => $imbangduga['pendahuluan']]); - if($panjar['bds'] > 0) array_push($tanggungansemasa,['glcode' => '3000/017','descpt' => 'PANJAR - Baiki dan Selenggara','amaun' => -$panjar['bds']]); - if($panjar['perubatan'] > 0) array_push($tanggungansemasa,['glcode' => '3000/018','descpt' => 'PANJAR - Belanja AM','amaun' => -$panjar['perubatan']]); - if($panjar['keraian'] > 0) array_push($tanggungansemasa,['glcode' => '3000/019','descpt' => 'PANJAR - Keraian Dan Promosi','amaun' => -$panjar['keraian']]); - if($bakilelong['bakilelong'] != 0) array_push($tanggungansemasa,['glcode' => '7000/090','descpt' => 'Baki Lelong','amaun' => $bakilelong['bakilelong']]); - if($bakilelong['rugilelong'] != 0) array_push($tanggungansemasa,['glcode' => '3000/020','descpt' => 'Kerugian Lelong','amaun' => $bakilelong['rugilelong']]); - if($wtd > 0) array_push($tanggungansemasa,['glcode' => '3000/021','descpt' => 'WANG TAK DITUNTUT','amaun' => $wtd]); - if($cajlelong > 0) array_push($tanggungansemasa,['glcode' => '5000/213','descpt' => 'Pendapatan Caj Lelong','amaun' => $cajlelong]); - if($untungrugiterkumpul > 0) array_push($tanggungansemasa,['glcode' => '7000/101','descpt' => 'Untung/Rugi Terkumpul','amaun' => $untungrugiterkumpul]); - if($cajperkhidmatan > 0) array_push($tanggungansemasa,['glcode' => '5000/213','descpt' => 'Caj Perkhidmatan Terkumpul','amaun' => $cajperkhidmatan]); - if($cajlelongxtra > 0) array_push($tanggungansemasa,['glcode' => '5000/313','descpt' => 'Pendapatan Caj Lelong Xtra ','amaun' => $cajlelongxtra]); - if($upahsimpanxtra > 0) array_push($tanggungansemasa,['glcode' => '5000/413','descpt' => 'Upah Simpan Xtra - Koperasi PKB','amaun' => $upahsimpanxtra]); - if($bakilelongxtra > 0) array_push($tanggungansemasa,['glcode' => '7000/190','descpt' => 'Baki Lelong Xtra','amaun' => $bakilelongxtra]); - if($rugilelongxtra != 0) array_push($tanggungansemasa,['glcode' => '7000/191','descpt' => 'Rugi Lelong Xtra','amaun' => -$rugilelongxtra]); - if($utgterkumpulxtra > 0) array_push($tanggungansemasa,['glcode' => '7000/201','descpt' => 'Untung/Rugi Terkumpul Xtra','amaun' => $utgterkumpulxtra]); - if($jualan1stop > 0) array_push($tanggungansemasa,['glcode' => '9000/501','descpt' => 'Jualan 1 Stop','amaun' => $jualan1stop]); - if($hapuskira > 0) array_push($tanggungansemasa,['glcode' => '3000/011','descpt' => 'Hapus Kira','amaun' => -$hapuskira]); + array_push($Debit,['glcode' => '1000/010','descpt' => 'Tunai Di Tangan', 'amaun' => $tunaiditangan['totalmasuk']]); + // if($keuntungan > 0) array_push($Kredit,['glcode' => '2000/007','descpt' => 'Keuntungan Tergantung', 'amaun' => $keuntungan]); + // if($keuntungansebenar > 0) array_push($Kredit,['glcode' => '5000/013','descpt' => 'Upah Simpan','amaun' => $keuntungansebenar]); + // if($rebet > 0) array_push($Kredit,['glcode' => '5000/241','descpt' => 'Rebet','amaun' => ($rebet * -1)]); + // if($imbangduga['pendahuluan'] > 0) array_push($Kredit,['glcode' => '7000/102','descpt' => 'Pendahuluan Daripada HQ','amaun' => $imbangduga['pendahuluan']]); + // if($panjar['bds'] > 0) array_push($Kredit,['glcode' => '3000/017','descpt' => 'PANJAR - Baiki dan Selenggara','amaun' => -$panjar['bds']]); + // if($panjar['perubatan'] > 0) array_push($Kredit,['glcode' => '3000/018','descpt' => 'PANJAR - Belanja AM','amaun' => -$panjar['perubatan']]); + // if($panjar['keraian'] > 0) array_push($Kredit,['glcode' => '3000/019','descpt' => 'PANJAR - Keraian Dan Promosi','amaun' => -$panjar['keraian']]); + // if($bakilelong['bakilelong'] != 0) array_push($Kredit,['glcode' => '7000/090','descpt' => 'Baki Lelong','amaun' => $bakilelong['bakilelong']]); + // if($bakilelong['rugilelong'] != 0) array_push($Kredit,['glcode' => '3000/020','descpt' => 'Kerugian Lelong','amaun' => $bakilelong['rugilelong']]); + // if($wtd > 0) array_push($Kredit,['glcode' => '3000/021','descpt' => 'WANG TAK DITUNTUT','amaun' => $wtd]); + // if($cajlelong > 0) array_push($Kredit,['glcode' => '5000/213','descpt' => 'Pendapatan Caj Lelong','amaun' => $cajlelong]); + // if($untungrugiterkumpul > 0) array_push($Kredit,['glcode' => '7000/101','descpt' => 'Untung/Rugi Terkumpul','amaun' => $untungrugiterkumpul]); + // if($cajperkhidmatan > 0) array_push($Kredit,['glcode' => '5000/213','descpt' => 'Caj Perkhidmatan Terkumpul','amaun' => $cajperkhidmatan]); + // if($cajlelongxtra > 0) array_push($Kredit,['glcode' => '5000/313','descpt' => 'Pendapatan Caj Lelong Xtra ','amaun' => $cajlelongxtra]); + // if($upahsimpanxtra > 0) array_push($Kredit,['glcode' => '5000/413','descpt' => 'Upah Simpan Xtra - Koperasi PKB','amaun' => $upahsimpanxtra]); + // if($bakilelongxtra > 0) array_push($Kredit,['glcode' => '7000/190','descpt' => 'Baki Lelong Xtra','amaun' => $bakilelongxtra]); + // if($rugilelongxtra != 0) array_push($Kredit,['glcode' => '7000/191','descpt' => 'Rugi Lelong Xtra','amaun' => -$rugilelongxtra]); + // if($utgterkumpulxtra > 0) array_push($Kredit,['glcode' => '7000/201','descpt' => 'Untung/Rugi Terkumpul Xtra','amaun' => $utgterkumpulxtra]); + // if($jualan1stop > 0) array_push($Kredit,['glcode' => '9000/501','descpt' => 'Jualan 1 Stop','amaun' => $jualan1stop]); + // if($hapuskira > 0) array_push($Kredit,['glcode' => '3000/011','descpt' => 'Hapus Kira','amaun' => -$hapuskira]); - $totaltanggungansemasa = 0; - foreach($tanggungansemasa as $index => $ts) - { - $totaltanggungansemasa += $ts['amaun']; - } + // $totaltanggungansemasa = 0; + // foreach($tanggungansemasa as $index => $ts) + // { + // $totaltanggungansemasa += $ts['amaun']; + // } - $untungrugifield = []; - array_push($untungrugifield,['glcode' => '2000/007','descpt' => 'Keuntungan', 'amaun' => $untungrugi]); + // $untungrugifield = []; + // array_push($untungrugifield,['glcode' => '2000/007','descpt' => 'Keuntungan', 'amaun' => $untungrugi]); - $totaluntungrugi = 0; - $totaluntungrugi = $totaltanggungansemasa + $untungrugi; + // $totaluntungrugi = 0; + // $totaluntungrugi = $totaltanggungansemasa + $untungrugi; - return view('print.laporan_lejer_am',compact('cawangan','cawangan_info', 'api_url','cawangan_detail','tarikh_akhir','tarikh_mula','data','debit','kredit')); + return view('print.laporan_lejer_am',compact('cawangan','cawangan_info', 'api_url','cawangan_detail','tarikh_akhir','tarikh_mula','Debit','Kredit')); } public function laporan_tuntutbaki(Request $request) diff --git a/resources/views/print/laporan_lejer_am.blade.php b/resources/views/print/laporan_lejer_am.blade.php index 220b8ea..c9276a8 100644 --- a/resources/views/print/laporan_lejer_am.blade.php +++ b/resources/views/print/laporan_lejer_am.blade.php @@ -331,60 +331,21 @@
- - - -{{-- @foreach($data as $index=>$var) - + + + + + + + - - -@if($var['hariini'] >0 ) - -@else - - - @endif - - -@endforeach - - - - - - - - --}} + + + + + + + From e2a37f2335cf596374250ac2094c49f1ac2bc053 Mon Sep 17 00:00:00 2001 From: MUHD HAFIFIE Date: Sun, 4 Jul 2021 15:31:55 +0800 Subject: [PATCH 07/27] fix lejeram --- app/Http/Controllers/KhazanahController.php | 60 +++++++++++++------ .../views/print/laporan_lejer_am.blade.php | 54 +++++++++++++---- 2 files changed, 85 insertions(+), 29 deletions(-) diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index fd8b4c6..dc0138b 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -1401,10 +1401,10 @@ class KhazanahController extends Controller $current = Carbon::now(); $current = new Carbon(); $tarikh_cetak = $current->toDateString(); - if($request->datetimepicker1 == null){ + if($request->datetarikh == null){ $gadai_date = $current->toDateString(); }else{ - $split_date = explode('-',$request->datetimepicker1); + $split_date = explode('-',$request->datetarikh); $gadai_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0]; } $gadai = Http::get(config('api.url'). '/api/gadai/laporan/'. $auth_user['cawangan'] .'/'. $gadai_date)->json(); @@ -1428,10 +1428,10 @@ class KhazanahController extends Controller $current = Carbon::now(); $current = new Carbon(); $tarikh_cetak = $current->toDateString(); - if($request->datetimepicker1 == null){ + if($request->datetarikh == null){ $tebus_date = $current->toDateString(); }else{ - $split_date = explode('-',$request->datetimepicker1); + $split_date = explode('-',$request->datetarikh); $tebus_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0]; } $tebus = Http::get(config('api.url'). '/api/tebus/laporan/'. $auth_user['cawangan'] .'/'. $tebus_date)->json(); @@ -2363,6 +2363,7 @@ class KhazanahController extends Controller $cajperkhidmatan = Http::get(config('api.url').'/api/cajperkhidmatanterkumpul/' . $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json(); $hapuskira = Http::get(config('api.url').'/api/CalculationHapusKira/' . $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json(); $xtra = Http::get(config('api.url').'/api/Xtra/' . $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json(); + //TunaiDitangan Sementara Upah if($tarikh_imbangan2 >= '2021-04-22' && $tarikh_imbangan2 < '2021-05-05') @@ -2384,6 +2385,7 @@ class KhazanahController extends Controller $bakilelongxtra = floatval(123.20); $cajlelongxtra = floatval(25.50); $upahsimpanxtra = floatval(4894.40); + $peruntukanhapuskira = ($xtra['phapuskira']); }else{ $upahsimpanxtra = $xtra['upahsimpan']; @@ -2391,7 +2393,6 @@ class KhazanahController extends Controller $utgterkumpulxtra = $xtra['untungrugiterkumpul']; $rugilelongxtra = -($xtra['kerugianlelong']); $peruntukanhapuskira = ($xtra['phapuskira']); - } //Terkumpul @@ -2517,9 +2518,9 @@ class KhazanahController extends Controller } //Calculation Imbang Duga - $imbangduga = Http::get(config('api.url').'/api/CalculationPendahuluanSerahanLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $imbangduga = Http::get(config('api.url').'/api/PendahuluanSerahanLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); - #$keuntungan = Http::get(config('api.url').'/api/KeuntunganArRahnLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); + $keuntungan = Http::get(config('api.url').'/api/KeuntunganArRahnLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); $rebet = Http::get(config('api.url').'/api/RebetCalculationLejer/' . $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); //Harta semasa @@ -2578,20 +2579,31 @@ class KhazanahController extends Controller //Terkumpul // $untungrugiterkumpul = Http::get(config('api.url'). '/api/UntungRugiTerkumpulLejer/'. $auth_user['cawangan'],['mula' => $tarikh_mula, 'hingga' => $tarikh_akhir])->json(); - $Debit = []; + $TotalDebit = 0; + $TotalTunaiDebit = 0; + $TotalTunaiKredit = 0; + + $TotalTunaiDebit = $pinjamandiberi['Gadai'] + $pembiayaantawarruq['Gadai'] + $rebet + $keuntungan + $imbangduga['serahan'] + $panjar['bds'] + $panjar['perubatan'] + $panjar['keraian']; + $TotalTunaiKredit = $pinjamandiberi['Tebus'] + $pembiayaantawarruq['Tebus'] + $rebet + $keuntungan + $keuntungansebenar + $untungrugi + $bayaranpendahuluan + $imbangduga['pendahuluan']; + // $Debit = ['serahan' => $imbangduga['serahan'],'pinjamankoop' => $pinjamandiberi['pinjamankoop'],'emaspalsu' => $pinjamandiberi['emaspalsu'],'tunaiditangan' => $tunaiditangan['bakiakhir']]; - array_push($Debit,['glcode' => '1000/010','descpt' => 'Tunai Di Tangan', 'amaun' => $tunaiditangan['totalkeluar']]); - // if($pembiayaantawarruq > 0) array_push($Debit,['glcode' => '1000/010','descpt' => 'Pembiayaan Di Bawah Tawarruq', 'amaun' => $pembiayaantawarruq]); + array_push($Debit,['glcode' => '1000/010','descpt' => 'Tunai Di Tangan', 'amaun' => $TotalTunaiKredit]); + array_push($Debit,['glcode' => '1000/013','descpt' => 'Pinjaman Diberi - Koop PKB', 'amaun' => $pinjamandiberi['Gadai']]); + array_push($Debit,['glcode' => '1000/017','descpt' => 'Pembiayaan Di Bawah Tawarruq', 'amaun' => $pembiayaantawarruq['Gadai']]); + array_push($Debit,['glcode' => '1000/041','descpt' => 'Bayaran Pendahuluan','amaun' => 0.00]); + array_push($Debit,['glcode' => '1000/241','descpt' => 'Rebet','amaun' => ($rebet)]); + array_push($Debit,['glcode' => '1000/211','descpt' => 'Keuntungan Tertangguh', 'amaun' => $keuntungan]); + array_push($Debit,['glcode' => '1000/020','descpt' => 'Serahan Kepada HQ', 'amaun' => $imbangduga['serahan']]); + array_push($Debit,['glcode' => '3000/017','descpt' => 'PANJAR - Baiki dan Selenggara','amaun' => $panjar['bds']]); + array_push($Debit,['glcode' => '3000/018','descpt' => 'PANJAR - Belanja AM','amaun' => $panjar['perubatan']]); + array_push($Debit,['glcode' => '3000/019','descpt' => 'PANJAR - Keraian Dan Promosi','amaun' => $panjar['keraian']]); + // // if($penghutangkaki > 0) array_push($Debit,['glcode' => '1000/011','descpt' => 'Penghutang Kakitangan', 'amaun' => $penghutangkaki]); // //array_push($Debit,['glcode' => '1000/045','descpt' => 'Serahan Bayaran Online', 'amaun' => 0.00]); - // if($keuntungan > 0) array_push($Debit,['glcode' => '1000/211','descpt' => 'Keuntungan Tertangguh', 'amaun' => $keuntungan]); // if($bayaranpendahuluan > 0) array_push($Debit,['glcode' => '5000/041','descpt' => 'Bayaran Pendahuluan','amaun' => ($bayaranpendahuluan * -1)]); // if($rebet > 0) array_push($Debit,['glcode' => '5000/241','descpt' => 'Rebet','amaun' => ($rebet * -1)]); - // if($imbangduga['serahan'] > 0) array_push($Debit,['glcode' => '1000/020','descpt' => 'Serahan Kepada HQ', 'amaun' => $imbangduga['serahan']]); - // if($pinjamandiberi['pinjamankoop'] > 0) array_push($Debit,['glcode' => '1000/013','descpt' => 'Pinjaman Diberi - Koop PKB', 'amaun' => $pinjamandiberi['pinjamankoop']]); - // if($pinjamandiberi['emaspalsu'] > 0) array_push($Debit,['glcode' => '1000/014','descpt' => 'Pinjaman Diberi - Emas Palsu / Kes', 'amaun' => $pinjamandiberi['emaspalsu']]); // if($imbangduga['pindahkekpkb'] > 0) array_push($Debit,['glcode' => '1000/090','descpt' => 'Pindah Ke KPKB(IP)', 'amaun' => $imbangduga['pindahkekpkb']]); // if($peruntukanhapuskira > 0) array_push($Debit,['glcode' => '1000/015','descpt' => 'Peruntukan Hapus Kira', 'amaun' => $peruntukanhapuskira]); // if($belian1stop > 0) array_push($Debit,['glcode' => '8000/501','descpt' => 'Belian 1 Stop', 'amaun' => $belian1stop]); @@ -2601,16 +2613,28 @@ class KhazanahController extends Controller // { // $totalhartasemasa += $hs['amaun']; // } - + $TotalDebit = $TotalTunaiKredit + $pinjamandiberi['Gadai'] + $pembiayaantawarruq['Gadai'] + $rebet + $keuntungan + $imbangduga['serahan'] + $panjar['bds'] + $panjar['perubatan'] + $panjar['keraian']; + $Kredit = []; + $TotalKredit = 0; // // $Kredit = ['pendahuluan' => $imbangduga['pendahuluan'],'bds' => $panjar['bds'],'perubatan' => $panjar['perubatan'],'keraian' => $panjar['keraian'],'bakilelong' => $bakilelong['bakilelong'],'rugilelong' => $bakilelong['rugilelong'],'wtd' => $wtd,'cajlelong' => $cajlelong]; - array_push($Debit,['glcode' => '1000/010','descpt' => 'Tunai Di Tangan', 'amaun' => $tunaiditangan['totalmasuk']]); + array_push($Kredit,['glcode' => '1000/010','descpt' => 'Tunai Di Tangan', 'amaun' => $TotalTunaiDebit]); + array_push($Kredit,['glcode' => '1000/013','descpt' => 'Pinjaman Diberi - Koop PKB', 'amaun' => $pinjamandiberi['Tebus']]); + array_push($Kredit,['glcode' => '1000/017','descpt' => 'Pembiayaan Di Bawah Tawarruq', 'amaun' => $pembiayaantawarruq['Tebus']]); + array_push($Kredit,['glcode' => '1000/041','descpt' => 'Bayaran Pendahuluan','amaun' => ($bayaranpendahuluan)]); + array_push($Kredit,['glcode' => '5000/241','descpt' => 'Rebet','amaun' => ($rebet)]); + array_push($Kredit,['glcode' => '5000/211','descpt' => 'Keuntungan Tergantung', 'amaun' => $keuntungan]); + array_push($Kredit,['glcode' => '5000/013','descpt' => 'Upah Simpan','amaun' => $keuntungansebenar]); + array_push($Kredit,['glcode' => '5000/007','descpt' => 'Keuntungan Semasa', 'amaun' => $untungrugi]); + array_push($Kredit,['glcode' => '7000/102','descpt' => 'Pendahuluan Daripada HQ','amaun' => $imbangduga['pendahuluan']]); + + + $TotalKredit = $TotalTunaiDebit + $pinjamandiberi['Tebus'] + $pembiayaantawarruq['Tebus'] + $rebet + $keuntungan + $keuntungansebenar + $untungrugi + $bayaranpendahuluan + $imbangduga['pendahuluan']; // if($keuntungan > 0) array_push($Kredit,['glcode' => '2000/007','descpt' => 'Keuntungan Tergantung', 'amaun' => $keuntungan]); // if($keuntungansebenar > 0) array_push($Kredit,['glcode' => '5000/013','descpt' => 'Upah Simpan','amaun' => $keuntungansebenar]); // if($rebet > 0) array_push($Kredit,['glcode' => '5000/241','descpt' => 'Rebet','amaun' => ($rebet * -1)]); - // if($imbangduga['pendahuluan'] > 0) array_push($Kredit,['glcode' => '7000/102','descpt' => 'Pendahuluan Daripada HQ','amaun' => $imbangduga['pendahuluan']]); // if($panjar['bds'] > 0) array_push($Kredit,['glcode' => '3000/017','descpt' => 'PANJAR - Baiki dan Selenggara','amaun' => -$panjar['bds']]); // if($panjar['perubatan'] > 0) array_push($Kredit,['glcode' => '3000/018','descpt' => 'PANJAR - Belanja AM','amaun' => -$panjar['perubatan']]); // if($panjar['keraian'] > 0) array_push($Kredit,['glcode' => '3000/019','descpt' => 'PANJAR - Keraian Dan Promosi','amaun' => -$panjar['keraian']]); @@ -2640,7 +2664,7 @@ class KhazanahController extends Controller // $totaluntungrugi = 0; // $totaluntungrugi = $totaltanggungansemasa + $untungrugi; - return view('print.laporan_lejer_am',compact('cawangan','cawangan_info', 'api_url','cawangan_detail','tarikh_akhir','tarikh_mula','Debit','Kredit')); + return view('print.laporan_lejer_am',compact('cawangan','cawangan_info', 'api_url','cawangan_detail','tarikh_akhir','tarikh_mula','TotalDebit','Debit','TotalKredit','Kredit')); } public function laporan_tuntutbaki(Request $request) diff --git a/resources/views/print/laporan_lejer_am.blade.php b/resources/views/print/laporan_lejer_am.blade.php index c9276a8..10e7ab8 100644 --- a/resources/views/print/laporan_lejer_am.blade.php +++ b/resources/views/print/laporan_lejer_am.blade.php @@ -339,22 +339,54 @@ + @foreach($Kredit as $index=>$kred) + @foreach($Debit as $index=>$deb) + @if($kred['glcode'] === $deb['glcode']) + + + + + + + + @endif + @endforeach + @endforeach + +@foreach($Debit as $index=>$deb) + @if($deb['glcode'] == '1000/241' || $deb['glcode'] == '1000/211' || $deb['glcode'] == '1000/020' || $deb['glcode'] == '3000/017' || $deb['glcode'] == '3000/018' || $deb['glcode'] == '3000/019') + + + + + + + + @endif +@endforeach + +@foreach($Kredit as $index=>$kred) + @if($kred['glcode'] == '5000/241' || $kred['glcode'] == '5000/211' || $kred['glcode'] == '5000/013' || $kred['glcode'] == '5000/007' || $kred['glcode'] == '7000/102') + + + + + + + + @endif +@endforeach + - - - - - + + + + - - - - - -
KOD GL KETERANGAN DEBIT KREDITJUMLAH
KOD GLKETERANGANDEBITKREDITJUMLAH
{{ $var['glcode']}}{{$var['descpt']}} {{$var['debit']}} {{$var['kredit']}} {{ - - $var['hariini'] - }} - - - - - - -( {{ number_format(abs($var['hariini']),2)}} ) - - - -
JUMLAH: @foreach($debit as $db=>$vr) {{ number_format($vr['totalDebit'],2)}} @endforeach - - @foreach($kredit as $db=>$vr) {{ number_format($vr['totalKredit'],2)}} @endforeach - - -@foreach($kredit as $db=>$vr) -@foreach($debit as $db2=>$vr2) - -{{ number_format($vr['totalKredit'] -$vr2['totalDebit'] ,2) }} -@endforeach - @endforeach - - - - -
KOD GLKETERANGANDEBITKREDITJUMLAH
JUMLAH
{{ $kred['glcode'] }}{{ $kred['descpt'] }}{{ number_format($deb['amaun'],2) }}{{ number_format($kred['amaun'],2) }}@php $Totalsama = $deb['amaun'] - $kred['amaun']; echo number_format($Totalsama,2); @endphp
{{ $deb['glcode'] }}{{ $deb['descpt'] }}{{ number_format($deb['amaun'],2) }}{{ number_format(0,2) }}{{ number_format($deb['amaun'],2) }}
{{ $kred['glcode'] }}{{ $kred['descpt'] }}{{ number_format(0,2) }}{{ number_format($kred['amaun'],2) }}{{ number_format(($kred['amaun']*-1),2) }}
KOD GLKETERANGANDEBITKREDITJUMLAHJUMLAH: {{ number_format($TotalDebit,2) }}{{ number_format($TotalKredit,2) }}@php $Total = $TotalDebit - $TotalKredit; echo number_format($Total,2); @endphp
+

From 82d370c01e5cb937812ca4eaf18050935686807b Mon Sep 17 00:00:00 2001 From: MUHD HAFIFIE Date: Mon, 5 Jul 2021 16:28:13 +0800 Subject: [PATCH 08/27] fix laporan --- app/Http/Controllers/KhazanahController.php | 3 ++- resources/views/print/laporan_penebusan.blade.php | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index dc0138b..2ad82e5 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -1437,11 +1437,12 @@ class KhazanahController extends Controller $tebus = Http::get(config('api.url'). '/api/tebus/laporan/'. $auth_user['cawangan'] .'/'. $tebus_date)->json(); $tebuspengasingan = Http::get(config('api.url'). '/api/tebus/laporanjenistawarruq/'. $auth_user['cawangan'],['tarikh' => $tebus_date])->json(); $upahlama = Http::get(config('api.url'). '/api/advansurdetails/'. $auth_user['cawangan'],['tarikh' => $tebus_date])->json(); + $ansuran = Http::get(config('api.url'). '/api/ansuransummary/'. $auth_user['cawangan'],['tarikh' => $tebus_date])->json(); $cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json(); $cawangan_detail=$cawangan[0]; // dd($gadai); - return view('print.laporan_penebusan', compact('tebus','cawangan_detail','tarikh_cetak','tebus_date','tebuspengasingan','api_url','upahlama')); + return view('print.laporan_penebusan', compact('tebus','cawangan_detail','tarikh_cetak','tebus_date','tebuspengasingan','ansuran','api_url','upahlama')); } public function laporanLelongan(){ diff --git a/resources/views/print/laporan_penebusan.blade.php b/resources/views/print/laporan_penebusan.blade.php index 0fcc15a..ef7621e 100644 --- a/resources/views/print/laporan_penebusan.blade.php +++ b/resources/views/print/laporan_penebusan.blade.php @@ -325,6 +325,13 @@ {{ number_format($upahlama['total'],2) }} Not Applicable + + {{ $upahlama['bil'] }} + Ansuran + {{ number_format($ansuran['totalpendahuluan'],2) }} + {{ number_format($ansuran['totalkeuntungan'],2) }} + Not Applicable + {{--
JUMLAH KESELURUHAN BAYARAN : RM {{ number_format($totalbayaran,2) }}
--}} From 065b4920501593c409e7a6d6e81eb6e6d234360b Mon Sep 17 00:00:00 2001 From: MUHD HAFIFIE Date: Tue, 6 Jul 2021 16:50:03 +0800 Subject: [PATCH 09/27] fix laporan --- .../views/print/laporan_ansuran.blade.php | 68 +++++++++++++------ .../views/print/laporan_penebusan.blade.php | 24 +++---- resources/views/print/laporan_upah.blade.php | 18 +++-- 3 files changed, 64 insertions(+), 46 deletions(-) diff --git a/resources/views/print/laporan_ansuran.blade.php b/resources/views/print/laporan_ansuran.blade.php index 223b3a6..99403f3 100644 --- a/resources/views/print/laporan_ansuran.blade.php +++ b/resources/views/print/laporan_ansuran.blade.php @@ -205,52 +205,78 @@ No K/P Tempoh Baki Pembiayaan (RM) + Bayaran Pemb. (RM) Bayaran (RM) Keuntungan (RM) - @php $counter = 1;$totalduitmasuk = 0;$totalkeuntungan = 0; @endphp + @php $counter = 1;$totalduitmasuk = 0;$totalkeuntungan = 0; $totalpendahuluan = 0;@endphp @foreach($tebus as $index=>$item) - @php $totalduitmasuk += $item['duit_masuk'];$totalkeuntungan += $item['bayaran_keuntungan']; @endphp + @php $totalduitmasuk += $item['duit_masuk'];$totalkeuntungan += $item['bayaran_keuntungan'];$totalpendahuluan += $item['bayaran_pembiayaan']; @endphp + @if($index > 0) + @if($item['teller'] != $tebus[$index - 1]['teller']) + + Teller : {{ $item['teller'] }} + + @php $totaldmteller = 0;$totalupahteller = 0;$totalpendhteller = 0; @endphp + @endif + @else + + Teller : {{ $item['teller'] }} + + @php $totaldmteller = 0;$totalupahteller = 0;$totalpendhteller = 0; @endphp + @endif {{ $counter }} {{$item['norujukan']}} - - @php - $gadai_detail = Http::get($api_url . '/api/gadai/norujukan/'. $item['norujukan'])->json(); - $customer_detail = Http::get($api_url . '/api/customers/' . $gadai_detail[0][0]['nokp'])->json(); - - echo $customer_detail['nama']; - @endphp - - {{ $gadai_detail[0][0]['nokp'] }} - {{ $gadai_detail[0][0]['tempoh'] }} - {{ number_format($gadai_detail[0][0]['bakipjm'],2) }} + {{ $item['nama'] }} + {{ $item['nokp'] }} + {{ $item['tempoh'] }} + {{ number_format($item['bakipjm'],2) }} + {{ number_format($item['bayaran_pembiayaan'],2) }} {{ number_format($item['duit_masuk'],2) }} {{ number_format($item['bayaran_keuntungan'],2) }} - @php $counter++; @endphp + @php $totaldmteller += $item['duit_masuk'];$totalupahteller += $item['bayaran_keuntungan'];$totalpendhteller += $item['bayaran_pembiayaan']; @endphp @if($index+1 < sizeof($tebus)) @if($item['teller'] != $tebus[$index + 1]['teller']) {{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} - {{ number_format($totalduitmasuk,2) }} - {{ number_format($totalkeuntungan,2) }} + {{ number_format($totalpendhteller,2) }} + {{ number_format($totaldmteller,2) }} + {{ number_format($totalupahteller,2) }} - @php $counter = 0; @endphp + @php $counter = 1;$totaldmteller = 0;$totalupahteller = 0;$totalpendhteller = 0;@endphp @endif @else {{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} - {{ number_format($totalduitmasuk,2) }} - {{ number_format($totalkeuntungan,2) }} + {{ number_format($totalpendhteller,2) }} + {{ number_format($totaldmteller,2) }} + {{ number_format($totalupahteller,2) }} @endif @endforeach -
-
+

+ + + + + + + + + + + + + +
Bayaran Pemb. (RM)Bayaran (RM)Keuntungan (RM)
JUMLAH KESELURUHAN{{ number_format($totalpendahuluan,2) }}{{ number_format($totalduitmasuk,2) }}{{ number_format($totalkeuntungan,2) }}
+ +

+

diff --git a/resources/views/print/laporan_penebusan.blade.php b/resources/views/print/laporan_penebusan.blade.php index ef7621e..2901ae9 100644 --- a/resources/views/print/laporan_penebusan.blade.php +++ b/resources/views/print/laporan_penebusan.blade.php @@ -198,10 +198,10 @@ - - + + @@ -229,21 +229,17 @@ - + @@ -334,8 +330,6 @@
Norujukan Nama No KPT GadaiT TebusMasa JBG J TebusNilai Marhun(RM) Pembiayaan(RM) Upah/Keuntungan(RM) Bayaran(RM){{ $item['nama'] }} {{ $item['nokp'] }} - @php - $myDateTime = DateTime::createFromFormat('Y-m-d', $item['t_gadai']); - $formattedweddingdate = $myDateTime->format('d-m-Y'); - echo($formattedweddingdate); - @endphp - - @php - $myDateTime = DateTime::createFromFormat('Y-m-d', $item['t_tebus']); - $formattedweddingdate = $myDateTime->format('d-m-Y'); - echo($formattedweddingdate); + @php + $dt = new DateTime($item['tarikh_bayaran']); + $time = $dt->format('h:i:s'); + echo date($time); @endphp {{ $item['jbg'] }} {{$item['jenistebus']}} + {{ number_format($item['nilaimarhun'],2) }} + {{ number_format($item['pinjaman'],2) }} {{ number_format($item['bakiupah'],2) }} {{ number_format($item['bakipjm'],2) }}
-{{--
JUMLAH KESELURUHAN BAYARAN : RM {{ number_format($totalbayaran,2) }}
--}} -

diff --git a/resources/views/print/laporan_upah.blade.php b/resources/views/print/laporan_upah.blade.php index cfb975b..4c6316b 100644 --- a/resources/views/print/laporan_upah.blade.php +++ b/resources/views/print/laporan_upah.blade.php @@ -221,13 +221,13 @@ - - - + + + @php $counter = 1; $totalbayaran = 0; $totalpembiayaan = 0; $totalpembiayaanteller = 0; $totalbayaranteller = 0; @endphp @foreach($advansur as $index=>$item) - @php $totalbayaran += $item['upahDibayar']; $totalpembiayaan += $item['pinjaman'];$totalbayaranteller += $item['upahDibayar']; $totalpembiayaanteller += $item['pinjaman']; @endphp + @php $totalbayaran += $item['upahDibayar']; $totalpembiayaan += $item['pinjaman']; @endphp @if($index > 0) @if($item['teller'] != $advansur[$index - 1]['teller']) @@ -242,32 +242,30 @@ @php $counter = 1;$totalpembiayaanteller = 0; $totalbayaranteller = 0; @endphp @endif - - + @php $counter++; @endphp + @php $totalbayaranteller += $item['upahDibayar']; $totalpembiayaanteller += $item['pinjaman']; @endphp @if($index+1 < sizeof($advansur)) @if($item['teller'] != $advansur[$index + 1]['teller']) - + - @php @endphp @endif @else - + - @endif From 9a55bb3587995a49f6ecdafc4908d9083bbd2c25 Mon Sep 17 00:00:00 2001 From: fifi97 Date: Wed, 7 Jul 2021 09:14:25 +0800 Subject: [PATCH 10/27] hapus panjar --- app/Http/Controllers/KhazanahController.php | 219 +++++++++++++++++- resources/views/khazanah/panjar.blade.php | 26 ++- .../khazanah/pendahuluanserahanmain.blade.php | 36 ++- 3 files changed, 272 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index 2ad82e5..b566519 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -798,12 +798,227 @@ class KhazanahController extends Controller $updateVault = Http::put( config('api.url').'/api/UpdateVault/Panjar/'.$auth_user['cawangan'],[ 'totpanjar'=>$request->bayaran - ]); + ]); + + $panjareach = Http::get( config('api.url') .'/api/SenaraiPanjar/listeach/'. $auth_user['cawangan'],['nobaucer' => $request->baucer])->json(); + + $recnopanjar = $panjareach['recno']; + + $rekodsen1 -= intval($request->ambilansen1); + $rekodsen5 -= intval($request->ambilansen5); + $rekodsen10 -= intval($request->ambilansen10); + $rekodsen20 -= intval($request->ambilansen20); + $rekodsen50 -= intval($request->ambilansen50); + + $rekodring1 -= intval($request->ambilanring1); + $rekodring5 -= intval($request->ambilanring5); + $rekodring10 -= intval($request->ambilanring10); + $rekodring20 -= intval($request->ambilanring20); + $rekodring50 -= intval($request->ambilanring50); + $rekodring100 -= intval($request->ambilanring100); + + $denopanjar = Http::post(config('api.url').'/api/requestdenopanjar/'.$auth_user['cawangan'],[ + 'kodlaluan' => $auth_user['name'], + 'serahan' => floatval($request->bayaran), + 'bd1' => 0, + 'bd5' => 0, + 'bd10' => 0, + 'bd20' => 0, + 'bd50' => 0, + 'bd100' => 0, + 'txtring1' => intval($request->ambilanring1), + 'txtring5' => intval($request->ambilanring5), + 'txtring10' => intval($request->ambilanring10), + 'txtring20' => intval($request->ambilanring20), + 'txtring50' => intval($request->ambilanring50), + 'txtring100' => intval($request->ambilanring100), + 'txtring1000' => 0, + 'txtsen1' => intval($request->ambilansen1), + 'txtsen5' => intval($request->ambilansen5), + 'txtsen10' => intval($request->ambilansen10), + 'txtsen20' => intval($request->ambilansen20), + 'txtsen50' => intval($request->ambilansen50), + 'jenis' => $request->jenismodal, + 'recno' => intval($recnopanjar) + ]); + + dd($denopanjar->getStatusCode()); + $upVault = $updateVault->getStatusCode(); + $upDeno = $denominasicreate->getStatusCode(); + $updenopanjar = $denopanjar->getStatusCode(); + + if($upVault == 200 && empty($panjar) == false && $upDeno == 200 && $updenopanjar == 200) + { + if($request->jenismodal === 'perubatan') + { + $listUser=User::where('name','=',$request->tuntutan)->get(); + + $totalsebenar = floatval($listUser[0]->perubatan) - floatval($request->bayaran); + + $overrideuser = User::where('cawangan','=',$auth_user['cawangan']) + ->where('name','=',$request->tuntutan) + ->update(array( + 'perubatan' => $totalsebenar + )); + } + + return redirect('/panjar')->with('messageinformation','Panjar Berjaya Disimpan.'); + }else{ + return redirect('/panjar')->with('messageinformation','Panjar Mengalami Masalah Untuk Disimpan.'); + } + + return response($updateVault); + } + + public function deletepanjar(Request $request) + { + $auth_user = Auth::user(); + $api_url = config('api.url'); + $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); + + $bakiperubatan = 0; + + switch ($request->jenismodal) { + case "selenggara": + $kategori = "Baiki dan Selenggara"; + $tag = 2; + break; + case "keraian": + $kategori = "Keraian & Promosi"; + $tag = 3; + break; + case "belanjaam": + $kategori = "Belanja AM"; + $tag = 1; + break; + case "perubatan": + $kategori = "Belanja AM - Perubatan"; + $tag = 1; + break; + case "dapur": + $kategori = "Belanja AM - Barangan Dapur"; + $tag = 1; + break; + case "pos": + $kategori = "Belanja AM - Postage"; + $tag = 1; + break; + } + + $denominasilist = Http::get( config('api.url') .'/api/DenominasiController/'. $auth_user['cawangan'])->json(); + + //bundle initialize + $rekodb1 = $denominasilist[0]['bd1']; $rekodb5 = $denominasilist[0]['bd5']; $rekodb10 = $denominasilist[0]['bd10']; $rekodb20 = $denominasilist[0]['bd20']; + $rekodb50 = $denominasilist[0]['bd50']; $rekodb100 = $denominasilist[0]['bd100']; + + //wang Syilling Initialize + $rekodsen1 = $denominasilist[0]['txtsen1']; $rekodsen5 = $denominasilist[0]['txtsen5']; $rekodsen10 = $denominasilist[0]['txtsen10']; + $rekodsen20 = $denominasilist[0]['txtsen20']; $rekodsen50 = $denominasilist[0]['txtsen50']; + + //Wang Ringgit Initialize + $rekodring1 = $denominasilist[0]['txtring1']; $rekodring5 = $denominasilist[0]['txtring5']; $rekodring10 = $denominasilist[0]['txtring10']; + $rekodring20 = $denominasilist[0]['txtring20']; $rekodring50 = $denominasilist[0]['txtring50']; $rekodring100 = $denominasilist[0]['txtring100']; + + //Tolok Rekod + $rekodsen1 += intval($request->ambilansen1); + $rekodsen5 += intval($request->ambilansen5); + $rekodsen10 += intval($request->ambilansen10); + $rekodsen20 += intval($request->ambilansen20); + $rekodsen50 += intval($request->ambilansen50); + + $rekodring1 += intval($request->ambilanring1); + $rekodring5 += intval($request->ambilanring5); + $rekodring10 += intval($request->ambilanring10); + $rekodring20 += intval($request->ambilanring20); + $rekodring50 += intval($request->ambilanring50); + $rekodring100 += intval($request->ambilanring100); + + $denominasicreate = Http::put(config('api.url').'/api/DenominasiUpdate/'.$auth_user['cawangan'],[ + 'bd1' => $rekodb1, + 'bd5'=> $rekodb5, + 'bd10'=> $rekodb10, + 'bd20'=> $rekodb20, + 'bd50'=> $rekodb50, + 'bd100'=> $rekodb100, + 'txtring1'=> $rekodring1, + 'txtring5'=> $rekodring5, + 'txtsen1'=> $rekodsen1, + 'txtsen5'=> $rekodsen5, + 'txtsen10'=> $rekodsen10, + 'txtsen20'=> $rekodsen20, + 'txtsen50'=> $rekodsen50, + 'txtring10'=> $rekodring10, + 'txtring20'=> $rekodring20, + 'txtring50'=> $rekodring50, + 'txtring100'=> $rekodring100, + 'txtring1000'=> "0", + 'jumlahbundle'=> "0", + 'txtjumlah'=> "0", + 'jumlahkeping' => "0" + ]); + + $myDateTime = DateTime::createFromFormat('Y-m-d', $request->tarikhbil); + $tarikhbil = $myDateTime->format('dmY'); + + $panjar = Http::post(config('api.url') . '/api/CreatePanjar/'. $auth_user['cawangan'],[ + 'deskripsi' => $request->deskripsi, + 'bayaran' => $request->bayaran, + 'tag' => $tag, + 'kategori' => $kategori, + 'id' => $auth_user['name'], + 'bakiperubatan' => $bakiperubatan, + 'nobaucer' => $request->baucer, + 'nobil' => $tarikhbil, + 'tuntutoleh' => $request->tuntutan + ])->json(); + + $updateVault = Http::put( config('api.url').'/api/UpdateVault/Panjar/'.$auth_user['cawangan'],[ + 'totpanjar'=>$request->bayaran + ]); + + $rekodsen1 -= intval($request->ambilansen1); + $rekodsen5 -= intval($request->ambilansen5); + $rekodsen10 -= intval($request->ambilansen10); + $rekodsen20 -= intval($request->ambilansen20); + $rekodsen50 -= intval($request->ambilansen50); + + $rekodring1 -= intval($request->ambilanring1); + $rekodring5 -= intval($request->ambilanring5); + $rekodring10 -= intval($request->ambilanring10); + $rekodring20 -= intval($request->ambilanring20); + $rekodring50 -= intval($request->ambilanring50); + $rekodring100 -= intval($request->ambilanring100); + + $denopanjar = Http::post(config('api.url').'/api/requestdenopanjar/'.$auth_user['cawangan'],[ + 'kodlaluan' => $auth_user['name'], + 'serahan' => $request->bayaran, + 'bd1' => 0, + 'bd5' => 0, + 'bd10' => 0, + 'bd20' => 0, + 'bd50' => 0, + 'bd100' => 0, + 'txtring1' => $request->ambilanring1, + 'txtring5' => $request->ambilanring5, + 'txtring10' => $request->ambilanring10, + 'txtring20' => $request->ambilanring20, + 'txtring50' => $request->ambilanring50, + 'txtring100' => $request->ambilanring100, + 'txtring1000' => 0, + 'txtsen1' => $request->ambilansen1, + 'txtsen5' => $request->ambilansen5, + 'txtsen10' => $request->ambilansen10, + 'txtsen20' => $request->ambilansen20, + 'txtsen50' => $request->ambilansen50, + 'jenis' => $request->jenismodal, + 'recno' => $recnopanjar + ]); $upVault = $updateVault->getStatusCode(); $upDeno = $denominasicreate->getStatusCode(); + $updenopanjar = $denopanjar->getStatusCode(); - if($upVault == 200 && empty($panjar) == false && $upDeno == 200) + if($upVault == 200 && empty($panjar) == false && $upDeno == 200 && $updenopanjar == 200) { if($request->jenismodal === 'perubatan') { diff --git a/resources/views/khazanah/panjar.blade.php b/resources/views/khazanah/panjar.blade.php index 64ff61a..994eaf8 100644 --- a/resources/views/khazanah/panjar.blade.php +++ b/resources/views/khazanah/panjar.blade.php @@ -71,6 +71,7 @@ +
Tarikh No Rujukan TellerPinjamanJBGUpah DibayarTempohPembiayaan (RM)Upah Dibayar (RM)
{{ $counter }} {{ $item['tarikh'] }} {{ $item['norujukan'] }} {{ $item['teller'] }}{{ number_format($item['pinjaman'],2) }} {{ $item['jbg'] }}{{ number_format($item['pinjaman'],2) }} {{ number_format($item['upahDibayar'],2) }}
{{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }}{{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} {{ number_format($totalpembiayaanteller,2) }} {{ number_format($totalbayaranteller,2) }}
{{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }}{{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} {{ number_format($totalpembiayaanteller,2) }} {{ number_format($totalbayaranteller,2) }}
deskripsi kategori bayarantindakan
@@ -161,7 +162,8 @@ panjar['tarikh'], panjar['deskripsi'], panjar['kategori'], - panjar['bayaran'] + panjar['bayaran'], + '' ]).draw(); counter = counter + 1; @@ -169,6 +171,28 @@ } + function deletepanjar() + { + Swal.fire({ + title: 'Adakah anda pasti?', + text: "Anda tidak dapat untuk mengembalinya kembali!", + icon: 'warning', + showCancelButton: true, + cancelButtonText: "Batal", + confirmButtonColor: '#3085d6', + cancelButtonColor: '#d33', + confirmButtonText: 'Teruskan!' + }).then((result) => { + if (result.isConfirmed) { + Swal.fire( + 'Deleted!', + 'Your file has been deleted.', + 'success' + ) + } + }); + } + function caritarikh() { let mula = $('#mula').val(); diff --git a/resources/views/khazanah/pendahuluanserahanmain.blade.php b/resources/views/khazanah/pendahuluanserahanmain.blade.php index c99617f..d21f6f3 100644 --- a/resources/views/khazanah/pendahuluanserahanmain.blade.php +++ b/resources/views/khazanah/pendahuluanserahanmain.blade.php @@ -29,16 +29,18 @@ Description Pendahuluan (RM) Serahan (RM) + Tindakan @foreach ($listgldetail as $gldetail) - - {{ $gldetail['tarikh'] }} - {{ $gldetail['descpt'] }} - {{ ($gldetail['pendahuluan'] == 0 && ($gldetail['ktacct'] == '7000/102' || $gldetail['ktacct'] == '7000/106')) ? number_format($gldetail['amaun'],2) : number_format($gldetail['pendahuluan'],2) }} - {{ ($gldetail['serahan'] == 0 && ($gldetail['dtacct'] == '1000/026' || $gldetail['dtacct'] == '1000/020' || $gldetail['dtacct'] == '1000/090')) ? number_format($gldetail['amaun'],2) : number_format($gldetail['serahan'],2) }} - + + {{ $gldetail['tarikh'] }} + {{ $gldetail['descpt'] }} + {{ ($gldetail['pendahuluan'] == 0 && ($gldetail['ktacct'] == '7000/102' || $gldetail['ktacct'] == '7000/106')) ? number_format($gldetail['amaun'],2) : number_format($gldetail['pendahuluan'],2) }} + {{ ($gldetail['serahan'] == 0 && ($gldetail['dtacct'] == '1000/026' || $gldetail['dtacct'] == '1000/020' || $gldetail['dtacct'] == '1000/090')) ? number_format($gldetail['amaun'],2) : number_format($gldetail['serahan'],2) }} + + @endforeach @@ -110,6 +112,28 @@ }); + function deletependser() + { + Swal.fire({ + title: 'Adakah anda pasti?', + text: "Anda tidak dapat untuk mengembalinya kembali!", + icon: 'warning', + showCancelButton: true, + cancelButtonText: "Batal", + confirmButtonColor: '#3085d6', + cancelButtonColor: '#d33', + confirmButtonText: 'Teruskan!' + }).then((result) => { + if (result.isConfirmed) { + Swal.fire( + 'Deleted!', + 'Your file has been deleted.', + 'success' + ) + } + }); + } + function validateformat(evt) { var charCode = (evt.which) ? evt.which : event.keyCode From 40d426b7334a157c16728f50f656e2d2dbc44166 Mon Sep 17 00:00:00 2001 From: MUHD HAFIFIE Date: Wed, 7 Jul 2021 16:37:45 +0800 Subject: [PATCH 11/27] laporan fix --- app/Http/Controllers/KhazanahController.php | 69 +++++-------------- .../views/khazanah/laporan/petibesi.blade.php | 6 ++ resources/views/khazanah/panjar.blade.php | 6 +- .../views/print/laporan_penebusan.blade.php | 4 +- .../views/print/laporan_petibesi.blade.php | 4 +- .../print/laporan_ringkasanharian.blade.php | 4 +- .../laporan_ringkasanterkumpulv2.blade.php | 6 +- 7 files changed, 39 insertions(+), 60 deletions(-) diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index b566519..a204c0f 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -842,7 +842,6 @@ class KhazanahController extends Controller 'recno' => intval($recnopanjar) ]); - dd($denopanjar->getStatusCode()); $upVault = $updateVault->getStatusCode(); $upDeno = $denominasicreate->getStatusCode(); $updenopanjar = $denopanjar->getStatusCode(); @@ -864,6 +863,7 @@ class KhazanahController extends Controller return redirect('/panjar')->with('messageinformation','Panjar Berjaya Disimpan.'); }else{ + return redirect('/panjar')->with('messageinformation','Panjar Mengalami Masalah Untuk Disimpan.'); } @@ -876,34 +876,9 @@ class KhazanahController extends Controller $api_url = config('api.url'); $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); - $bakiperubatan = 0; + + $denopanjar = Http::get( config('api.url') .'/api/requestdenopanjar/get/'. $auth_user['cawangan'],['recno' => $request->recno ])->json(); - switch ($request->jenismodal) { - case "selenggara": - $kategori = "Baiki dan Selenggara"; - $tag = 2; - break; - case "keraian": - $kategori = "Keraian & Promosi"; - $tag = 3; - break; - case "belanjaam": - $kategori = "Belanja AM"; - $tag = 1; - break; - case "perubatan": - $kategori = "Belanja AM - Perubatan"; - $tag = 1; - break; - case "dapur": - $kategori = "Belanja AM - Barangan Dapur"; - $tag = 1; - break; - case "pos": - $kategori = "Belanja AM - Postage"; - $tag = 1; - break; - } $denominasilist = Http::get( config('api.url') .'/api/DenominasiController/'. $auth_user['cawangan'])->json(); @@ -920,18 +895,18 @@ class KhazanahController extends Controller $rekodring20 = $denominasilist[0]['txtring20']; $rekodring50 = $denominasilist[0]['txtring50']; $rekodring100 = $denominasilist[0]['txtring100']; //Tolok Rekod - $rekodsen1 += intval($request->ambilansen1); - $rekodsen5 += intval($request->ambilansen5); - $rekodsen10 += intval($request->ambilansen10); - $rekodsen20 += intval($request->ambilansen20); - $rekodsen50 += intval($request->ambilansen50); + $rekodsen1 += intval($denopanjar['txtsen1']); + $rekodsen5 += intval($denopanjar['txtsen5']); + $rekodsen10 += intval($denopanjar['txtsen10']); + $rekodsen20 += intval($denopanjar['txtsen20']); + $rekodsen50 += intval($denopanjar['txtsen50']); - $rekodring1 += intval($request->ambilanring1); - $rekodring5 += intval($request->ambilanring5); - $rekodring10 += intval($request->ambilanring10); - $rekodring20 += intval($request->ambilanring20); - $rekodring50 += intval($request->ambilanring50); - $rekodring100 += intval($request->ambilanring100); + $rekodring1 += intval($denopanjar['txtring1']); + $rekodring5 += intval($denopanjar['txtring5']); + $rekodring10 += intval($denopanjar['txtring10']); + $rekodring20 += intval($denopanjar['txtring20']); + $rekodring50 += intval($denopanjar['txtring50']); + $rekodring100 += intval($denopanjar['txtring100']); $denominasicreate = Http::put(config('api.url').'/api/DenominasiUpdate/'.$auth_user['cawangan'],[ 'bd1' => $rekodb1, @@ -960,20 +935,12 @@ class KhazanahController extends Controller $myDateTime = DateTime::createFromFormat('Y-m-d', $request->tarikhbil); $tarikhbil = $myDateTime->format('dmY'); - $panjar = Http::post(config('api.url') . '/api/CreatePanjar/'. $auth_user['cawangan'],[ - 'deskripsi' => $request->deskripsi, - 'bayaran' => $request->bayaran, - 'tag' => $tag, - 'kategori' => $kategori, - 'id' => $auth_user['name'], - 'bakiperubatan' => $bakiperubatan, - 'nobaucer' => $request->baucer, - 'nobil' => $tarikhbil, - 'tuntutoleh' => $request->tuntutan + $deletepanjar = Http::post(config('api.url') . '/api/DeletePanjar/'. $auth_user['cawangan'],[ + 'recno' => $request->recno ])->json(); - $updateVault = Http::put( config('api.url').'/api/UpdateVault/Panjar/'.$auth_user['cawangan'],[ - 'totpanjar'=>$request->bayaran + $updateVault = Http::put( config('api.url').'/api/UpdateVault/DeletePanjar/'.$auth_user['cawangan'],[ + 'totpanjar'=>$$denopanjar['serahan'] ]); $rekodsen1 -= intval($request->ambilansen1); diff --git a/resources/views/khazanah/laporan/petibesi.blade.php b/resources/views/khazanah/laporan/petibesi.blade.php index a9ad8da..0d53d0e 100644 --- a/resources/views/khazanah/laporan/petibesi.blade.php +++ b/resources/views/khazanah/laporan/petibesi.blade.php @@ -44,6 +44,12 @@ var api_url = ""; var kodcaw = ""; + $(document).ready( function () { + $('#datetimepicker1').datepicker({ + format: 'dd-mm-yyyy' + }); + }); + var tablecustomers = $('#myTable').DataTable({ "ordering": false }); diff --git a/resources/views/khazanah/panjar.blade.php b/resources/views/khazanah/panjar.blade.php index 994eaf8..c7559dd 100644 --- a/resources/views/khazanah/panjar.blade.php +++ b/resources/views/khazanah/panjar.blade.php @@ -163,7 +163,7 @@ panjar['deskripsi'], panjar['kategori'], panjar['bayaran'], - '' + '' ]).draw(); counter = counter + 1; @@ -171,8 +171,10 @@ } - function deletepanjar() + function deletepanjar(e) { + let rec_no = $(e).data('recno'); + Swal.fire({ title: 'Adakah anda pasti?', text: "Anda tidak dapat untuk mengembalinya kembali!", diff --git a/resources/views/print/laporan_penebusan.blade.php b/resources/views/print/laporan_penebusan.blade.php index 2901ae9..22233e7 100644 --- a/resources/views/print/laporan_penebusan.blade.php +++ b/resources/views/print/laporan_penebusan.blade.php @@ -322,8 +322,8 @@ Not Applicable - {{ $upahlama['bil'] }} - Ansuran + {{ $ansuran['bilangan'] }} + Ansuran Pembiayaan {{ number_format($ansuran['totalpendahuluan'],2) }} {{ number_format($ansuran['totalkeuntungan'],2) }} Not Applicable diff --git a/resources/views/print/laporan_petibesi.blade.php b/resources/views/print/laporan_petibesi.blade.php index e104350..ccea30e 100644 --- a/resources/views/print/laporan_petibesi.blade.php +++ b/resources/views/print/laporan_petibesi.blade.php @@ -211,7 +211,7 @@ TOLAK - Serahan Kepada Teller + Pendahuluan Kepada Teller : RM {{ number_format($petibesi['keluar'],2) }} @@ -226,7 +226,7 @@ TAMBAH - Pendahuluan Daripada Teller + Serahan Daripada Teller : RM {{ number_format($petibesi['masuk'],2) }} diff --git a/resources/views/print/laporan_ringkasanharian.blade.php b/resources/views/print/laporan_ringkasanharian.blade.php index c156367..f422965 100644 --- a/resources/views/print/laporan_ringkasanharian.blade.php +++ b/resources/views/print/laporan_ringkasanharian.blade.php @@ -191,8 +191,10 @@

G) BAYAR BAKI LELONG

-
RM
+
1. BAKI LELONG
{{ 'RM '. number_format($laporan['bayar_baki_lelong'],2) }}
+
2. RUGI LELONG
+
{{ 'RM '. number_format($laporan['bayar_rugi_lelong'],2) }}
diff --git a/resources/views/print/laporan_ringkasanterkumpulv2.blade.php b/resources/views/print/laporan_ringkasanterkumpulv2.blade.php index f294468..5a1adf5 100644 --- a/resources/views/print/laporan_ringkasanterkumpulv2.blade.php +++ b/resources/views/print/laporan_ringkasanterkumpulv2.blade.php @@ -114,8 +114,10 @@

G) BAYAR BAKI LELONG

-
RM
-
+
1. BAKI LELONG
+
{{ 'RM '. number_format($laporan['bayar_baki_lelong'],2) }}
+
2. RUGI LELONG
+
{{ 'RM '. number_format($laporan['bayar_rugi_lelong'],2) }}
From a4559f01804809d7587a7cd65210008c8085bdd3 Mon Sep 17 00:00:00 2001 From: Afiq Zakwan Date: Thu, 8 Jul 2021 09:09:51 +0800 Subject: [PATCH 12/27] cron job --- app/Console/Commands/ResetRoleAsal.php | 50 ++++++++++++++++++++++++++ app/Console/Kernel.php | 2 ++ 2 files changed, 52 insertions(+) create mode 100644 app/Console/Commands/ResetRoleAsal.php diff --git a/app/Console/Commands/ResetRoleAsal.php b/app/Console/Commands/ResetRoleAsal.php new file mode 100644 index 0000000..c655d20 --- /dev/null +++ b/app/Console/Commands/ResetRoleAsal.php @@ -0,0 +1,50 @@ +$user_kaunter){ + $user = User::find($user_kaunter->id); + if($user->cawangan != 'operasi'){ + $user->roles = $user->role_asal; + $user->save(); + } + } + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 878ce50..f3bc79a 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -16,6 +16,7 @@ class Kernel extends ConsoleKernel Commands\resetRoleDaily::class, Commands\updateJbg::class, Commands\updateOnline::class, + Commands\ResetRoleAsal::class, ]; /** @@ -28,6 +29,7 @@ class Kernel extends ConsoleKernel { $schedule->command('reset:dailyrole')->daily()->timezone('Asia/Kuala_Lumpur')->at('00:01'); $schedule->command('update:jbg')->daily()->timezone('Asia/Kuala_Lumpur')->at('00:01'); + $schedule->command('reset:roleasal')->daily()->timezone('Asia/Kuala_Lumpur')->at('00:01'); $schedule->command('update:online')->daily()->timezone('Asia/Kuala_Lumpur')->everyFifteenMinutes(); } From 0f24f93cca19d7feefc5b06b897ebce3917bcda0 Mon Sep 17 00:00:00 2001 From: Afiq Zakwan Date: Thu, 8 Jul 2021 10:04:30 +0800 Subject: [PATCH 13/27] profile page --- app/Http/Controllers/UserController.php | 6 ++- resources/views/user/index.blade.php | 19 ++++++---- resources/views/user/index_operasi.blade.php | 40 ++++++++++++++++++++ routes/web.php | 7 ---- 4 files changed, 57 insertions(+), 15 deletions(-) create mode 100644 resources/views/user/index_operasi.blade.php diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 639d36a..4d12ad2 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -18,6 +18,10 @@ class UserController extends Controller $api_url = config('api.url'); $auth_user = Auth::user(); $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); - return view('user.index',compact('cawangan_info','api_url')); + if($auth_user->roles == 'teller' || $auth_user->roles == 'ppc' || $auth_user->roles == 'pc'){ + return view('user.index',compact('cawangan_info','api_url','auth_user')); + }else{ + return view('user.index_operasi',compact('cawangan_info','api_url','auth_user')); + } } } diff --git a/resources/views/user/index.blade.php b/resources/views/user/index.blade.php index 2c82218..f81933b 100644 --- a/resources/views/user/index.blade.php +++ b/resources/views/user/index.blade.php @@ -4,25 +4,30 @@
-

maklumat pengguna

+
-
+
NAMA
-
+
NO TELEFON
-
+
-
+
NO KP
-
+
JAWATAN
-
+
diff --git a/resources/views/user/index_operasi.blade.php b/resources/views/user/index_operasi.blade.php new file mode 100644 index 0000000..cf6d494 --- /dev/null +++ b/resources/views/user/index_operasi.blade.php @@ -0,0 +1,40 @@ +@extends('layouts.app_operasi') + +@section('content') +
+
+
+ +
+
+
+
+
+
+
NAMA
+
+
NO TELEFON
+
+
+
+
+
+
NO KP
+
+
JAWATAN
+
+
+
+
+
+
+
+
+
+
+@endsection \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 72fa756..b6ec2e8 100644 --- a/routes/web.php +++ b/routes/web.php @@ -34,13 +34,6 @@ Route::get('test', function () { return "event test je"; }); -// Route::get('resitbiasa', function () { - - - - -// }); - Route::get('logs', '\Rap2hpoutre\LaravelLogViewer\LogViewerController@index'); Route::get('/welcome',function(){ From f5b8484cd1f001a0b26e8470be8e6800acaf8b9c Mon Sep 17 00:00:00 2001 From: fifi97 Date: Thu, 8 Jul 2021 10:42:49 +0800 Subject: [PATCH 14/27] fix panjar --- app/Http/Controllers/KhazanahController.php | 81 ++++----------------- resources/views/khazanah/panjar.blade.php | 37 ++++++++-- routes/web.php | 1 + 3 files changed, 46 insertions(+), 73 deletions(-) diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index a204c0f..bc03e26 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -876,9 +876,10 @@ class KhazanahController extends Controller $api_url = config('api.url'); $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); + $denopanjar = Http::get( config('api.url') .'/api/getdenopanjar/'. $auth_user['cawangan'],['recno' => $request->recno])->json(); - $denopanjar = Http::get( config('api.url') .'/api/requestdenopanjar/get/'. $auth_user['cawangan'],['recno' => $request->recno ])->json(); - + if(sizeof($denopanjar) > 0) + $denopanjar = $denopanjar[0]; $denominasilist = Http::get( config('api.url') .'/api/DenominasiController/'. $auth_user['cawangan'])->json(); @@ -932,80 +933,24 @@ class KhazanahController extends Controller 'jumlahkeping' => "0" ]); - $myDateTime = DateTime::createFromFormat('Y-m-d', $request->tarikhbil); - $tarikhbil = $myDateTime->format('dmY'); - $deletepanjar = Http::post(config('api.url') . '/api/DeletePanjar/'. $auth_user['cawangan'],[ 'recno' => $request->recno ])->json(); $updateVault = Http::put( config('api.url').'/api/UpdateVault/DeletePanjar/'.$auth_user['cawangan'],[ - 'totpanjar'=>$$denopanjar['serahan'] + 'totpanjar'=>$denopanjar['serahan'] ]); - $rekodsen1 -= intval($request->ambilansen1); - $rekodsen5 -= intval($request->ambilansen5); - $rekodsen10 -= intval($request->ambilansen10); - $rekodsen20 -= intval($request->ambilansen20); - $rekodsen50 -= intval($request->ambilansen50); - - $rekodring1 -= intval($request->ambilanring1); - $rekodring5 -= intval($request->ambilanring5); - $rekodring10 -= intval($request->ambilanring10); - $rekodring20 -= intval($request->ambilanring20); - $rekodring50 -= intval($request->ambilanring50); - $rekodring100 -= intval($request->ambilanring100); - - $denopanjar = Http::post(config('api.url').'/api/requestdenopanjar/'.$auth_user['cawangan'],[ - 'kodlaluan' => $auth_user['name'], - 'serahan' => $request->bayaran, - 'bd1' => 0, - 'bd5' => 0, - 'bd10' => 0, - 'bd20' => 0, - 'bd50' => 0, - 'bd100' => 0, - 'txtring1' => $request->ambilanring1, - 'txtring5' => $request->ambilanring5, - 'txtring10' => $request->ambilanring10, - 'txtring20' => $request->ambilanring20, - 'txtring50' => $request->ambilanring50, - 'txtring100' => $request->ambilanring100, - 'txtring1000' => 0, - 'txtsen1' => $request->ambilansen1, - 'txtsen5' => $request->ambilansen5, - 'txtsen10' => $request->ambilansen10, - 'txtsen20' => $request->ambilansen20, - 'txtsen50' => $request->ambilansen50, - 'jenis' => $request->jenismodal, - 'recno' => $recnopanjar - ]); - $upVault = $updateVault->getStatusCode(); $upDeno = $denominasicreate->getStatusCode(); - $updenopanjar = $denopanjar->getStatusCode(); - if($upVault == 200 && empty($panjar) == false && $upDeno == 200 && $updenopanjar == 200) + if($upVault == 200 && $upDeno == 200) { - if($request->jenismodal === 'perubatan') - { - $listUser=User::where('name','=',$request->tuntutan)->get(); - - $totalsebenar = floatval($listUser[0]->perubatan) - floatval($request->bayaran); - - $overrideuser = User::where('cawangan','=',$auth_user['cawangan']) - ->where('name','=',$request->tuntutan) - ->update(array( - 'perubatan' => $totalsebenar - )); - } - - return redirect('/panjar')->with('messageinformation','Panjar Berjaya Disimpan.'); + return 'berjaya'; }else{ - return redirect('/panjar')->with('messageinformation','Panjar Mengalami Masalah Untuk Disimpan.'); + dd($upVault,$upDeno); + return 'gagal'; } - - return response($updateVault); } public function pendahuluan() @@ -2778,10 +2723,10 @@ class KhazanahController extends Controller array_push($Debit,['glcode' => '1000/041','descpt' => 'Bayaran Pendahuluan','amaun' => 0.00]); array_push($Debit,['glcode' => '1000/241','descpt' => 'Rebet','amaun' => ($rebet)]); array_push($Debit,['glcode' => '1000/211','descpt' => 'Keuntungan Tertangguh', 'amaun' => $keuntungan]); - array_push($Debit,['glcode' => '1000/020','descpt' => 'Serahan Kepada HQ', 'amaun' => $imbangduga['serahan']]); - array_push($Debit,['glcode' => '3000/017','descpt' => 'PANJAR - Baiki dan Selenggara','amaun' => $panjar['bds']]); - array_push($Debit,['glcode' => '3000/018','descpt' => 'PANJAR - Belanja AM','amaun' => $panjar['perubatan']]); - array_push($Debit,['glcode' => '3000/019','descpt' => 'PANJAR - Keraian Dan Promosi','amaun' => $panjar['keraian']]); + if($imbangduga['serahan'] > 0) array_push($Debit,['glcode' => '1000/020','descpt' => 'Serahan Kepada HQ', 'amaun' => $imbangduga['serahan']]); + if($panjar['bds'] > 0) array_push($Debit,['glcode' => '3000/017','descpt' => 'PANJAR - Baiki dan Selenggara','amaun' => $panjar['bds']]); + if($panjar['perubatan'] > 0) array_push($Debit,['glcode' => '3000/018','descpt' => 'PANJAR - Belanja AM','amaun' => $panjar['perubatan']]); + if($panjar['keraian'] > 0) array_push($Debit,['glcode' => '3000/019','descpt' => 'PANJAR - Keraian Dan Promosi','amaun' => $panjar['keraian']]); // // if($penghutangkaki > 0) array_push($Debit,['glcode' => '1000/011','descpt' => 'Penghutang Kakitangan', 'amaun' => $penghutangkaki]); // //array_push($Debit,['glcode' => '1000/045','descpt' => 'Serahan Bayaran Online', 'amaun' => 0.00]); @@ -2811,7 +2756,7 @@ class KhazanahController extends Controller array_push($Kredit,['glcode' => '5000/211','descpt' => 'Keuntungan Tergantung', 'amaun' => $keuntungan]); array_push($Kredit,['glcode' => '5000/013','descpt' => 'Upah Simpan','amaun' => $keuntungansebenar]); array_push($Kredit,['glcode' => '5000/007','descpt' => 'Keuntungan Semasa', 'amaun' => $untungrugi]); - array_push($Kredit,['glcode' => '7000/102','descpt' => 'Pendahuluan Daripada HQ','amaun' => $imbangduga['pendahuluan']]); + if($imbangduga['pendahuluan'] > 0) array_push($Kredit,['glcode' => '7000/102','descpt' => 'Pendahuluan Daripada HQ','amaun' => $imbangduga['pendahuluan']]); $TotalKredit = $TotalTunaiDebit + $pinjamandiberi['Tebus'] + $pembiayaantawarruq['Tebus'] + $rebet + $keuntungan + $keuntungansebenar + $untungrugi + $bayaranpendahuluan + $imbangduga['pendahuluan']; diff --git a/resources/views/khazanah/panjar.blade.php b/resources/views/khazanah/panjar.blade.php index c7559dd..3efcaaf 100644 --- a/resources/views/khazanah/panjar.blade.php +++ b/resources/views/khazanah/panjar.blade.php @@ -186,11 +186,38 @@ confirmButtonText: 'Teruskan!' }).then((result) => { if (result.isConfirmed) { - Swal.fire( - 'Deleted!', - 'Your file has been deleted.', - 'success' - ) + + $.ajax({ + method: 'post', + url: '{{ route("khazanah.deletepanjar") }}', + data: { + "_token": "{{ csrf_token() }}", + 'recno' : rec_no + }, + success:function(data){ + + if(data === 'berjaya') + { + Swal.fire( + 'Deleted!', + 'Your file has been deleted.', + 'success' + ) + }else{ + Swal.fire( + 'Tidak Berjaya!', + 'Data tidak berjaya dihapuskan.', + 'error' + ) + } + + } + }); + + + + + } }); } diff --git a/routes/web.php b/routes/web.php index a783457..eb9ecc0 100644 --- a/routes/web.php +++ b/routes/web.php @@ -161,6 +161,7 @@ Route::put('/updatekelulusan',['as'=>'khazanah.updatekelulusan','uses'=>'Khazana Route::get('/mintasemulakelulusan',['as'=>'khazanah.getmintasemulakelulusan','uses'=>'KhazanahController@mintakatalaluansemula'])->middleware('auth','khazanah'); Route::get('/mintasemulakelulusan/operasi',['as'=>'operasi.getmintasemulakelulusan','uses'=>'OperasiController@mintakatalaluansemula'])->middleware('auth','operasi'); Route::post('/createpanjar',['as'=>'khazanah.createpanjar','uses'=>'KhazanahController@createpanjar'])->middleware('auth','khazanah'); +Route::post('/deletepanjar',['as'=>'khazanah.deletepanjar','uses'=>'KhazanahController@deletepanjar'])->middleware('auth','khazanah'); Route::get('/gadaian/edit/{norujukan}',['as'=>'gadaian.edit','uses'=>'GadaianController@edit'])->middleware('auth','teller'); Route::post('/gadai/edit/store',['as'=>'gadai.editstore','uses'=>'GadaianController@editstore'])->middleware('auth','teller'); Route::put('/gadai/edit/deletemarhun',['as'=>'gadai.editmarhun','uses'=>'GadaianController@editmarhun'])->middleware('auth','teller'); From 46a6be86139ef0cb617bf1495501556e01086175 Mon Sep 17 00:00:00 2001 From: "e.arrahn" Date: Thu, 8 Jul 2021 12:20:41 +0800 Subject: [PATCH 15/27] server --- app/Http/Controllers/KhazanahController.php | 11 ++++--- resources/views/customers/info.blade.php | 2 +- resources/views/lelongan/index.blade.php | 35 ++++++++++++++++++++- resources/views/penebusan/index.blade.php | 6 ++-- 4 files changed, 45 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index 07abd1c..3b9093e 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -1401,10 +1401,10 @@ class KhazanahController extends Controller $current = Carbon::now(); $current = new Carbon(); $tarikh_cetak = $current->toDateString(); - if($request->datetimepicker1 == null){ + if($request->datetarikh == null){ $gadai_date = $current->toDateString(); }else{ - $split_date = explode('-',$request->datetimepicker1); + $split_date = explode('-',$request->datetarikh); $gadai_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0]; } $gadai = Http::get(config('api.url'). '/api/gadai/laporan/'. $auth_user['cawangan'] .'/'. $gadai_date)->json(); @@ -1428,10 +1428,10 @@ class KhazanahController extends Controller $current = Carbon::now(); $current = new Carbon(); $tarikh_cetak = $current->toDateString(); - if($request->datetimepicker1 == null){ + if($request->datetarikh == null){ $tebus_date = $current->toDateString(); }else{ - $split_date = explode('-',$request->datetimepicker1); + $split_date = explode('-',$request->datetarikh); $tebus_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0]; } $tebus = Http::get(config('api.url'). '/api/tebus/laporan/'. $auth_user['cawangan'] .'/'. $tebus_date)->json(); @@ -2384,12 +2384,14 @@ class KhazanahController extends Controller $bakilelongxtra = floatval(123.20); $cajlelongxtra = floatval(25.50); $upahsimpanxtra = floatval(4894.40); + $peruntukanhapuskira = ($xtra['phapuskira']); }else{ $upahsimpanxtra = $xtra['upahsimpan']; $bakilelongxtra = $xtra['bakilelong']; $utgterkumpulxtra = $xtra['untungrugiterkumpul']; $rugilelongxtra = -($xtra['kerugianlelong']); + $peruntukanhapuskira = ($xtra['phapuskira']); } //Terkumpul @@ -2409,6 +2411,7 @@ class KhazanahController extends Controller if($pinjamandiberi['pinjamankoop'] > 0) array_push($hartasemasa,['glcode' => '1000/013','descpt' => 'Pinjaman Diberi - Koop PKB', 'amaun' => $pinjamandiberi['pinjamankoop']]); if($pinjamandiberi['emaspalsu'] > 0) array_push($hartasemasa,['glcode' => '1000/014','descpt' => 'Pinjaman Diberi - Emas Palsu / Kes', 'amaun' => $pinjamandiberi['emaspalsu']]); if($imbangduga['pindahkekpkb'] > 0) array_push($hartasemasa,['glcode' => '1000/090','descpt' => 'Pindah Ke KPKB(IP)', 'amaun' => $imbangduga['pindahkekpkb']]); + if($peruntukanhapuskira > 0) array_push($hartasemasa,['glcode' => '1000/015','descpt' => 'Peruntukan Hapus Kira', 'amaun' => $peruntukanhapuskira]); if($belian1stop > 0) array_push($hartasemasa,['glcode' => '8000/501','descpt' => 'Belian 1 Stop', 'amaun' => $belian1stop]); $totalhartasemasa = 0; diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php index cc15ea7..ad42b14 100644 --- a/resources/views/customers/info.blade.php +++ b/resources/views/customers/info.blade.php @@ -430,7 +430,7 @@ event.preventDefault(); return false; }else{ - if(Number(data['unit_komuditi']) < 10000){ + if(Number(data['unit_komuditi']) < 50000){ Swal.fire({ icon: 'error', title: 'Unit Komoditi Berbaki Minumum', diff --git a/resources/views/lelongan/index.blade.php b/resources/views/lelongan/index.blade.php index bf08b1b..de0ebe8 100644 --- a/resources/views/lelongan/index.blade.php +++ b/resources/views/lelongan/index.blade.php @@ -199,6 +199,39 @@ function bayarantuntubaki() { + $.ajax({ + method: 'put', + url: "{{ route('lelong.tuntutbaki') }}", + data: { + "_token": "{{ csrf_token() }}", + 'batchno' : batchno, + 'jenis' : jenis, + 'norujukan' : norujukan, + 'teller' : teller, + 'bakipjm' : bakipjm, + 'bakiupah' : bakiupah, + 'cajlain' : cajlain, + 'cajlelong' : cajlelong, + 'jumlah' : jumlah, + 'nowakil' : nowakil, + 'hargajual' : hargajual + }, + success:function(data){ + let urlroute = '{{ route("resit.tuntutbaki", ":id") }}'; + urlroute = urlroute.replace(':id', norujukan); + Swal.fire( + 'Berjaya!', + 'Tuntut Baki Berjaya', + 'success' + ) .then(function() { + window.open(urlroute, '_blank'); + window.location.replace("{{ route('customer_info') }}"); + }) + },error: function(xhr, status, error) { + var err = eval("(" + xhr.responseText + ")"); + alert(xhr.responseText); + } + }); const swalWithBootstrapButtons = Swal.mixin({ customClass: { confirmButton: 'btn btn-success', @@ -348,4 +381,4 @@ } -@endsection \ No newline at end of file +@endsection diff --git a/resources/views/penebusan/index.blade.php b/resources/views/penebusan/index.blade.php index 529b4d3..71e36e6 100644 --- a/resources/views/penebusan/index.blade.php +++ b/resources/views/penebusan/index.blade.php @@ -442,7 +442,7 @@ url: api + '/api/upahtawarruq/' + kodcaw + '/' + norujukan, dataType: 'json', success:function(data){ - $('#jumlahupah').val(formatter.format(data)); + $('#jumlahupah').val(data); } }); @@ -700,8 +700,8 @@ $("#sltjenistebus").change(function(){ - var jumupah = parseFloat($('#jumlahupah').val()); - var jumupahrebet = parseFloat($('#bayaranditerima').val()); + var jumupah = parseFloat($('#jumlahupah').val().replace(/[^0-9.-]+/g,"")); + var jumupahrebet = parseFloat($('#bayaranditerima').val().replace(/[^0-9.-]+/g,"")); switch($(this).val()) { case "T": From 95d244ff79db62a692a631adb810ff5fbfa8600d Mon Sep 17 00:00:00 2001 From: Afiq Zakwan Hamdan Date: Fri, 9 Jul 2021 00:56:33 +0800 Subject: [PATCH 16/27] sag --- resources/views/customers/index.blade.php | 29 ++- resources/views/customers/info.blade.php | 21 +- resources/views/gadaian/edit.blade.php | 15 -- resources/views/gadaian/index.blade.php | 15 -- resources/views/not_assign.blade.php | 2 +- resources/views/penebusan/index.blade.php | 22 +- resources/views/print/resitadvansur.blade.php | 4 +- resources/views/print/resitansuran.blade.php | 28 +-- .../views/print/resittambahpinjam.blade.php | 4 +- resources/views/print/resittebus.blade.php | 4 +- .../views/print/resittebussebelum.blade.php | 4 +- .../views/print/resittebusseparuh.blade.php | 4 +- resources/views/print/sag.blade.php | 238 +++++++++++++++--- 13 files changed, 271 insertions(+), 119 deletions(-) diff --git a/resources/views/customers/index.blade.php b/resources/views/customers/index.blade.php index 4c0a31c..b4cb26e 100644 --- a/resources/views/customers/index.blade.php +++ b/resources/views/customers/index.blade.php @@ -175,7 +175,7 @@
@@ -296,7 +296,7 @@
@@ -436,6 +436,7 @@ }); function verifycustomer(){ + $("#terima_ic").prop('disabled', true); var customername = $('#name').val(); var customeralamat = $('#alamat').val(); var customerposkod = $('#poskod').val(); @@ -443,6 +444,7 @@ var customerphone_alternate = $('#alternate_phone').val(); var age = $('#age').val(); if(age < 18){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -452,6 +454,7 @@ return false; } if(customername == ''){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -461,6 +464,7 @@ return false; } if(customeralamat == ''){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -470,6 +474,7 @@ return false; } if(customerposkod == ''){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -479,6 +484,7 @@ return false; }else{ if(customerposkod.length != 5){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -488,6 +494,7 @@ return false; }else{ if($.isNumeric(customerposkod) == false){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -499,6 +506,7 @@ } } if(customerphone == ''){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -508,6 +516,7 @@ return false; }else{ if((customerphone.length < 9 || customerphone.length >= 12)){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -517,6 +526,7 @@ return false; }else{ if($.isNumeric(customerphone) == false){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -529,6 +539,7 @@ } if(customerphone_alternate != ''){ if(customerphone_alternate.length < 8 && customerphone_alternate.length > 12){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -538,6 +549,7 @@ return false; }else{ if($.isNumeric(customerphone_alternate) == false){ + $("#terima_ic").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -552,6 +564,7 @@ } function verifycustomerpassport(){ + $("#terima_passport").prop('disabled', true); var customername = $('#passport_name').val(); var customeralamat = $('#passport_alamat').val(); var customerposkod = $('#passport_poskod').val(); @@ -561,6 +574,7 @@ var age = $('#passport_age').val(); if(age < 18){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -570,6 +584,7 @@ return false; } if(customername == ''){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -579,6 +594,7 @@ return false; } if(tarikh_lahir == ''){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -588,6 +604,7 @@ return false; } if(customeralamat == ''){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -597,6 +614,7 @@ return false; } if(customerposkod == ''){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -606,6 +624,7 @@ return false; }else{ if(customerposkod.length != 5){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -615,6 +634,7 @@ return false; }else{ if($.isNumeric(customerposkod) == false){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -626,6 +646,7 @@ } } if(customerphone == ''){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -635,6 +656,7 @@ return false; }else{ if(customerphone.length <= 9 || customerphone.length >= 12){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -644,6 +666,7 @@ return false; }else{ if($.isNumeric(customerphone) == false){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -656,6 +679,7 @@ } if(customerphone_alternate != ''){ if(customerphone_alternate.length <= 8 && customerphone_alternate.length >= 12){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', @@ -665,6 +689,7 @@ return false; }else{ if($.isNumeric(customerphone_alternate) == false){ + $("#terima_passport").prop('disabled', false); Swal.fire({ icon: 'error', title: 'Amaran!', diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php index ad42b14..180fde8 100644 --- a/resources/views/customers/info.blade.php +++ b/resources/views/customers/info.blade.php @@ -92,7 +92,7 @@ No Telefon
- +
@@ -248,7 +248,7 @@ No KP
- +
@@ -264,7 +264,7 @@ No Telefon 1
- +
@@ -273,7 +273,7 @@ No Telefon 2
- +
@@ -310,7 +310,7 @@ Alamat
- +
@@ -318,7 +318,7 @@ Poskod
- +
@@ -328,9 +328,12 @@
@php $poskod = Http::get($api_url . '/api/poskod/'. $customer_info['poskod'])->json(); + if(sizeof($poskod) < 1 || sizeof($poskod) > 1){ + $poskod = array('koddaerah'=>'NIL','kodnegeri' => 'NIL'); + } $daerah = Http::get($api_url . '/api/daerah/' . $poskod['koddaerah'])->json(); @endphp - +
@@ -341,7 +344,7 @@ @php $negeri = Http::get($api_url . '/api/negeri/' . $poskod['kodnegeri'])->json(); @endphp - +
@@ -699,7 +702,7 @@ '', '' + gadai_detail['norujukan'] + '', gadai_detail['t_gadai'], - gadai_detail['t_matang1'], + gadai_detail['t_matang'], 'RM '+ formatter.format(gadai_detail['bakihargajualan']), 'RM '+formatter.format(gadai_detail['bakipjm']), (((Number(gadai_detail['pinjaman'])/Number(gadai_detail['nilaimarhun']))*100).toFixed(2)).toLocaleString("en-GB") + '%', diff --git a/resources/views/gadaian/edit.blade.php b/resources/views/gadaian/edit.blade.php index 53c90eb..7f5eed3 100644 --- a/resources/views/gadaian/edit.blade.php +++ b/resources/views/gadaian/edit.blade.php @@ -553,11 +553,6 @@ 'nota' : nota }, success:function(data){ - Swal.fire({ - icon: 'success', - title: 'Berjaya!', - text: 'Ubah Marhun Berjaya' - }); getMarhun(norujukedit); $('#editMarhunModal').modal('hide'); } @@ -647,11 +642,6 @@ 'nilai_marhun' : nilai_marhun }, success:function(data){ - Swal.fire({ - icon: 'success', - title: 'Berjaya!', - text: 'Tambah Marhun Berjaya' - }); $('#nota').val('').trigger("change"); $('#marhun').val(0); $('#karat').val(0); @@ -748,11 +738,6 @@ 'nilai_marhun' : nilai_marhun }, success:function(data){ - Swal.fire({ - icon: 'success', - title: 'Berjaya!', - text: 'Tambah Marhun Berjaya' - }); $('#nota').val('').trigger("change"); $('#marhun').val(0); $('#karat').val(0); diff --git a/resources/views/gadaian/index.blade.php b/resources/views/gadaian/index.blade.php index 19e27b9..9984860 100644 --- a/resources/views/gadaian/index.blade.php +++ b/resources/views/gadaian/index.blade.php @@ -509,11 +509,6 @@ success:function(data){ $("#tambah_marhun").prop('disabled', false); $("#terima_marhun").prop('disabled', false); - Swal.fire({ - icon: 'success', - title: 'Berjaya!', - text: 'Tambah Marhun Berjaya' - }); $('#nota').val('').trigger("change"); $('#marhun').val(0); $('#karat').val(0); @@ -625,11 +620,6 @@ success:function(data){ $("#tambah_marhun").prop('disabled', false); $("#terima_marhun").prop('disabled', false); - Swal.fire({ - icon: 'success', - title: 'Berjaya!', - text: 'Tambah Marhun Berjaya' - }); $('#nota').val('').trigger("change"); $('#marhun').val(0); $('#karat').val(0); @@ -1131,11 +1121,6 @@ 'nota' : nota }, success:function(data){ - Swal.fire({ - icon: 'success', - title: 'Berjaya!', - text: 'Ubah Marhun Berjaya' - }); getMarhun(norujukedit); $('#editMarhunModal').modal('hide'); } diff --git a/resources/views/not_assign.blade.php b/resources/views/not_assign.blade.php index 24016f5..b6be251 100644 --- a/resources/views/not_assign.blade.php +++ b/resources/views/not_assign.blade.php @@ -84,7 +84,7 @@
- Khazanah Belum Menugaskan Jawatan Harian + Kakitangan Belum Disahkan Lagi
diff --git a/resources/views/penebusan/index.blade.php b/resources/views/penebusan/index.blade.php index 71e36e6..7f1d076 100644 --- a/resources/views/penebusan/index.blade.php +++ b/resources/views/penebusan/index.blade.php @@ -246,7 +246,7 @@
- BAYARAN PEMBIAYAAN(RM) + BAYARAN PELANGGAN(RM)
@@ -373,6 +373,7 @@ $('#divhargaemassemasa').hide(); $('#divperludibayartawarruq').hide(); $('#divbayarantawarruq').hide(); + $('#divbayaran').hide(); var array_recno = []; @@ -721,9 +722,9 @@ $('#divhargaemassemasa').hide(); $('#divperludibayartawarruq').hide(); $('#divbayarantawarruq').hide(); + $('#divbayaran').hide(); $('#divtelahdibayar').show(); - $('#divbayaran').show(); $('#divperludibayar').show(); tebusan(); @@ -748,9 +749,9 @@ $('#divbayarantawarruq').hide(); $('#divtelahdibayar').show(); $('#divbayaran').show(); - $('#divperludibayar').show(); + $('#divperludibayar').hide(); - $('#perludibayar').val(formatter.format(jumupah)); + $('#bayaran').val(formatter.format(jumupah)); break; @@ -992,6 +993,7 @@ function bayaransemua() { $("#terima_transaksi").prop('disabled', true); + var jumupah = parseFloat($('#jumlahupah').val().replace(/[^0-9.-]+/g,"")); if($('#sltjenistebus').find(":selected").val() == 'T'){ var adadah = false; @@ -1128,7 +1130,17 @@ let hadbayaransuran = (parseFloat("{{ $gadai['nilaimarhun']}}") * 0.1); var bayar = $('#bayaran').val(); - var bakipinjam = parseFloat("{{ $gadai['bakipjm'] }}") - hadbayaransuran; + var bakipinjam = parseFloat("{{ $gadai['bakipjm'] }}") - hadbayaransuran; + + if(bayar < jumupah){ + $("#terima_transaksi").prop('disabled', false); + Swal.fire( + 'Amaran!', + 'Bayaran tidak boleh kurang dari kos keuntungan semasa', + 'error' + ) + return false; + } if(bayar > bakipinjam){ $("#terima_transaksi").prop('disabled', false); diff --git a/resources/views/print/resitadvansur.blade.php b/resources/views/print/resitadvansur.blade.php index 2167d75..6a5659a 100644 --- a/resources/views/print/resitadvansur.blade.php +++ b/resources/views/print/resitadvansur.blade.php @@ -247,7 +247,7 @@ hr.new5 { #payment { font-family: Arial, Helvetica, sans-serif; border-collapse:collapse; - width: 45%; + width: 60%; font-size:10px; border: 1px solid black; @@ -256,7 +256,7 @@ hr.new5 { #payment td, #payment th { border: 0px solid; padding: 3px; - font-size:9px; + font-size:15px; text-align: left; } diff --git a/resources/views/print/resitansuran.blade.php b/resources/views/print/resitansuran.blade.php index 941a371..b17a935 100644 --- a/resources/views/print/resitansuran.blade.php +++ b/resources/views/print/resitansuran.blade.php @@ -8,8 +8,8 @@ - - - - - - - - - - - - @@ -1100,7 +1110,7 @@ @endphp

- +
@@ -1127,7 +1137,7 @@ - - + - + @@ -1392,4 +1388,4 @@

(Tandatangan pelanggan)

- \ No newline at end of file + From 9d6cfd9fb231e4281c5ac15300873d8c04ebfc76 Mon Sep 17 00:00:00 2001 From: fifi97 Date: Fri, 16 Jul 2021 02:52:05 +0800 Subject: [PATCH 25/27] fix kelulusan dekat operasi --- resources/views/operasi/kelulusan.blade.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/resources/views/operasi/kelulusan.blade.php b/resources/views/operasi/kelulusan.blade.php index 4d661a1..06821a0 100644 --- a/resources/views/operasi/kelulusan.blade.php +++ b/resources/views/operasi/kelulusan.blade.php @@ -314,13 +314,10 @@ let cawangankod = $(e).data('kodcaw'); let siri = $(e).data('siri'); let namaoperasi = "{{ Auth::user()->name }}"; - let teller = $(e).closest('tr').children('td:eq(1)').text(); + let teller = $(e).closest('tr').children('td:eq(2)').text(); teller = String(teller); - console.log(teller); - - return; $.ajax({ method:'put', url: "{{ route('operasi.updatekelulusan') }}", @@ -330,7 +327,8 @@ "kodcaw" : cawangankod, "komenkelulusan" : komenkelulusan, "siri" : siri, - 'namaoperasi' : namaoperasi + 'namaoperasi' : namaoperasi, + 'teller' : teller }, success:function(data){ console.log(data); @@ -400,7 +398,7 @@ let siri = $(e).data('siri'); let cawangankod = $(e).data('kodcaw'); let namaoperasi = "{{ Auth::user()->name }}"; - let teller = $(e).closest('tr').children('td:eq(1)').text(); + let teller = $(e).closest('tr').children('td:eq(2)').text(); teller = String(teller); From c00ee59dd07eb0572bc691d8aecc013eb25ca33f Mon Sep 17 00:00:00 2001 From: MUHD HAFIFIE Date: Sun, 18 Jul 2021 17:02:19 +0800 Subject: [PATCH 26/27] add serahan baki dan block perubatan lebih --- app/Http/Controllers/KakitanganController.php | 27 +++++++++++++++++++ app/Http/Controllers/KhazanahController.php | 13 +++++++++ resources/views/lelongan/index.blade.php | 20 ++++++++++++++ 3 files changed, 60 insertions(+) diff --git a/app/Http/Controllers/KakitanganController.php b/app/Http/Controllers/KakitanganController.php index 59781ed..52a101a 100644 --- a/app/Http/Controllers/KakitanganController.php +++ b/app/Http/Controllers/KakitanganController.php @@ -90,6 +90,33 @@ class KakitanganController extends Controller )); } + // Check teller tak serah baki tunai untuk generate balik + + $tunaisemalam = Http::get(config('api.url') . '/api/GetTunaiSemalam/'. $auth_user['cawangan'])->json(); + + if (sizeof($tunaisemalam) > 0) + { + foreach($tunaisemalam as $index=>$tunsem){ + + $latesttunai = Http::get(config('api.url') . '/api/GetLatestTunai/'. $auth_user['cawangan'], ['kodlaluan' => $tunsem['kodlaluan']])->json(); + + if(sizeof($latesttunai) == 0) + { + $alirantunai = Http::post(config('api.url') . '/api/tunai/daftarTunai/' . $auth_user['cawangan'], [ + 'kodcaw' => $tunsem['kodcaw'], + 'teller' => $tunsem['kodlaluan'], + 'bakiawal' => $tunsem['baki'], + 'masuk' => 0.00, + 'yuran' => 0.00, + 'keluar' => 0.00, + 'baki' => $tunsem['baki'], + 'tambah' => 0.00, + 'kurang' => 0.00 + ])->json(); + } + } + } + return redirect()->route('home'); } diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index 138ee2a..23c21a6 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -734,6 +734,19 @@ class KhazanahController extends Controller break; } + + if($request->jenismodal === 'perubatan') + { + $listUser=User::where('name','=',$request->tuntutan)->get(); + + if(floatval($request->bayaran) > floatval($listUser[0]->perubatan)) + { + return redirect('/panjar')->with('messageinformation','Baki perubatan tidak mencukupi.'); + } + } + + + $denominasilist = Http::get( config('api.url') .'/api/DenominasiController/'. $auth_user['cawangan'])->json(); //bundle initialize diff --git a/resources/views/lelongan/index.blade.php b/resources/views/lelongan/index.blade.php index 85af903..b32ad3f 100644 --- a/resources/views/lelongan/index.blade.php +++ b/resources/views/lelongan/index.blade.php @@ -199,6 +199,26 @@ function bayarantuntubaki() { + + let norujukan = $('#norujukan').val(); + let api = "{{ config('api.url') }}"; + let nowakil = 0; + let jenis = ''; + + if($("input[name='radlelong']:checked").val() == 'baki') + { + jenis = 'T'; + let mohon = "Tuntut Baki Lelongan"; + }else{ + jenis = 'B'; + let mohon = "Bayar Baki Lelongan"; + } + + + let batchno = $('#batch').val();let teller = "{{ Auth::user()->name }}";let bakipjm = $('#pembiayaan').val().replace(/[^0-9.-]+/g,"");let bakiupah = $('#keuntungan').val(); + let cajlain = 0.00; let cajlelong = $('#cajlelong').val(); + let jumlah = $('#jumlah').val().replace(/[^0-9.-]+/g,"");let hargajual = $('#hargajual').val().replace(/[^0-9.-]+/g,""); + $.ajax({ method: 'put', url: "{{ route('lelong.tuntutbaki') }}", From a04a5b5f9e9d63a62fbf5f19661da68f63a8d8ba Mon Sep 17 00:00:00 2001 From: MUHD HAFIFIE Date: Mon, 19 Jul 2021 15:12:30 +0800 Subject: [PATCH 27/27] kakitangancontroller --- app/Http/Controllers/KakitanganController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/KakitanganController.php b/app/Http/Controllers/KakitanganController.php index 52a101a..63723ec 100644 --- a/app/Http/Controllers/KakitanganController.php +++ b/app/Http/Controllers/KakitanganController.php @@ -98,7 +98,7 @@ class KakitanganController extends Controller { foreach($tunaisemalam as $index=>$tunsem){ - $latesttunai = Http::get(config('api.url') . '/api/GetLatestTunai/'. $auth_user['cawangan'], ['kodlaluan' => $tunsem['kodlaluan']])->json(); + $latesttunai = Http::get(config('api.url') . '/api/GetCurrentTunai/'. $auth_user['cawangan'], ['kodlaluan' => $tunsem['kodlaluan']])->json(); if(sizeof($latesttunai) == 0) {
No SAG {{ $gadai_detail['norujukan'] }}
Marhun + @php foreach($marhun_detail as $index=>$marhun_customer){ echo '1'.$marhun_customer['marhun']. '(' .$marhun_customer['karat'].'),'; @@ -1212,7 +1222,7 @@ @endphp
- +
@@ -1239,7 +1249,7 @@ - From ae7acc13d6f6cfe5ae62b392b36650e8973e56df Mon Sep 17 00:00:00 2001 From: fifi97 Date: Mon, 12 Jul 2021 10:47:13 +0800 Subject: [PATCH 19/27] fix --- app/Events/NotifikasiUbahHapus.php | 5 +++-- app/Http/Controllers/KhazanahController.php | 9 +++++++-- resources/views/penebusan/index.blade.php | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/Events/NotifikasiUbahHapus.php b/app/Events/NotifikasiUbahHapus.php index 897c489..0a27135 100644 --- a/app/Events/NotifikasiUbahHapus.php +++ b/app/Events/NotifikasiUbahHapus.php @@ -11,13 +11,14 @@ class NotifikasiUbahHapus implements ShouldBroadcast { use Dispatchable, InteractsWithSockets, SerializesModels; - public $norujukan,$kelulusan,$komen; + public $norujukan,$kelulusan,$komen,$teller; - public function __construct($norujukan,$kelulusan,$komen) + public function __construct($norujukan,$kelulusan,$komen,$teller) { $this->norujukan = $norujukan; $this->kelulusan = $kelulusan; $this->komen = $komen; + $this->teller = $teller; } public function broadcastOn() diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index 8d20f27..a755345 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -559,6 +559,7 @@ class KhazanahController extends Controller $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); + $getlulus = Http::get(config('api.url') . '/api/GetLulus/'. $auth_user['cawangan'],['norujukan' => $norujukan])->json(); if($request->khazanah != null) { @@ -572,7 +573,7 @@ class KhazanahController extends Controller if($updatelulus) { - event(new NotifikasiUbahHapus($norujukan,"batal",$request->komenubahhapus)); + event(new NotifikasiUbahHapus($norujukan,"batal",$request->komenubahhapus,$getlulus['teller'])); } }else{ @@ -582,7 +583,7 @@ class KhazanahController extends Controller if($updatelulus) { - event(new NotifikasiUbahHapus($norujukan,"lulus","tiada")); + event(new NotifikasiUbahHapus($norujukan,"lulus","tiada",$getlulus['teller'])); } } } @@ -598,6 +599,8 @@ class KhazanahController extends Controller 'siri' => $request->siri ])->json(); + $getlulus = Http::get(config('api.url') . '/api/ListLatestLulus/'. $auth_user['cawangan'] . '/' . $norujukan)->json(); + if($updatelulus) { event(new NotifikasiKelulusan($norujukan,"lulus",$request->siri,$request->komenkelulusan)); @@ -2664,6 +2667,8 @@ class KhazanahController extends Controller $TotalTunaiDebit = $pinjamandiberi['Gadai'] + $pembiayaantawarruq['Gadai'] + $rebet + $keuntungan + $imbangduga['serahan'] + $panjar['bds'] + $panjar['perubatan'] + $panjar['keraian'] + $bakilelong['rugilelong']; $TotalTunaiKredit = $pinjamandiberi['Tebus'] + $pembiayaantawarruq['Tebus'] + $rebet + $keuntungan + $keuntungansebenar + $untungrugi + $bayaranpendahuluan + $imbangduga['pendahuluan'] + $bakilelong['bakilelong']; + + array_push($Debit,['glcode' => '1000/010','descpt' => 'Tunai Di Tangan', 'amaun' => $TotalTunaiKredit]); array_push($Debit,['glcode' => '1000/013','descpt' => 'Pinjaman Diberi - Koop PKB', 'amaun' => $pinjamandiberi['Gadai']]); array_push($Debit,['glcode' => '1000/017','descpt' => 'Pembiayaan Di Bawah Tawarruq', 'amaun' => $pembiayaantawarruq['Gadai']]); diff --git a/resources/views/penebusan/index.blade.php b/resources/views/penebusan/index.blade.php index 71e36e6..65f21a4 100644 --- a/resources/views/penebusan/index.blade.php +++ b/resources/views/penebusan/index.blade.php @@ -1282,7 +1282,7 @@ var channel = pusher.subscribe('notice-kelulusan'); channel.bind('my-kelulusan', function(data) { - + console.log(data); if(data.norujukan == norujukan && data.siri == siricreated) { From 3e88adc19829cde940870d1a6aedffc47a04aca8 Mon Sep 17 00:00:00 2001 From: MUHD HAFIFIE Date: Tue, 13 Jul 2021 17:23:09 +0800 Subject: [PATCH 20/27] fix skit2 --- app/Http/Controllers/KhazanahController.php | 17 ++++++++--------- .../khazanah/laporan/datalejer_am.blade.php | 2 -- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index a755345..bb4af0d 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -2538,7 +2538,7 @@ class KhazanahController extends Controller //array_push($hartasemasa,['glcode' => '1000/045','descpt' => 'Serahan Bayaran Online', 'amaun' => 0.00]); if($keuntungan > 0) array_push($hartasemasa,['glcode' => '1000/211','descpt' => 'Keuntungan Tertangguh', 'amaun' => $keuntungan]); if($bayaranpendahuluan > 0) array_push($hartasemasa,['glcode' => '5000/041','descpt' => 'Bayaran Pendahuluan','amaun' => ($bayaranpendahuluan * -1)]); - if($rebet > 0) array_push($hartasemasa,['glcode' => '5000/241','descpt' => 'Rebet','amaun' => ($rebet * -1)]); + if($rebet > 0) array_push($hartasemasa,['glcode' => '5000/240','descpt' => 'Rebet 1','amaun' => ($rebet * -1)]); if($imbangduga['serahan'] > 0) array_push($hartasemasa,['glcode' => '1000/020','descpt' => 'Serahan Kepada HQ', 'amaun' => $imbangduga['serahan']]); if($pinjamandiberi['pinjamankoop'] > 0) array_push($hartasemasa,['glcode' => '1000/013','descpt' => 'Pinjaman Diberi - Koop PKB', 'amaun' => $pinjamandiberi['pinjamankoop']]); if($pinjamandiberi['emaspalsu'] > 0) array_push($hartasemasa,['glcode' => '1000/014','descpt' => 'Pinjaman Diberi - Emas Palsu / Kes', 'amaun' => $pinjamandiberi['emaspalsu']]); @@ -2558,14 +2558,14 @@ class KhazanahController extends Controller if($keuntungan > 0) array_push($tanggungansemasa,['glcode' => '2000/007','descpt' => 'Keuntungan Tergantung', 'amaun' => $keuntungan]); if($keuntungansebenar > 0) array_push($tanggungansemasa,['glcode' => '5000/013','descpt' => 'Upah Simpan','amaun' => $keuntungansebenar]); - if($rebet > 0) array_push($tanggungansemasa,['glcode' => '5000/241','descpt' => 'Rebet','amaun' => ($rebet * -1)]); + if($rebet > 0) array_push($tanggungansemasa,['glcode' => '5000/241','descpt' => 'Rebet 2','amaun' => ($rebet * -1)]); if($imbangduga['pendahuluan'] > 0) array_push($tanggungansemasa,['glcode' => '7000/102','descpt' => 'Pendahuluan Daripada HQ','amaun' => $imbangduga['pendahuluan']]); - if($panjar['bds'] > 0) array_push($tanggungansemasa,['glcode' => '3000/017','descpt' => 'PANJAR - Baiki dan Selenggara','amaun' => -$panjar['bds']]); - if($panjar['perubatan'] > 0) array_push($tanggungansemasa,['glcode' => '3000/018','descpt' => 'PANJAR - Belanja AM','amaun' => -$panjar['perubatan']]); - if($panjar['keraian'] > 0) array_push($tanggungansemasa,['glcode' => '3000/019','descpt' => 'PANJAR - Keraian Dan Promosi','amaun' => -$panjar['keraian']]); + if($panjar['bds'] > 0) array_push($tanggungansemasa,['glcode' => '3000/017','descpt' => 'Panjar - Baiki dan Selenggara','amaun' => -$panjar['bds']]); + if($panjar['perubatan'] > 0) array_push($tanggungansemasa,['glcode' => '3000/018','descpt' => 'Panjar - Belanja AM','amaun' => -$panjar['perubatan']]); + if($panjar['keraian'] > 0) array_push($tanggungansemasa,['glcode' => '3000/019','descpt' => 'Panjar - Keraian Dan Promosi','amaun' => -$panjar['keraian']]); if($bakilelong['bakilelong'] != 0) array_push($tanggungansemasa,['glcode' => '7000/090','descpt' => 'Baki Lelong','amaun' => $bakilelong['bakilelong']]); if($bakilelong['rugilelong'] != 0) array_push($tanggungansemasa,['glcode' => '3000/020','descpt' => 'Kerugian Lelong','amaun' => $bakilelong['rugilelong']]); - if($wtd > 0) array_push($tanggungansemasa,['glcode' => '3000/021','descpt' => 'WANG TAK DITUNTUT','amaun' => $wtd]); + if($wtd > 0) array_push($tanggungansemasa,['glcode' => '3000/021','descpt' => 'Wang Tak Dituntut','amaun' => $wtd]); if($cajlelong > 0) array_push($tanggungansemasa,['glcode' => '5000/213','descpt' => 'Pendapatan Caj Lelong','amaun' => $cajlelong]); if($untungrugiterkumpul > 0) array_push($tanggungansemasa,['glcode' => '7000/101','descpt' => 'Untung/Rugi Terkumpul','amaun' => $untungrugiterkumpul]); if($cajperkhidmatan > 0) array_push($tanggungansemasa,['glcode' => '5000/213','descpt' => 'Caj Perkhidmatan Terkumpul','amaun' => $cajperkhidmatan]); @@ -2575,7 +2575,7 @@ class KhazanahController extends Controller if($rugilelongxtra != 0) array_push($tanggungansemasa,['glcode' => '7000/191','descpt' => 'Rugi Lelong Xtra','amaun' => -$rugilelongxtra]); if($utgterkumpulxtra > 0) array_push($tanggungansemasa,['glcode' => '7000/201','descpt' => 'Untung/Rugi Terkumpul Xtra','amaun' => $utgterkumpulxtra]); if($jualan1stop > 0) array_push($tanggungansemasa,['glcode' => '9000/501','descpt' => 'Jualan 1 Stop','amaun' => $jualan1stop]); - if($hapuskira > 0) array_push($tanggungansemasa,['glcode' => '3000/011','descpt' => 'Hapus Kira','amaun' => -$hapuskira]); + if($hapuskira > 0) array_push($tanggungansemasa,['glcode' => '3000/011','descpt' => 'Hapus Kira','amaun' => -$hapuskira]); $totaltanggungansemasa = 0; foreach($tanggungansemasa as $index => $ts) @@ -2584,7 +2584,7 @@ class KhazanahController extends Controller } $untungrugifield = []; - array_push($untungrugifield,['glcode' => '2000/007','descpt' => 'Keuntungan', 'amaun' => $untungrugi]); + array_push($untungrugifield,['glcode' => '2000/007','descpt' => 'Keuntungan Sebenar', 'amaun' => $untungrugi]); $totaluntungrugi = 0; @@ -2666,7 +2666,6 @@ class KhazanahController extends Controller $TotalTunaiDebit = $pinjamandiberi['Gadai'] + $pembiayaantawarruq['Gadai'] + $rebet + $keuntungan + $imbangduga['serahan'] + $panjar['bds'] + $panjar['perubatan'] + $panjar['keraian'] + $bakilelong['rugilelong']; $TotalTunaiKredit = $pinjamandiberi['Tebus'] + $pembiayaantawarruq['Tebus'] + $rebet + $keuntungan + $keuntungansebenar + $untungrugi + $bayaranpendahuluan + $imbangduga['pendahuluan'] + $bakilelong['bakilelong']; - array_push($Debit,['glcode' => '1000/010','descpt' => 'Tunai Di Tangan', 'amaun' => $TotalTunaiKredit]); diff --git a/resources/views/khazanah/laporan/datalejer_am.blade.php b/resources/views/khazanah/laporan/datalejer_am.blade.php index 932e121..0d8e183 100644 --- a/resources/views/khazanah/laporan/datalejer_am.blade.php +++ b/resources/views/khazanah/laporan/datalejer_am.blade.php @@ -26,8 +26,6 @@ @csrf
- -
Mula
From c8c93c38ad1cf1657f663e8e763f76c1cd692328 Mon Sep 17 00:00:00 2001 From: fifi97 Date: Wed, 14 Jul 2021 10:19:16 +0800 Subject: [PATCH 21/27] fix kelulusan --- app/Events/NotifikasiKelulusan.php | 5 +++-- app/Http/Controllers/KhazanahController.php | 16 ++++++++++++---- app/Http/Controllers/OperasiController.php | 10 ++++++++-- resources/views/gadaian/index.blade.php | 7 ++----- resources/views/khazanah/kelulusan.blade.php | 11 ++++++++--- resources/views/operasi/kelulusan.blade.php | 8 ++++++-- 6 files changed, 39 insertions(+), 18 deletions(-) diff --git a/app/Events/NotifikasiKelulusan.php b/app/Events/NotifikasiKelulusan.php index 9b8b081..3bee030 100644 --- a/app/Events/NotifikasiKelulusan.php +++ b/app/Events/NotifikasiKelulusan.php @@ -11,14 +11,15 @@ class NotifikasiKelulusan implements ShouldBroadcast { use Dispatchable, InteractsWithSockets, SerializesModels; - public $norujukan,$kelulusan,$siri,$komen; + public $norujukan,$kelulusan,$siri,$komen,$teller; - public function __construct($norujukan,$kelulusan,$siri,$komen) + public function __construct($norujukan,$kelulusan,$siri,$komen,$teller) { $this->norujukan = $norujukan; $this->kelulusan = $kelulusan; $this->siri = $siri; $this->komen = $komen; + $this->teller = $teller; } public function broadcastOn() diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index bb4af0d..1682a8d 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -596,6 +596,7 @@ class KhazanahController extends Controller $updatelulus = Http::put(config('api.url') . '/api/UpdateKelulusan/' . $auth_user['cawangan'] . '/' . $norujukan,[ "pengesahan" => "khazanah", + "namakhazanah" => $request->namakhazanah, 'siri' => $request->siri ])->json(); @@ -603,19 +604,22 @@ class KhazanahController extends Controller if($updatelulus) { - event(new NotifikasiKelulusan($norujukan,"lulus",$request->siri,$request->komenkelulusan)); + event(new NotifikasiKelulusan($norujukan,"lulus",$request->siri,$request->komenkelulusan,$getlulus['teller'])); } }else{ $updatelulus = Http::put(config('api.url') . '/api/UpdateKelulusan/' . $auth_user['cawangan'] . '/' . $norujukan,[ "pengesahan" => "khazanah", 'siri' => $request->siri, + "namakhazanah" => $request->namakhazanah, "pembatalan" => "batal" ])->json(); + $getlulus = Http::get(config('api.url') . '/api/ListLatestLulus/'. $auth_user['cawangan'] . '/' . $norujukan)->json(); + if($updatelulus) { - event(new NotifikasiKelulusan($norujukan,"batal",$request->siri,$request->komenkelulusan)); + event(new NotifikasiKelulusan($norujukan,"batal",$request->siri,$request->komenkelulusan,$getlulus['teller'])); } } @@ -632,6 +636,7 @@ class KhazanahController extends Controller $updatelulus = Http::put(config('api.url') . '/api/UpdateKelulusan/' . $auth_user['cawangan'] . '/' . $norujukan,[ "pengesahan" => "operasi", 'siri' => $request->siri, + 'namaoperasi' => $request->namaoperasi ])->json(); }else{ @@ -639,10 +644,13 @@ class KhazanahController extends Controller $updatelulus = Http::put(config('api.url') . '/api/UpdateKelulusan/' . $auth_user['cawangan'] . '/' . $norujukan,[ "pengesahan" => "operasi", 'siri' => $request->siri, - "pembatalan" => "batal" + "pembatalan" => "batal", + 'namaoperasi' => $request->namaoperasi ])->json(); - event(new NotifikasiKelulusan($norujukan,"batal",$request->siri,$request->komenkelulusan)); + $getlulus = Http::get(config('api.url') . '/api/ListLatestLulus/'. $auth_user['cawangan'] . '/' . $norujukan)->json(); + + event(new NotifikasiKelulusan($norujukan,"batal",$request->siri,$request->komenkelulusan,$getlulus['teller'])); } diff --git a/app/Http/Controllers/OperasiController.php b/app/Http/Controllers/OperasiController.php index 73f1d57..3bacf97 100644 --- a/app/Http/Controllers/OperasiController.php +++ b/app/Http/Controllers/OperasiController.php @@ -88,24 +88,30 @@ class OperasiController extends Controller { $updatelulus = Http::put(config('api.url') . '/api/UpdateKelulusan/' . $request->kodcaw . '/' . $norujukan,[ 'sahkan' => 1, + 'namaoperasi' => $request->namaoperasi, 'siri' => $request->siri ])->json(); + $getlulus = Http::get(config('api.url') . '/api/ListLatestLulus/'. $auth_user['cawangan'] . '/' . $norujukan)->json(); + if($updatelulus) { - event(new NotifikasiKelulusan($norujukan,"lulus",$request->siri,$request->komenkelulusan)); + event(new NotifikasiKelulusan($norujukan,"lulus",$request->siri,$request->komenkelulusan,$getlulus['teller'])); } } else { $updatelulus = Http::put(config('api.url') . '/api/UpdateKelulusan/' . $request->kodcaw . '/' . $norujukan,[ 'sahkan' => 2, + 'namaoperasi' => $request->namaoperasi, 'siri' => $request->siri ])->json(); + $getlulus = Http::get(config('api.url') . '/api/ListLatestLulus/'. $auth_user['cawangan'] . '/' . $norujukan)->json(); + if($updatelulus) { - event(new NotifikasiKelulusan($norujukan,"batal",$request->siri,$request->komenkelulusan)); + event(new NotifikasiKelulusan($norujukan,"batal",$request->siri,$request->komenkelulusan,$getlulus['teller'])); } } diff --git a/resources/views/gadaian/index.blade.php b/resources/views/gadaian/index.blade.php index 19e27b9..614d2dc 100644 --- a/resources/views/gadaian/index.blade.php +++ b/resources/views/gadaian/index.blade.php @@ -851,9 +851,8 @@ var channel = pusher.subscribe('notice-kelulusan'); channel.bind('my-kelulusan', function(data) { - - if(data.norujukan == norujukan && data.siri == siricreated) + if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller) { if(data.kelulusan == 'lulus') { @@ -969,9 +968,7 @@ channel.bind('my-kelulusan', function(data) { // let message = JSON.stringify(data); - // console.log(message); - - if(data.norujukan == norujukan && data.siri == siricreated) + if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller) { if(data.kelulusan == 'lulus') { diff --git a/resources/views/khazanah/kelulusan.blade.php b/resources/views/khazanah/kelulusan.blade.php index 0e2068e..47009fb 100644 --- a/resources/views/khazanah/kelulusan.blade.php +++ b/resources/views/khazanah/kelulusan.blade.php @@ -264,7 +264,7 @@ async function updatelulus(e) { let api = "{{ config('api.url') }}"; - let kodcaw = " {{ Auth::user()->cawangan }}"; + let kodcaw = "{{ Auth::user()->cawangan }}"; const { value: katalaluan } = await Swal.fire({ title: 'Masukkan Katalaluan Semula', @@ -320,6 +320,7 @@ let norujukan = $(e).data('norujukan'); let pelulus = $(e).data('pelulus'); let siri = $(e).data('siri'); + let namakhazanah = "{{ Auth::user()->name }}"; $.ajax({ method:'put', @@ -329,7 +330,8 @@ "norujukan" : norujukan, "pelulus" : pelulus, "siri" : siri, - 'komen' : komen + 'komen' : komen, + 'namakhazanah' : namakhazanah }, success:function(data){ Swal.fire({ @@ -397,6 +399,7 @@ let norujukan = $(e).data('norujukan'); let pelulus = $(e).data('pelulus'); let siri = $(e).data('siri'); + let namakhazanah = "{{ Auth::user()->name }}"; $.ajax({ method:'put', @@ -407,7 +410,9 @@ "pelulus" : pelulus, "siri" : siri, "komenkelulusan" : komenkelulusan, - "pembatalan" : "batal" + "pembatalan" : "batal", + 'namakhazanah' : namakhazanah + }, success:function(data){ Swal.fire({ diff --git a/resources/views/operasi/kelulusan.blade.php b/resources/views/operasi/kelulusan.blade.php index 3b3e707..3434cd3 100644 --- a/resources/views/operasi/kelulusan.blade.php +++ b/resources/views/operasi/kelulusan.blade.php @@ -313,6 +313,7 @@ let norujukan = $(e).data('norujukan'); let cawangankod = $(e).data('kodcaw'); let siri = $(e).data('siri'); + let namaoperasi = "{{ Auth::user()->name }}"; $.ajax({ method:'put', @@ -322,7 +323,8 @@ "norujukan" : norujukan, "kodcaw" : cawangankod, "komenkelulusan" : komenkelulusan, - "siri" : siri + "siri" : siri, + 'namaoperasi' : namaoperasi }, success:function(data){ console.log(data); @@ -391,6 +393,7 @@ let norujukan = $(e).data('norujukan'); let siri = $(e).data('siri'); let cawangankod = $(e).data('kodcaw'); + let namaoperasi = "{{ Auth::user()->name }}"; $.ajax({ method:'put', @@ -401,7 +404,8 @@ "siri" : siri, "kodcaw" : cawangankod, "komenkelulusan" : komenkelulusan, - "pembatalan" : "batal" + "pembatalan" : "batal", + 'namaoperasi' : namaoperasi }, success:function(data){ Swal.fire({ From 68b2cd63cc2169b2e2f5d6e0a3f52aa94675f97b Mon Sep 17 00:00:00 2001 From: MUHD HAFIFIE Date: Wed, 14 Jul 2021 16:43:49 +0800 Subject: [PATCH 22/27] fix sedikit2 --- app/Http/Controllers/KhazanahController.php | 58 ++++++++++++++--- app/Http/Controllers/OperasiController.php | 8 +-- resources/views/khazanah/info.blade.php | 39 +++++++----- resources/views/khazanah/kelulusan.blade.php | 6 +- resources/views/modal/agh.blade.php | 65 ++++++++++++++++++++ resources/views/operasi/kelulusan.blade.php | 6 ++ resources/views/penebusan/index.blade.php | 8 ++- routes/web.php | 1 + 8 files changed, 161 insertions(+), 30 deletions(-) diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index 1682a8d..42fbb9d 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -600,11 +600,10 @@ class KhazanahController extends Controller 'siri' => $request->siri ])->json(); - $getlulus = Http::get(config('api.url') . '/api/ListLatestLulus/'. $auth_user['cawangan'] . '/' . $norujukan)->json(); if($updatelulus) { - event(new NotifikasiKelulusan($norujukan,"lulus",$request->siri,$request->komenkelulusan,$getlulus['teller'])); + event(new NotifikasiKelulusan($norujukan,"lulus",$request->siri,$request->komenkelulusan,$request->teller)); } }else{ @@ -615,11 +614,10 @@ class KhazanahController extends Controller "pembatalan" => "batal" ])->json(); - $getlulus = Http::get(config('api.url') . '/api/ListLatestLulus/'. $auth_user['cawangan'] . '/' . $norujukan)->json(); if($updatelulus) { - event(new NotifikasiKelulusan($norujukan,"batal",$request->siri,$request->komenkelulusan,$getlulus['teller'])); + event(new NotifikasiKelulusan($norujukan,"batal",$request->siri,$request->komenkelulusan,$request->teller)); } } @@ -648,9 +646,7 @@ class KhazanahController extends Controller 'namaoperasi' => $request->namaoperasi ])->json(); - $getlulus = Http::get(config('api.url') . '/api/ListLatestLulus/'. $auth_user['cawangan'] . '/' . $norujukan)->json(); - - event(new NotifikasiKelulusan($norujukan,"batal",$request->siri,$request->komenkelulusan,$getlulus['teller'])); + event(new NotifikasiKelulusan($norujukan,"batal",$request->siri,$request->komenkelulusan,$request->teller)); } @@ -2875,6 +2871,54 @@ class KhazanahController extends Controller return response($daftarpolis); } + public function SuratAkuanGadaianUpdate(Request $request) + { + $auth_user = Auth::user(); + $api_url = config('api.url'); + + $cawangan = Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json(); + $cawangan_detail=$cawangan[0]; + + $gadai = Http::get(config('api.url').'/api/gadai/norujukan/'.$request->norujukanhidden)->json(); + + foreach($gadai as $index1=>$gad) + $customers = Http::get(config('api.url').'/api/customers/'.$gad[0]['nokp'])->json(); + + $kodnegeridandaerah = $request->negeriagh .'|' . $request->daerahagh; + + $polis = Http::get(config('api.url').'/api/polis/get/',['norujukan' => $request->norujukanhidden,'kodcaw' => $auth_user['cawangan']])->json(); + + $daftar = 0; + + $daftarpolis = Http::put(config('api.url').'/api/polis/edit/',[ + + 'kodcaw' =>$auth_user['cawangan'], + 'norujukan' => $request->norujukanhidden, + 'komen1' => $request->alasan, + 'komen2' => $kodnegeridandaerah, + 'teller' => $auth_user['name'] + + ]); + + $daftar = $daftarpolis->getStatusCode(); + + if($daftar == 200) + { + $polis = Http::get(config('api.url').'/api/polis/get/',['norujukan' => $request->norujukanhidden,'kodcaw' => $auth_user['cawangan']])->json(); + + event(new NotifikasiAGH($auth_user['cawangan'],'Surat Akuan Gadaian Hilang berjaya dijana.','success',$auth_user['name'])); + // return redirect()->route('khazanah.customer_info')->with('aghinformation','Surat Akuan Gadaian Hilang berjaya dijana.|success'); + return view('print.suratgadaianhilang', compact('polis','gadai','customers','cawangan_detail','api_url')); + + }else{ + + event(new NotifikasiAGH($auth_user['cawangan'],'Mengalami masalah dalam menjana.','error',$auth_user['name'])); + // return redirect()->route('khazanah.customer_info')->with('aghinformation','Mengalami masalah dalam menjana.|error'); + } + + return response($daftarpolis); + } + public function ulangcetakSuratAkuanGadaianHilang($norujukan) { $auth_user = Auth::user(); diff --git a/app/Http/Controllers/OperasiController.php b/app/Http/Controllers/OperasiController.php index 3bacf97..cf84319 100644 --- a/app/Http/Controllers/OperasiController.php +++ b/app/Http/Controllers/OperasiController.php @@ -92,11 +92,9 @@ class OperasiController extends Controller 'siri' => $request->siri ])->json(); - $getlulus = Http::get(config('api.url') . '/api/ListLatestLulus/'. $auth_user['cawangan'] . '/' . $norujukan)->json(); - if($updatelulus) { - event(new NotifikasiKelulusan($norujukan,"lulus",$request->siri,$request->komenkelulusan,$getlulus['teller'])); + event(new NotifikasiKelulusan($norujukan,"lulus",$request->siri,$request->komenkelulusan,$request->teller)); } } else @@ -107,11 +105,9 @@ class OperasiController extends Controller 'siri' => $request->siri ])->json(); - $getlulus = Http::get(config('api.url') . '/api/ListLatestLulus/'. $auth_user['cawangan'] . '/' . $norujukan)->json(); - if($updatelulus) { - event(new NotifikasiKelulusan($norujukan,"batal",$request->siri,$request->komenkelulusan,$getlulus['teller'])); + event(new NotifikasiKelulusan($norujukan,"batal",$request->siri,$request->komenkelulusan,$request->teller)); } } diff --git a/resources/views/khazanah/info.blade.php b/resources/views/khazanah/info.blade.php index bae662c..9872b31 100644 --- a/resources/views/khazanah/info.blade.php +++ b/resources/views/khazanah/info.blade.php @@ -688,23 +688,33 @@ } } - function ulangcetakagh() + function ulangcetakagh(e) { - if($("input[name='options']:checked").val() == 'belum_tebus'){ + var komen2 = $(e).data('komen2'); + + if(komen2 !== null) + { + if($("input[name='options']:checked").val() == 'belum_tebus'){ let histid = $('input[name="belum"]:checked').val(); - if(histid == null){ - Swal.fire({ - icon: 'error', - title: 'Amaran', - text: 'Sila pilih salah satu SAG' - }); - }else{ - let urlroute = '{{ route("agh.ulangcetak", ":id") }}'; - urlroute = urlroute.replace(':id', histid); - window.open(urlroute, '_blank'); - swal.close(); + if(histid == null){ + Swal.fire({ + icon: 'error', + title: 'Amaran', + text: 'Sila pilih salah satu SAG' + }); + }else{ + let urlroute = '{{ route("agh.ulangcetak", ":id") }}'; + urlroute = urlroute.replace(':id', histid); + window.open(urlroute, '_blank'); + swal.close(); + } } + }else{ + $('#AGHModalEdit').modal('show'); + swal.close(); } + + return; } function saghilangfunc() @@ -724,6 +734,7 @@ data:{ "norujukan" : histid,"kodcaw" : kodcaw}, success:function(data) { + var count = Object.keys(data).length; if(count > 0) @@ -735,7 +746,7 @@ showConfirmButton: false, html: "
" + '' + - '', + '', icon: 'error', title: 'Surat Akuan Gadaian Hilang telah dikeluarkan!' }); diff --git a/resources/views/khazanah/kelulusan.blade.php b/resources/views/khazanah/kelulusan.blade.php index 47009fb..5c9909c 100644 --- a/resources/views/khazanah/kelulusan.blade.php +++ b/resources/views/khazanah/kelulusan.blade.php @@ -311,6 +311,7 @@ allowOutsideClick: false }) + let teller = $(e).closest('tr').children('td:eq(1)').text(); let nm = $(e).closest('tr').children('td:eq(4)').text(); let ber = $(e).closest('tr').children('td:eq(5)').text(); let marg = $(e).closest('tr').children('td:eq(6)').text(); @@ -322,6 +323,8 @@ let siri = $(e).data('siri'); let namakhazanah = "{{ Auth::user()->name }}"; + teller = String(teller); + $.ajax({ method:'put', url: "{{ route('khazanah.updatekelulusan') }}", @@ -331,7 +334,8 @@ "pelulus" : pelulus, "siri" : siri, 'komen' : komen, - 'namakhazanah' : namakhazanah + 'namakhazanah' : namakhazanah, + 'teller' : teller }, success:function(data){ Swal.fire({ diff --git a/resources/views/modal/agh.blade.php b/resources/views/modal/agh.blade.php index 0f2f7d3..276889f 100644 --- a/resources/views/modal/agh.blade.php +++ b/resources/views/modal/agh.blade.php @@ -63,4 +63,69 @@ + + + + diff --git a/resources/views/operasi/kelulusan.blade.php b/resources/views/operasi/kelulusan.blade.php index 3434cd3..5fc702c 100644 --- a/resources/views/operasi/kelulusan.blade.php +++ b/resources/views/operasi/kelulusan.blade.php @@ -314,7 +314,13 @@ let cawangankod = $(e).data('kodcaw'); let siri = $(e).data('siri'); let namaoperasi = "{{ Auth::user()->name }}"; + let teller = $(e).closest('tr').children('td:eq(1)').text(); + teller = String(teller); + + console.log(teller); + + return; $.ajax({ method:'put', url: "{{ route('operasi.updatekelulusan') }}", diff --git a/resources/views/penebusan/index.blade.php b/resources/views/penebusan/index.blade.php index 65f21a4..0d43793 100644 --- a/resources/views/penebusan/index.blade.php +++ b/resources/views/penebusan/index.blade.php @@ -2417,7 +2417,11 @@ { let wakil = $('#wakiltxt').val(); - if(wakil.length == 12) + var patternregex = /\s+|[-,\/]/g; + + wakil = wakil.replace(patternregex,"").toUpperCase(); + + if(wakil.length <= 12) { $.ajax({ method:'GET', @@ -2465,7 +2469,7 @@ { Swal.fire({ icon: 'error', - titleText: 'Kad Pengenalan', + titleText: 'Kad Pengenalan dan Passport', text: 'mestilah tidak melebihi dan kurang daripada 12 patah perkataan' }); } diff --git a/routes/web.php b/routes/web.php index eb9ecc0..933a1fe 100644 --- a/routes/web.php +++ b/routes/web.php @@ -250,6 +250,7 @@ Route::get('/komoditi/rekod',['as'=>'rekod.komoditi','uses'=>'KomuditiController Route::get('/komoditi/rekod/print',['as'=>'komoditi.rekod.print','uses'=>'KomuditiController@printRekodTransaksi']); Route::post('/khazanah/suratakuangadaian',['as'=>'agh.create','uses'=>'KhazanahController@SuratAkuanGadaian'])->middleware('auth','khazanah'); +Route::put('/khazanah/suratakuangadaian',['as'=>'agh.update','uses'=>'KhazanahController@SuratAkuanGadaianUpdate'])->middleware('auth','khazanah'); Route::get('/khazanah/ulangcetakagh/{norujukan}',['as'=>'agh.ulangcetak','uses'=>'KhazanahController@ulangcetakSuratAkuanGadaianHilang'])->middleware('auth','khazanah'); From f7b26a0c472ca3c97e88ac6b7dbd113d6889404f Mon Sep 17 00:00:00 2001 From: fifi97 Date: Thu, 15 Jul 2021 04:38:12 +0800 Subject: [PATCH 23/27] fix polis --- app/Events/OperasiNotice.php | 2 +- app/Http/Controllers/KhazanahController.php | 6 ++-- resources/views/customers/info.blade.php | 15 ++++++--- resources/views/gadaian/edit.blade.php | 4 +-- resources/views/khazanah/info.blade.php | 32 ++++++++++++++++++-- resources/views/khazanah/kelulusan.blade.php | 19 ++++++++++-- resources/views/lelongan/index.blade.php | 4 ++- resources/views/modal/agh.blade.php | 8 ++--- resources/views/operasi/kelulusan.blade.php | 6 +++- resources/views/penebusan/index.blade.php | 12 ++++---- routes/web.php | 2 +- 11 files changed, 81 insertions(+), 29 deletions(-) diff --git a/app/Events/OperasiNotice.php b/app/Events/OperasiNotice.php index 519b617..7098b18 100644 --- a/app/Events/OperasiNotice.php +++ b/app/Events/OperasiNotice.php @@ -11,7 +11,7 @@ class OperasiNotice implements ShouldBroadcast { use Dispatchable, InteractsWithSockets, SerializesModels; - public $cawangan,$namateller; + public $cawangan,$namakhazanah; public function __construct($cawangan,$namakhazanah) { diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index 42fbb9d..1c17191 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -573,7 +573,7 @@ class KhazanahController extends Controller if($updatelulus) { - event(new NotifikasiUbahHapus($norujukan,"batal",$request->komenubahhapus,$getlulus['teller'])); + event(new NotifikasiUbahHapus($norujukan,"batal",$request->komenubahhapus,$request->teller)); } }else{ @@ -583,7 +583,7 @@ class KhazanahController extends Controller if($updatelulus) { - event(new NotifikasiUbahHapus($norujukan,"lulus","tiada",$getlulus['teller'])); + event(new NotifikasiUbahHapus($norujukan,"lulus","tiada",$request->teller)); } } } @@ -2916,7 +2916,7 @@ class KhazanahController extends Controller // return redirect()->route('khazanah.customer_info')->with('aghinformation','Mengalami masalah dalam menjana.|error'); } - return response($daftarpolis); + return response($daftar); } public function ulangcetakSuratAkuanGadaianHilang($norujukan) diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php index ad42b14..c7a01d7 100644 --- a/resources/views/customers/info.blade.php +++ b/resources/views/customers/info.blade.php @@ -561,7 +561,7 @@ channel.bind('my-kelulusan', function(data) { - if(data.norujukan == norujukan && data.siri == siricreated) + if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller) { if(data.kelulusan == 'lulus') { @@ -1203,10 +1203,12 @@ encrypted: true }); + let teller = "{{ Auth::user()->name }}"; + var channel = pusher.subscribe('notice-ubahhapus'); channel.bind('my-ubahhapus', function(data) { - if(data.norujukan == norujukan) + if(data.norujukan == norujukan && data.teller == teller) { if(data.kelulusan == 'lulus') { @@ -1416,10 +1418,12 @@ encrypted: true }); + let teller = "{{ Auth::user()->name }}"; + var channel = pusher.subscribe('notice-ubahhapus'); channel.bind('my-ubahhapus', function(data) { - if(data.norujukan == ubahid) + if(data.norujukan == ubahid && data.teller == teller) { if(data.kelulusan == 'lulus') { @@ -1565,6 +1569,8 @@ } }); + let teller = "{{ Auth::user()->name }}"; + var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", { cluster: 'ap1', encrypted: true @@ -1573,7 +1579,7 @@ var channel = pusher.subscribe('notice-ubahhapus'); channel.bind('my-ubahhapus', function(data) { - if(data.norujukan == id) + if(data.norujukan == id && data.teller == teller) { if(data.kelulusan == 'lulus') { @@ -1583,7 +1589,6 @@ title: 'Telah Disahkan' }).then(function(){ - let teller = "{{ Auth::user()->name }}"; if($("input[name='options']:checked").val() == 'belum_tebus'){ $.ajax({ diff --git a/resources/views/gadaian/edit.blade.php b/resources/views/gadaian/edit.blade.php index 53c90eb..822b40e 100644 --- a/resources/views/gadaian/edit.blade.php +++ b/resources/views/gadaian/edit.blade.php @@ -939,7 +939,7 @@ channel.bind('my-kelulusan', function(data) { - if(data.norujukan == norujukan && data.siri == siricreated) + if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller) { if(data.kelulusan == 'lulus') { @@ -1046,7 +1046,7 @@ // console.log(message); - if(data.norujukan == norujukan && data.siri == siricreated) + if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller) { if(data.kelulusan == 'lulus') { diff --git a/resources/views/khazanah/info.blade.php b/resources/views/khazanah/info.blade.php index 9872b31..bbcde99 100644 --- a/resources/views/khazanah/info.blade.php +++ b/resources/views/khazanah/info.blade.php @@ -556,7 +556,7 @@ function checkAGH() { - + $('AGHModalEdit').hide(); } function checktuntutbaki(e) @@ -691,6 +691,7 @@ function ulangcetakagh(e) { var komen2 = $(e).data('komen2'); + var noruj = $(e).data('histid'); if(komen2 !== null) { @@ -711,6 +712,7 @@ } }else{ $('#AGHModalEdit').modal('show'); + $('#norujukanhiddenedit').val(noruj); swal.close(); } @@ -746,7 +748,7 @@ showConfirmButton: false, html: "
" + '' + - '', + '', icon: 'error', title: 'Surat Akuan Gadaian Hilang telah dikeluarkan!' }); @@ -802,6 +804,24 @@ }); + $('#negeriaghedit').change(function(){ + + var daerahselect = document.getElementById("daerahaghedit"); + + $('#daerahaghedit').attr('disabled', false); + $(daerahagh).empty(); + $.ajax({ + method:'get', + url: api_url + '/api/daerahkodnegeri/' + this.value, + success:function(data){ + $.each(data, function( index, daerah ){ + addOptionEdit(daerah.koddaerah,daerah.namadaerah); + }); + } + }); + + }); + function addOption(textopt,valueopt) { optionText = textopt; @@ -810,6 +830,14 @@ $('#daerahagh').append(``); } + function addOptionEdit(textopt,valueopt) { + + optionText = textopt; + optionValue = valueopt; + + $('#daerahaghedit').append(``); + } + function rekodasal(gadaian){ diff --git a/resources/views/khazanah/kelulusan.blade.php b/resources/views/khazanah/kelulusan.blade.php index 5c9909c..020e583 100644 --- a/resources/views/khazanah/kelulusan.blade.php +++ b/resources/views/khazanah/kelulusan.blade.php @@ -400,11 +400,14 @@ allowOutsideClick: false }) + let teller = $(e).closest('tr').children('td:eq(1)').text(); let norujukan = $(e).data('norujukan'); let pelulus = $(e).data('pelulus'); let siri = $(e).data('siri'); let namakhazanah = "{{ Auth::user()->name }}"; + teller = String(teller); + $.ajax({ method:'put', url: "{{ route('khazanah.updatekelulusan') }}", @@ -415,7 +418,8 @@ "siri" : siri, "komenkelulusan" : komenkelulusan, "pembatalan" : "batal", - 'namakhazanah' : namakhazanah + 'namakhazanah' : namakhazanah, + 'teller' : teller }, success:function(data){ @@ -476,15 +480,19 @@ let norujukan = $(e).data('norujukan'); + let teller = $(e).closest('tr').children('td:eq(1)').text(); let namakhazanah = "{{ $auth_user = Auth::user()->name }}"; + teller = String(teller); + $.ajax({ method:'put', url: "{{ route('khazanah.updatekelulusan') }}", data: { "_token": "{{ csrf_token() }}", "norujukan" : norujukan, - "khazanah" : namakhazanah + "khazanah" : namakhazanah, + 'teller' : teller }, success:function(data){ @@ -552,6 +560,9 @@ let norujukan = $(e).data('norujukan'); let namakhazanah = "{{ $auth_user = Auth::user()->name }}"; + let teller = $(e).closest('tr').children('td:eq(1)').text(); + + teller = String(teller); $.ajax({ method:'put', @@ -561,7 +572,9 @@ "norujukan" : norujukan, "khazanah" : namakhazanah, "komenubahhapus" : komenkelulusan, - "batal" : 'batal' + "batal" : 'batal', + 'teller' : teller + }, success:function(data){ diff --git a/resources/views/lelongan/index.blade.php b/resources/views/lelongan/index.blade.php index de0ebe8..85af903 100644 --- a/resources/views/lelongan/index.blade.php +++ b/resources/views/lelongan/index.blade.php @@ -307,11 +307,13 @@ encrypted: true }); + let teller = "{{ Auth::user()->name }}"; + var channel = pusher.subscribe('notice-ubahhapus'); channel.bind('my-ubahhapus', function(data) { - if(data.norujukan == norujukan) + if(data.norujukan == norujukan && data.teller == teller) { if(data.kelulusan == 'lulus') { diff --git a/resources/views/modal/agh.blade.php b/resources/views/modal/agh.blade.php index 276889f..e81f715 100644 --- a/resources/views/modal/agh.blade.php +++ b/resources/views/modal/agh.blade.php @@ -78,11 +78,11 @@
@csrf - +
- @@ -96,7 +96,7 @@
- @foreach($negeri as $neg) @endforeach @@ -108,7 +108,7 @@
-
diff --git a/resources/views/operasi/kelulusan.blade.php b/resources/views/operasi/kelulusan.blade.php index 5fc702c..4d661a1 100644 --- a/resources/views/operasi/kelulusan.blade.php +++ b/resources/views/operasi/kelulusan.blade.php @@ -400,6 +400,9 @@ let siri = $(e).data('siri'); let cawangankod = $(e).data('kodcaw'); let namaoperasi = "{{ Auth::user()->name }}"; + let teller = $(e).closest('tr').children('td:eq(1)').text(); + + teller = String(teller); $.ajax({ method:'put', @@ -411,7 +414,8 @@ "kodcaw" : cawangankod, "komenkelulusan" : komenkelulusan, "pembatalan" : "batal", - 'namaoperasi' : namaoperasi + 'namaoperasi' : namaoperasi, + 'teller' : teller }, success:function(data){ Swal.fire({ diff --git a/resources/views/penebusan/index.blade.php b/resources/views/penebusan/index.blade.php index 0d43793..572acd3 100644 --- a/resources/views/penebusan/index.blade.php +++ b/resources/views/penebusan/index.blade.php @@ -1284,7 +1284,7 @@ channel.bind('my-kelulusan', function(data) { console.log(data); - if(data.norujukan == norujukan && data.siri == siricreated) + if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller) { if(data.kelulusan == 'lulus') { @@ -1412,7 +1412,7 @@ channel.bind('my-kelulusan', function(data) { - if(data.norujukan == norujukan && data.siri == siricreated) + if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller) { if(data.kelulusan == 'lulus') { @@ -1558,7 +1558,7 @@ channel.bind('my-kelulusan', function(data) { - if(data.norujukan == norujukan && data.siri == siricreated) + if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller) { if(data.kelulusan == 'lulus') { @@ -1686,7 +1686,7 @@ channel.bind('my-kelulusan', function(data) { - if(data.norujukan == norujukan && data.siri == siricreated) + if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller) { if(data.kelulusan == 'lulus') { @@ -1902,7 +1902,7 @@ channel.bind('my-kelulusan', function(data) { - if(data.norujukan == norujukan && data.siri == siricreated) + if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller) { if(data.kelulusan == 'lulus') { @@ -2030,7 +2030,7 @@ channel.bind('my-kelulusan', function(data) { - if(data.norujukan == norujukan && data.siri == siricreated) + if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller) { if(data.kelulusan == 'lulus') { diff --git a/routes/web.php b/routes/web.php index 933a1fe..bbcada0 100644 --- a/routes/web.php +++ b/routes/web.php @@ -250,7 +250,7 @@ Route::get('/komoditi/rekod',['as'=>'rekod.komoditi','uses'=>'KomuditiController Route::get('/komoditi/rekod/print',['as'=>'komoditi.rekod.print','uses'=>'KomuditiController@printRekodTransaksi']); Route::post('/khazanah/suratakuangadaian',['as'=>'agh.create','uses'=>'KhazanahController@SuratAkuanGadaian'])->middleware('auth','khazanah'); -Route::put('/khazanah/suratakuangadaian',['as'=>'agh.update','uses'=>'KhazanahController@SuratAkuanGadaianUpdate'])->middleware('auth','khazanah'); +Route::post('/khazanah/suratakuangadaianedit',['as'=>'agh.update','uses'=>'KhazanahController@SuratAkuanGadaianUpdate'])->middleware('auth','khazanah'); Route::get('/khazanah/ulangcetakagh/{norujukan}',['as'=>'agh.ulangcetak','uses'=>'KhazanahController@ulangcetakSuratAkuanGadaianHilang'])->middleware('auth','khazanah'); From c4768119555f9b9ab1b137f7241a577df0f96fd4 Mon Sep 17 00:00:00 2001 From: "e.arrahn" Date: Thu, 15 Jul 2021 11:15:31 +0800 Subject: [PATCH 24/27] server --- app/Http/Controllers/KhazanahController.php | 4 ++-- resources/views/customers/info.blade.php | 2 +- resources/views/print/resitansuran.blade.php | 2 +- resources/views/print/sag.blade.php | 18 +++++++----------- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index 8d20f27..42387ae 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -2661,8 +2661,8 @@ class KhazanahController extends Controller $TotalTunaiDebit = 0; $TotalTunaiKredit = 0; - $TotalTunaiDebit = $pinjamandiberi['Gadai'] + $pembiayaantawarruq['Gadai'] + $rebet + $keuntungan + $imbangduga['serahan'] + $panjar['bds'] + $panjar['perubatan'] + $panjar['keraian'] + $bakilelong['rugilelong']; - $TotalTunaiKredit = $pinjamandiberi['Tebus'] + $pembiayaantawarruq['Tebus'] + $rebet + $keuntungan + $keuntungansebenar + $untungrugi + $bayaranpendahuluan + $imbangduga['pendahuluan'] + $bakilelong['bakilelong']; + $TotalTunaiDebit = $pinjamandiberi['Gadai'] + $pembiayaantawarruq['Gadai'] + $rebet + $keuntungan + $imbangduga['serahan'] + $panjar['bds'] + $panjar['perubatan'] + $panjar['keraian'] + $bakilelong['rugilelong']; + $TotalTunaiKredit = $pinjamandiberi['Tebus'] + $pembiayaantawarruq['Tebus'] + $rebet + $keuntungan + $keuntungansebenar + $untungrugi + $bayaranpendahuluan + $imbangduga['pendahuluan'] + $bakilelong['bakilelong']; array_push($Debit,['glcode' => '1000/010','descpt' => 'Tunai Di Tangan', 'amaun' => $TotalTunaiKredit]); array_push($Debit,['glcode' => '1000/013','descpt' => 'Pinjaman Diberi - Koop PKB', 'amaun' => $pinjamandiberi['Gadai']]); diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php index 180fde8..76f75d1 100644 --- a/resources/views/customers/info.blade.php +++ b/resources/views/customers/info.blade.php @@ -328,7 +328,7 @@
@php $poskod = Http::get($api_url . '/api/poskod/'. $customer_info['poskod'])->json(); - if(sizeof($poskod) < 1 || sizeof($poskod) > 1){ + if(empty($poskod)){ $poskod = array('koddaerah'=>'NIL','kodnegeri' => 'NIL'); } $daerah = Http::get($api_url . '/api/daerah/' . $poskod['koddaerah'])->json(); diff --git a/resources/views/print/resitansuran.blade.php b/resources/views/print/resitansuran.blade.php index 164c21d..6bda936 100644 --- a/resources/views/print/resitansuran.blade.php +++ b/resources/views/print/resitansuran.blade.php @@ -547,4 +547,4 @@ hr.new5 {
No SAG {{ $gadai_detail['norujukan'] }}
Marhun + @php foreach($marhun_detail as $index=>$marhun_customer){ echo '1'.$marhun_customer['marhun']. '(' .$marhun_customer['karat'].'),'; @@ -1298,7 +1308,7 @@ @if($gadai_detail['penilai'] == '') {{ $auth_username }} @else - {{ $gadai_detail['penilai'] }} + {{ $gadai_detail['teller'] }} @endif Tandatangan
-
\ No newline at end of file +
diff --git a/resources/views/print/sag.blade.php b/resources/views/print/sag.blade.php index f3d4088..610e3cf 100644 --- a/resources/views/print/sag.blade.php +++ b/resources/views/print/sag.blade.php @@ -7,8 +7,8 @@ @@ -467,7 +467,7 @@
@php $poskod = Http::get($api_url . '/api/poskod/'.$customer_detail['poskod'])->json(); - if(sizeof($poskod) < 1 || sizeof($poskod) > 1){ + if(empty($poskod)){ $poskod = array('koddaerah'=>'NIL','kodnegeri' => 'NIL'); } $daerah = Http::get($api_url . '/api/daerah/'.$poskod['koddaerah'])->json(); @@ -497,7 +497,7 @@
UPAH SEBULANKOS KEUNTUNGAN SEBULAN @php $upah_sbln = ($gadai_detail['kadarupah']/100) * $gadai_detail['pinjaman']; @@ -910,7 +910,7 @@ @php $poskod = Http::get($api_url . '/api/poskod/'.$customer_detail['poskod'])->json(); - if(sizeof($poskod) < 1 || sizeof($poskod) > 1){ + if(empty($poskod)){ $poskod = array('koddaerah'=>'NIL','kodnegeri' => 'NIL'); } $daerah = Http::get($api_url . '/api/daerah/'.$poskod['koddaerah'])->json(); @@ -940,7 +940,7 @@
UPAH SEBULANKOS KEUNTUNGAN SEBULAN @php $upah_sbln = ($gadai_detail['kadarupah']/100) * $gadai_detail['pinjaman']; @@ -1305,11 +1305,7 @@
- @if($gadai_detail['penilai'] == '') - {{ $auth_username }} - @else {{ $gadai_detail['teller'] }} - @endif Tandatangan