diff --git a/app/Http/Controllers/AliranTunaiController.php b/app/Http/Controllers/AliranTunaiController.php
index 84018d0..9fa72f9 100644
--- a/app/Http/Controllers/AliranTunaiController.php
+++ b/app/Http/Controllers/AliranTunaiController.php
@@ -34,7 +34,6 @@ class AliranTunaiController extends Controller
if(sizeof($latesttunai) > 0)
{
-
if($latesttunai[0]['baki'] != 0)
{
$alirantunai = Http::post(config('api.url') . '/api/tunai/daftarTunai/' . $auth_user['cawangan'], [
@@ -99,6 +98,350 @@ class AliranTunaiController extends Controller
$GT = $GT[0];
}
+ // ---LEJER AM-----
+ //data untuk lejer AM...pitih pendahuluan kepada cawangan 2021-02-12
+ //dapatkan glcode daripada table product
+ $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";
+
+ $tunaigadteb=Http::get(config('api.url').'/api/getTunaiGadTeb/'. $auth_user['cawangan'],['kodlaluan' => $auth_user['name']])->json();
+ if(sizeof($tunaigadteb)==0)
+ {
+ $tunaigadteb=Http::post(config('api.url').'/api/daftarTunaiGadteb/'.$auth_user['cawangan'],[
+ 'kodcaw'=>$auth_user['cawangan'],
+ 'teller'=>$auth_user['name'],
+ 'prkod'=>$prCode,
+ 'gadai'=>0.00,
+ 'tebus'=>0.00,
+ 'upah'=>0.00,
+ 'lain'=>0.00,
+ 'bakilelong'=>0.00,
+ 'byrbakilelong'=>0.00
+ ])->json();
+ }
+
+
+ //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
+
+ ]);
+
+ }
+
+ $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
+
+ ]);
+
+ }
+
+ $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'];
+
+ $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)
+ { //start kalau xdak data
+ $jumlah=0.0;
+
+ $getGLedjer=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$GL_CodeHutangArrahn])->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_CodeHutangArrahn])->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_CodeHutangArrahn])->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_CodeHutangArrahn,
+ 'descpt' =>$keterangan_PenghutangArrahn,
+ 'debit'=>0.0,
+ 'kredit'=>0.0,
+ 'hariini'=>$HariIni,
+ 'kelmarin'=>$kelmarin,
+ 'jumlah'=>$jumlah,
+ 'bulanini'=>$jumlahBulan_ini,
+ 'tahunini'=>$Jumlah_TahunIni,
+ 'acttype'=> $actype_PenghutangArrahn
+
+ ]);
+
+ }
+
+
+ $GL_penghutang_Akru=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=> $GL_CodeHutangAkru])->json();
+
+ $keterangan_Penghutang_Akru=$GL_penghutang_Akru[0]['descpt']; //keterangan glcode
+ $actype_PenghutangArrahn_Akru=$GL_penghutang_Akru[0]['acttype'];
+
+ $get_current_GLejer_Details_PA=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$GL_CodeHutangAkru])->json();
+
+ if(sizeof($get_current_GLejer_Details_PA)==0)
+ { //start kalau xdak data
+ $jumlah=0.0;
+
+ $getGLedjer=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=> $GL_CodeHutangAkru])->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_CodeHutangAkru])->json();
+
+ if( sizeof($get_GlejerBulan_Tahun)==0)
+ {
+ $jumlahBulan_ini=0.0;
+ }
+ else
+ {
+ $jumlahBulan_ini=$get_GlejerBulan_Tahun[0]['jumlah'];
+ $jumlahBulan_ini=$jumlah-$jumlahBulan_ini;
+ }
+ $Jumlah_TahunIni=0.0;
+ $get_Glejer_Tahun=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$GL_CodeHutangAkru])->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_CodeHutangAkru,
+ 'descpt' =>$keterangan_Penghutang_Akru,
+ 'debit'=>0.0,
+ 'kredit'=>0.0,
+ 'hariini'=>$HariIni,
+ 'kelmarin'=>$kelmarin,
+ 'jumlah'=>$jumlah,
+ 'bulanini'=>$jumlahBulan_ini,
+ 'tahunini'=>$Jumlah_TahunIni,
+ 'acttype'=> $actype_PenghutangArrahn_Akru
+
+ ]);
+
+ }
+
+ //--- GL LEJER AM TAMAT-----//
+
+
+
$api_url = config('api.url');
$gadai_tebus = Http::get(config('api.url').'/api/gadaitebus/listharini/'.$auth_user['cawangan'],['tarikh' => $harini->toDateString()])->json();
diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php
index 3d26df5..885d312 100644
--- a/app/Http/Controllers/KhazanahController.php
+++ b/app/Http/Controllers/KhazanahController.php
@@ -267,6 +267,219 @@ class KhazanahController extends Controller
'masuk'=>$totalmasuk,
'bakiakhir'=>$bakiakhir
]);
+
+
+ $getTunaigadTeb=Http::get(config('api.url').'/api/getTunaiGadTeb/'.$auth_user['cawangan'],['kodlaluan' => $tebus_detail['teller']])->json();
+
+
+ $gadai=$getTunaigadTeb['gadai'];
+ $tebus=$getTunaigadTeb['tebus'];
+ $tebusT=$tebus+$tebus_detail['pinjaman'];
+ $upah=$getTunaigadTeb['upah'];
+ $upahT=$upah+$tebus_detail['bakiupah'];
+
+
+
+
+ $updateTunaiGadTeb=Http::put(config('api.url').'/api/updateTunaiGadteb/'.$auth_user['cawangan'],[
+ 'kodlaluan' => $gadai_detail['teller'],
+ 'gadai'=>$gadai,
+ 'tebus'=>$tebusT,
+ 'upah'=>$upahT
+ ]);
+
+
+ $getVault=Http::get(config('api.url').'/api/VaultController/'.$auth_user['cawangan'])->json();
+ $bakiEOD=$getVault[0]['bakieod'];
+ $bakiAkhir_EOD=$tebus_detail['bakipjm']+$bakiEOD;
+
+
+
+
+
+ $updateBakiEod=Http::put(config('api.url').'/api/updateBakiEOD_Vault/'.$auth_user['cawangan'],[
+ 'bakieod'=>$bakiAkhir_EOD
+ ]);
+
+
+ //--GLEJER BERMULA UNTUK PENEBUSAN
+
+
+ $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'];
+
+
+ $get_GLCode=Http::get(config('api.url').'/api/getGlCode/'.$auth_user['cawangan'],['glcode'=>$kodGL])->json();
+ $keterangan=$get_GLCode[0]['descpt'];
+ $acctype=$get_GLCode[0]['acttype'];
+
+ $get_lejerPinj=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$kodGL])->json();
+ if(sizeof($get_lejerPinj)!=0)
+ {
+
+
+ $hariIni=$get_lejerPinj[0]['hariini'];
+ $jumlah=$get_lejerPinj[0]['kelmarin'];
+ $kredit=$get_lejerPinj[0]['kredit'];
+ $debit=$get_lejerPinj[0]['debit'];
+ $recno=$get_lejerPinj[0]['recno'];
+
+
+
+ $kredit=$kredit+$tebus_detail['bakipjm'];
+ $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'=>$hariIni,
+ 'kelmarin' =>$Kelmarin,
+
+ ]);
+
+
+ }
+ else
+ {
+
+ // kalau kosong getglejer
+
+
+ }
+
+
+
+
+
+ $get_GLCode=Http::get(config('api.url').'/api/getGlCode/'.$auth_user['cawangan'],['glcode'=>$glcode_UP])->json();
+ $keterangan=$get_GLCode[0]['descpt'];
+ $acctype=$get_GLCode[0]['acttype'];
+
+ $get_lejerPinjUpah=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$glcode_UP])->json();
+ if(sizeof($get_lejerPinjUpah)!=0)
+ {
+
+
+
+ $hariIniU=$get_lejerPinjUpah[0]['hariini'];
+ $jumlahU=$get_lejerPinjUpah[0]['kelmarin'];
+ $kreditU=$get_lejerPinjUpah[0]['kredit'];
+ $debitU=$get_lejerPinjUpah[0]['debit'];
+ $recnoU=$get_lejerPinjUpah[0]['recno'];
+
+
+ $kredit_U=$kreditU+$tebus_detail['bakiupah'];
+ $hariIniU=$debitU-$kreditU;
+ $kelmarinU=$jumlahU-$hariIniU;
+
+
+
+
+
+ $updateGlejerU=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[
+ 'recno'=>$recnoU,
+ 'debit'=>$debitU,
+ 'kredit'=>$kreditU,
+ 'hariini'=>$hariIniU,
+ 'kelmarin' =>$kelmarinU
+
+ ]);
+
+
+ }
+ else
+ {
+
+ $jumlah=0.0; $hariIniSemalam=0.0;
+ $getGlejer_prevUpah=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$glcode_UP])->json();
+ if(sizeof($getGlejer_prevUpah)!=0)
+ {
+
+ $jumSemalam=$getGlejer_prevUpah[0]['jumlah'];
+ $hariIniSemalam=$getGlejer_prevUpah[0]['hariini'];
+ $jumlah=$jumSemalam+$hariIniSemalam;
+
+ }
+ else
+ {
+
+ $jumlah=0.0;
+ }//end getGlejerPrev_Upah
+
+
+
+
+
+
+
+
+ $jumlahBulan_ini=0.0;
+ $get_GlejerBulan_Tahun=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$glcode_UP])->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'=>$glcode_UP])->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-$tebus_detail['bakiupah'];
+ $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' =>$glcode_UP,
+ 'descpt' =>$keterangan,
+ 'debit'=>0.0,
+ 'kredit'=>0.0,
+ 'hariini'=>$hariIni,
+ 'kelmarin'=>$kelmarin,
+ 'jumlah'=>$jumlah,
+ 'bulanini'=>$jumlahBulan_ini,
+ 'tahunini'=>$Jumlah_TahunIni,
+ 'acttype'=> $acctype
+
+ ]);
+
+
+
+
+ }
+
+
+
}
// $bakiakhir = $bakiawal-$keluar+$totalmasuk+$pendahuluan-$serahan;
@@ -1425,6 +1638,37 @@ class KhazanahController extends Controller
return view('print.laporan_batalsuratgadai', compact('batalgadai','cawangan_detail','tarikh_cetak','tebus_date','api_url'));
}
+ public function laporanPetiBesi(){
+ $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.petibesi',compact('cawangan_info','api_url'));
+ }
+
+ public function cetakLaporanPetiBesi(Request $request){
+ // dd($request);
+ $api_url = config('api.url');
+ $auth_user = Auth::user();
+ $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];
+ }
+ $petibesi = Http::get(config('api.url'). '/api/laporanpetibesi/'. $auth_user['cawangan'] .'/'. $tebus_date)->json();
+ $cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
+ $cawangan_detail=$cawangan[0];
+
+ return view('print.laporan_petibesi', compact('petibesi','cawangan_detail','tarikh_cetak','tebus_date','api_url'));
+ }
+
+
public function laporanMarhunHarian(){
$auth_user = Auth::user();
$api_url = config('api.url');
@@ -1826,4 +2070,466 @@ class KhazanahController extends Controller
return "GAGAL";
}
+
+
+
+ public function laporanImbangduga()
+ {
+ $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.imbangduga', compact('cawangan_info','api_url'));
+ }
+
+
+ public function cetakImbangDuga(Request $request)
+ {
+
+ // dd(request()->all());
+
+ $auth_user = Auth::user();
+ $api_url = config('api.url');
+
+ // dd($tarikh_aging);
+ $num=$request->num;
+ $current = Carbon::now();
+ $current = new Carbon();
+
+ $tarikh_cetak = $current->toDateString();
+
+ $tarikh_imbangan= $current->toDateString();
+ $tarikh_imbangan2= $current->toDateString();
+
+ if($request->datetimepicker1 == null){
+ $tarikh_cetak = $current->toDateString();
+ }else
+ {
+ $split_date = explode('-',$request->datetimepicker1);
+ $tarikh_imbangan = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
+ }
+
+
+ $tarikh_cetak = $current->toDateString();
+
+
+ if($request->datetimepicker2 == null){
+ $tarikh_cetak = $current->toDateString();
+ }else
+ {
+ $split_date = explode('-',$request->datetimepicker2);
+ $tarikh_imbangan2 = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
+ }
+
+ // //DAPATKAN DATA JUMLAH DARI IMBANGDUGA LAMA...
+ // $getData_ImbangdugaLama= Http::get(config('api.url') . '/api/imbangduga_lama/'. $auth_user['cawangan'])->json();
+ // $tunai_ditangan=$getData_ImbangdugaLama[0]['tunai_tangan'];
+ // $untung_t=$getData_ImbangdugaLama[0]['untung_t'];
+ // $pendahuluan_pkb_lama=$getData_ImbangdugaLama[0]['pendahuluan_pkb'];
+ // $serahan_pkb=$getData_ImbangdugaLama[0]['serahan_pkb'];
+ // $pendahuluan_jmc=$getData_ImbangdugaLama[0]['pendahuluan_jmc'];
+ // $penghutang_kaki_tangan=$getData_ImbangdugaLama[0]['penghutang'];
+
+
+
+
+ // //kira jumlah amaount PENDAHULUAN DARI PKB 2013
+
+ // $amt_2013=Http::get(config('api.url').'/api/gldetailkira_pendahuluan_2013/data/'.$auth_user['cawangan'])->json();
+ // $jumlah1=0.0;
+
+ // // dd($amt_2013);
+ // if(sizeof($amt_2013)!=0)
+ // {
+
+ // $jumlah1=$amt_2013[0]['amaun'];
+
+ // }
+ // else
+ // {
+ // $jumlah1=0.0;
+ // }
+ // $jumlah2=0.0; //pendahuluan pkb 2014
+ // $amt_2014=Http::get(config('api.url').'/api/gldetailkira_pendahuluan_2014/data/'.$auth_user['cawangan'])->json();
+
+ // if(sizeof($amt_2014)!=0)
+ // {
+
+ // $jumlah2=$amt_2014[0]['amaun'];
+ // }
+ // else
+ // {
+
+ // $jumlah2=0.0;
+
+ // }
+ // $jumlah_PendahuluanPKB=$jumlah1-$jumlah2+$pendahuluan_pkb_lama;
+
+ // //PENDAHULUAN DARI JMC/PKB
+ // $jumlah_jmc_2015=0.0;
+ // $get_Adv_JMC_2015=Http::get(config('api.url').'/gldetailkira_pendahuluanJMC_2015/data/'.$auth_user['cawangan'])->json();
+ // //dd($get_Adv_JMC_2015);
+ // //dd(sizeof($get_Adv_JMC_2015));
+ // if($get_Adv_JMC_2015!=null)
+
+ // {
+ // $jumlah_jmc_2015=$get_Adv_JMC_2015[0]['amaun'];
+ // }
+ // else
+ // {
+ // $jumlah_jmc_2015=0.0;
+ // }
+ // //PENDAHULUAN DARI JMC/PKB
+ // $jumlah_jmc_2014=0.0;
+ // $get_Adv_JMC_2014=Http::get(config('api.url').'/gldetailkira_pendahuluanJMC_2014/data/'.$auth_user['cawangan'])->json();
+ // if($get_Adv_JMC_2014!=null)
+ // {
+ // $jumlah_jmc_2014=$get_Adv_JMC_2014[0]['amaun'];
+ // }
+ // else
+ // {
+ // $jumlah_jmc_2014=0.0;
+ // }
+
+ // //////// //////////////////KIRAAN WANG MASUK KESELURUHAN /////////////////////////////////////
+ // //KIRA JUMLAH UPAH DIBAYAR:-
+ // $getUpahBayar=Http::get(config('api.url').'/api/jumlah_UpahDibayarAll/'.$auth_user['cawangan'])->json();
+
+
+ // $totalUpahBayar=0.0;
+ // if($getUpahBayar!=null)
+ // {
+ // $totalUpahBayar=$getUpahBayar[0]['upah'];
+ // }
+ // else
+
+ // {
+ // $totalUpahBayar=0.0;
+ // }
+ // //jumlah Bayaran Online
+ // //$total_JumlahBayaranOnline=
+ // $total_byrn_online=0.0;
+ // $jumlahBayaranOnlineAll=Http::get(config('api.url').'/api/jumlahBayaranOnlineAll/data/'.$auth_user['cawangan'])->json();
+ // if($jumlahBayaranOnlineAll!=null)
+ // {
+
+ // $total_byrn_online=$jumlahBayaranOnlineAll[0]['cash_in'];
+
+ // }
+ // else
+
+ // {
+ // $total_byrn_online=0.0;
+ // }
+ // $total_pendahuluan_JMC=$jumlah_jmc_2014+$pendahuluan_jmc;
+ // //Kira jumlah wang masuk keseluruhan
+ // $tunai_masuk=$jumlah_PendahuluanPKB+$totalUpahBayar+$total_pendahuluan_JMC+$total_byrn_online;
+
+ // //kira jumlah wang keluar // START DISINI
+
+ // /////////////////////KIRA JUMLAH WANG KELUAR ( GADAI)//////////
+
+ // $total_jumlahGadaian=0.0;
+ // $jumlahGadaianAll=Http::get(config('api.url').'/api/jumlahPinjaman_TerkumpulAll/'.$auth_user['cawangan'])->json();
+
+ // if($jumlahGadaianAll!=null)
+ // {
+ // $total_jumlahGadaian=$jumlahGadaianAll[0]['totalGadai'];
+ // }
+ // else
+ // {
+ // $total_jumlahGadaian=0.0;
+ // }
+
+
+ // //serahan kepada PKB
+ // $jumlah_serahHQ_PKB=0.0;
+ // $jumlah_SerahanPKB=Http::get(config('api.url').'/api/gldetailKira_SerahanHQ/data/'.$auth_user['cawangan'])->json();
+ // if($jumlah_SerahanPKB!=null)
+ // {
+
+ // $jumlah_serahHQ_PKB=$jumlah_SerahanPKB[0]['amaun'];
+
+
+ // }
+ // else
+ // {
+ // $jumlah_serahHQ_PKB=0.0;
+ // }
+ // $jumlah_SerahHQ=$jumlah_serahHQ_PKB+$serahan_pkb;
+
+
+ $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];
+
+ // $hartasemasa = Http::get(config('api.url').'/api/getGlCode/' . $auth_user['cawangan'] . '/acttype/A/')->json();
+ // $tanggungansemasa = Http::get(config('api.url').'/api/getGlCode/' . $auth_user['cawangan'] . '/acttype/L/')->json();
+
+ //Calculation Imbang Duga
+ $imbangduga = Http::get(config('api.url').'/api/CalculationPendahuluanSerahan/' . $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json();
+ $keuntungan = Http::get(config('api.url').'/api/KeuntunganArRahn/' . $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json();
+
+ //Harta semasa
+ $pinjamandiberi = Http::get(config('api.url').'/api/PinjamanDiberi/' . $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json();
+ $tunaiditangan = Http::get(config('api.url').'/api/TunaiDiTangan/' . $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json();
+
+
+ //Tanggungan Semasa
+ $panjar = Http::get(config('api.url').'/api/CalculationPanjar/' . $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json();
+ $bakilelong = Http::get(config('api.url').'/api/BakiLelongCalculation/' . $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json();
+ $wtd = Http::get(config('api.url').'/api/WTD/' . $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json();
+ $cajlelong = Http::get(config('api.url').'/api/cajlelong/' . $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json();
+ $keuntungansebenar = Http::get(config('api.url').'/api/KeuntunganSebenar/' . $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json();
+ //Terkumpul
+ $ringkasanterkumpul = Http::get(config('api.url'). '/api/gadai/laporan/ringkasan/'. $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json();
+ $ringkasanterkumpul = $ringkasanterkumpul[0];
+
+ $keseluruhanupahterkumpul = $ringkasanterkumpul['lelongupahsimpan'] + $ringkasanterkumpul['tebus'][0]['upahsimpan'] + $ringkasanterkumpul['advansur'][0]['upahsimpan'];
+
+
+ $hartasemasa = [];
+ // $hartasemasa = ['serahan' => $imbangduga['serahan'],'pinjamankoop' => $pinjamandiberi['pinjamankoop'],'emaspalsu' => $pinjamandiberi['emaspalsu'],'tunaiditangan' => $tunaiditangan['bakiakhir']];
+
+ array_push($hartasemasa,['glcode' => '1000/045','descpt' => 'Serahan Bayaran Online', 'amaun' => 0.00]);
+ array_push($hartasemasa,['glcode' => '1000/211','descpt' => 'Penghutang Ar-Rahn', 'amaun' => $keuntungan]);
+ array_push($hartasemasa,['glcode' => '1000/020','descpt' => 'Pendahuluan Kepada HQ', 'amaun' => $imbangduga['serahan']]);
+ array_push($hartasemasa,['glcode' => '1000/013','descpt' => 'Pinjaman Diberi - Koop PKB', 'amaun' => $pinjamandiberi['pinjamankoop']]);
+ array_push($hartasemasa,['glcode' => '1000/014','descpt' => 'Pinjaman Diberi - Emas Palsu / Kes', 'amaun' => $pinjamandiberi['emaspalsu']]);
+ array_push($hartasemasa,['glcode' => '1000/010','descpt' => 'Tunai Di Tangan', 'amaun' => $tunaiditangan['bakiakhir']]);
+
+ $totalhartasemasa = 0;
+ foreach($hartasemasa as $index => $hs)
+ {
+ $totalhartasemasa += $hs['amaun'];
+ }
+
+
+ $tanggungansemasa = [];
+
+ // $tanggungansemasa = ['pendahuluan' => $imbangduga['pendahuluan'],'bds' => $panjar['bds'],'perubatan' => $panjar['perubatan'],'keraian' => $panjar['keraian'],'bakilelong' => $bakilelong['bakilelong'],'rugilelong' => $bakilelong['rugilelong'],'wtd' => $wtd,'cajlelong' => $cajlelong];
+
+ array_push($tanggungansemasa,['glcode' => '2000/007','descpt' => 'Keuntungan Terakru', 'amaun' => $keuntungan]);
+ array_push($tanggungansemasa,['glcode' => '5000/013','descpt' => 'Keuntungan Sebenar','amaun' => $keuntungansebenar]);
+ array_push($tanggungansemasa,['glcode' => '7000/102','descpt' => 'Pendahuluan Daripada HQ','amaun' => $imbangduga['pendahuluan']]);
+ array_push($tanggungansemasa,['glcode' => '3000/017','descpt' => 'PANJAR - Baiki dan Selenggara','amaun' => -$panjar['bds']]);
+ array_push($tanggungansemasa,['glcode' => '3000/018','descpt' => 'PANJAR - Belanja AM','amaun' => -$panjar['perubatan']]);
+ array_push($tanggungansemasa,['glcode' => '3000/019','descpt' => 'PANJAR - Keraian Dan Promosi','amaun' => -$panjar['keraian']]);
+ array_push($tanggungansemasa,['glcode' => '7000/090','descpt' => 'Baki Lelong','amaun' => $bakilelong['bakilelong']]);
+ array_push($tanggungansemasa,['glcode' => '3000/020','descpt' => 'Kerugian Lelong','amaun' => $bakilelong['rugilelong']]);
+ array_push($tanggungansemasa,['glcode' => '3000/021','descpt' => 'WANG TAK DITUNTUT','amaun' => $wtd]);
+ array_push($tanggungansemasa,['glcode' => '5000/213','descpt' => 'Pendapatan Caj Lelong','amaun' => $cajlelong]);
+ array_push($tanggungansemasa,['glcode' => '7000/101','descpt' => 'Untung/Rugi Terkumpul','amaun' => $keseluruhanupahterkumpul]);
+
+
+
+ $totaltanggungansemasa = 0;
+ foreach($tanggungansemasa as $index => $ts)
+ {
+
+ $totaltanggungansemasa += $ts['amaun'];
+
+ }
+
+ return view('print.laporan_imbanduga',compact('tarikh_imbangan', 'tarikh_imbangan2','hartasemasa','tanggungansemasa','totalhartasemasa','totaltanggungansemasa','tarikh_cetak','cawangan_info','cawangan','api_url','cawangan_detail'));
+
+ }
+
+
+
+ //KE PAGE LEJER AM
+ public function data_lejer_am()
+ {
+ $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.datalejer_am', compact('cawangan_info', 'api_url'));
+ }
+
+ //print lejer_AM
+ 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";
+
+
+ $auth_user = Auth::user();
+ $api_url = config('api.url');
+
+ // dd($tarikh_aging);
+ $num=$request->num;
+ $current = Carbon::now();
+ $current = new Carbon();
+ $tarikh_cetak = $current->toDateString();
+
+ if($request->datetimepicker1 == null){
+ $tarikh_cetak = $current->toDateString();
+ }else
+ {
+ $split_date = explode('-',$request->datetimepicker1);
+ $tarikh_mula = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
+ }
+
+ if($request->datetimepicker2 == null)
+ {
+ $tarikh_cetak = $current->toDateString();
+
+ }
+ 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
+
+ $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'];
+
+ $get_GLCode=Http::get(config('api.url').'/api/getGlCode/'.$auth_user['cawangan'],['glcode'=>$kodGL])->json();
+
+ $keterangan=$get_GLCode[0]['descpt'];
+ $acctype=$get_GLCode[0]['acttype'];
+
+ $total_bayaranOnline=0.0;
+
+
+ // $getTotalBayaranOnline=Http::get(config('api.url').'/api/ansuranByrOnline/'.$auth_user['cawangan'])->json();
+ // if(sizeof($getTotalBayaranOnline)!=0)
+ // {
+
+ // $total_bayaranOnline=$getTotalBayaranOnline[0]['cash_in'];
+
+ // }
+ // 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'));
+
+
+ }
+
}
\ No newline at end of file
diff --git a/resources/views/khazanah/laporan/datalejer_am.blade.php b/resources/views/khazanah/laporan/datalejer_am.blade.php
new file mode 100644
index 0000000..abcd5d5
--- /dev/null
+++ b/resources/views/khazanah/laporan/datalejer_am.blade.php
@@ -0,0 +1,306 @@
+@extends('layouts.app')
+
+@section('content')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | Bil |
+ Bil Gadaian |
+ Jumlah Pinjaman (RM) |
+ Peratusan % |
+
+
+
+
+
+
+
+
+
+ Bilangan Surat : 3
+ Jumlah Pinjaman : RM 3,000.00
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@endsection
+
+
+
diff --git a/resources/views/khazanah/laporan/imbangduga.blade.php b/resources/views/khazanah/laporan/imbangduga.blade.php
new file mode 100644
index 0000000..2258c23
--- /dev/null
+++ b/resources/views/khazanah/laporan/imbangduga.blade.php
@@ -0,0 +1,295 @@
+@extends('layouts.app')
+
+@section('content')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | Bil |
+ Bil Gadaian |
+ Jumlah Pinjaman (RM) |
+ Peratusan % |
+
+
+
+
+
+
+
+
+
+ Bilangan Surat : 3
+ Jumlah Pinjaman : RM 3,000.00
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@endsection
+
+
+
diff --git a/resources/views/khazanah/laporan/index.blade.php b/resources/views/khazanah/laporan/index.blade.php
index 236003e..5dd0223 100644
--- a/resources/views/khazanah/laporan/index.blade.php
+++ b/resources/views/khazanah/laporan/index.blade.php
@@ -29,6 +29,12 @@
+ {{-- --}}
+ {{-- --}}
@@ -73,4 +89,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@endsection
diff --git a/resources/views/khazanah/laporan/petibesi.blade.php b/resources/views/khazanah/laporan/petibesi.blade.php
new file mode 100644
index 0000000..a26f7de
--- /dev/null
+++ b/resources/views/khazanah/laporan/petibesi.blade.php
@@ -0,0 +1,49 @@
+@extends('layouts.app')
+
+@section('content')
+
+
+@endsection
+
diff --git a/resources/views/print/laporan_imbanduga.blade.php b/resources/views/print/laporan_imbanduga.blade.php
new file mode 100644
index 0000000..876b2b1
--- /dev/null
+++ b/resources/views/print/laporan_imbanduga.blade.php
@@ -0,0 +1,526 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | LAPORAN IMBANGAN DUGA CAWANGAN |
+
+
+
+
+
+
+
+
+
+| Tarikh Laporan | {{ ($tarikh_imbangan) ? $tarikh_imbangan : ''}} | Tarikh Cetak | {{$tarikh_cetak}} |
+
+
+
+
+
+
+
+
+
+
+ | Kod GL |
+ Keterangan |
+ Amaun |
+
+
+
+ | HARTA SEMASA |
+ |
+ |
+
+
+ @foreach($hartasemasa as $index => $assets)
+
+ | {{ $assets['glcode'] }} |
+ {{ $assets['descpt'] }} |
+ {{ number_format($assets['amaun'],2) }} |
+
+ @endforeach
+
+
+ | JUMLAH |
+ |
+ {{ number_format($totalhartasemasa,2) }} |
+
+
+
+
+
+
+
+
+
+ | TANGGUNGAN SEMASA |
+ |
+ |
+
+
+ @foreach($tanggungansemasa as $index => $liabilities)
+
+ | {{ $liabilities['glcode'] }} |
+ {{ $liabilities['descpt'] }} |
+ {{ number_format($liabilities['amaun'],2) }} |
+
+ @endforeach
+
+
+ | JUMLAH |
+ |
+ {{ number_format($totaltanggungansemasa,2) }} |
+
+
+
+
+
+
diff --git a/resources/views/print/laporan_lejer_am.blade.php b/resources/views/print/laporan_lejer_am.blade.php
new file mode 100644
index 0000000..43c3fe3
--- /dev/null
+++ b/resources/views/print/laporan_lejer_am.blade.php
@@ -0,0 +1,434 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+| TARIKH DARI | {{$tarikh_mula}} |
+HINGGA | {{$tarikh_akhir}} |
+
+
+
+
+
+
+
+
+| KOD GL | KETERANGAN | DEBIT | KREDIT | JUMLAH |
+
+@foreach($data as $index=>$var)
+
+
+| {{ $var['glcode']}} | {{$var['descpt']}} | {{$var['debit']}} | {{$var['kredit']}} | {{$var['jumlah']}} |
+
+
+
+
+
+@endforeach
+
+
+| 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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+| | DISEMAK | | DISAHKAN | |
+
+
+
+| |
+ |
+
+ |
+
+ |
+
+
+
+
+
+| |
+ |
+
+ |
+
+ |
+
+
+
+
+
+
+
+
+
+ |
+ ........................................................ | |
+ ......................................................... |
+ |
+
+
+
\ No newline at end of file
diff --git a/resources/views/print/laporan_petibesi.blade.php b/resources/views/print/laporan_petibesi.blade.php
new file mode 100644
index 0000000..e104350
--- /dev/null
+++ b/resources/views/print/laporan_petibesi.blade.php
@@ -0,0 +1,287 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | LAPORAN BAKI PETI BESI |
+ |
+ |
+ Tarikh Cetak:
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate)
+ @endphp
+ |
+ |
+
+
+ | TARIKH |
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $tebus_date);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate)
+ @endphp |
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+ | BAKI AWAL |
+
+
+ | Baki Awal |
+ : |
+ RM {{ number_format($petibesi['bakiawal'],2) }} |
+
+
+
+ | TOLAK |
+
+
+ | Serahan Kepada Teller |
+ : |
+ RM {{ number_format($petibesi['keluar'],2) }} |
+
+
+ | Serahan Kepada HQ |
+ : |
+ RM {{ number_format($petibesi['serahan'],2) }} |
+
+
+
+
+ | TAMBAH |
+
+
+ | Pendahuluan Daripada Teller |
+ : |
+ RM {{ number_format($petibesi['masuk'],2) }} |
+
+
+ | Pendahuluan Daripada HQ |
+ : |
+ RM {{ number_format($petibesi['pendahuluan'],2) }} |
+
+
+
+ | BAKI AKHIR |
+
+
+ | Baki Akhir |
+ : |
+ RM {{ number_format($petibesi['bakiakhir'],2) }} |
+
+
+ | Baki Akhir Teller |
+ : |
+ RM 0.00 |
+
+
+
+
+ | Baki Dibawa Kedepan |
+ : |
+ RM {{ number_format($petibesi['bakieod'],2) }} |
+
+
+
+
+
+
+
+
+
+
+ |
+ .................................................................. |
+ |
+ .................................................................. |
+ |
+
+
+ |
+ DI SEMAK |
+ |
+ DI SAHKAN |
+ |
+
+
+
+
+
+
+
+
diff --git a/routes/web.php b/routes/web.php
index f60adca..4e802a5 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -170,6 +170,8 @@ Route::get('/laporan/batalsuratgadai',['as'=>'laporan.batalsuratgadai','uses'=>'
Route::post('laporan/batalsuratgadai/cetak',['as'=>'batalsuratgadai.laporancetak','uses'=>'KhazanahController@cetakLaporanBatalSuratGadai'])->middleware('auth','khazanah');
Route::get('/laporan/marhunharian',['as'=>'laporan.marhunharian','uses'=>'KhazanahController@laporanMarhunHarian'])->middleware('auth','khazanah');
Route::post('laporan/marhunharian/cetak',['as'=>'marhunharian.laporancetak','uses'=>'KhazanahController@cetakLaporanMarhunHarian'])->middleware('auth','khazanah');
+Route::get('/laporan/petibesi',['as'=>'laporan.petibesi','uses'=>'KhazanahController@laporanPetiBesi'])->middleware('auth','khazanah');
+Route::post('laporan/petibesi/cetak',['as'=>'petibesi.laporancetak','uses'=>'KhazanahController@cetakLaporanPetiBesi'])->middleware('auth','khazanah');
Route::get('/laporan/marhunterkumpul',['as'=>'laporan.marhunterkumpul','uses'=>'KhazanahController@laporanMarhunTerkumpul'])->middleware('auth','khazanah');
Route::post('laporan/marhunterkumpul/cetak',['as'=>'marhunterkumpul.laporancetak','uses'=>'KhazanahController@cetakLaporanMarhunTerkumpul'])->middleware('auth','khazanah');
Route::get('laporan/ringkasanharian/cetak',['as'=>'ringkasanharian.laporancetak','uses'=>'KhazanahController@cetakLaporanRingkasanHarian'])->middleware('auth','khazanah');
@@ -205,4 +207,10 @@ Route::post('/operasi/hargaemas',['as'=>'hargaemas.create','uses'=>'OperasiContr
Route::get('/komoditi',['as'=>'komuditi','uses'=>'KomuditiController@index']);
Route::get('/komoditi/rekod',['as'=>'rekod.komoditi','uses'=>'KomuditiController@rekodKomoditi']);
-Route::get('/komoditi/rekod/print',['as'=>'komoditi.rekod.print','uses'=>'KomuditiController@printRekodTransaksi']);
\ No newline at end of file
+Route::get('/komoditi/rekod/print',['as'=>'komoditi.rekod.print','uses'=>'KomuditiController@printRekodTransaksi']);
+
+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');
+
+Route::get('laporan/dataimbangduga',['as'=> 'laporan.imbangduga' , 'uses'=>'KhazanahController@laporanImbangduga' ])->middleware('auth','khazanah');
+Route::post('/laporan/imbangduga',['as' =>'imbangduga.cetak', 'uses'=>'KhazanahController@cetakImbangDuga'])->middleware('auth', 'khazanah');