Merge branch 'pipi' into 'master'

lejer dan imbang duga

See merge request online-sistem1/kaunter!87
This commit is contained in:
hafifie rahman
2021-03-11 01:06:49 +00:00
10 changed files with 3049 additions and 2 deletions
+344 -1
View File
@@ -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();
+706
View File
@@ -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'));
}
}
@@ -0,0 +1,306 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">{{ __('Data Lejer AM') }}</div>
<div class="card-body text-center">
<div class="row form-group">
<div class="col-md-2">
<a href="{{ route('laporan') }}" class="ion-backspace" style="font-size:50px;color:blue;"></a>
</div>
<div class="col-md-15">
<h3>Data Lejer Am </h3>
</div>
</div>
<div class="container">
<form method="post">
@csrf
<div class="row">
<div class="col-sm-2">Mula</div>
<div class="col-sm-4"><input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datetimepicker1" name="datetimepicker1" autocomplete="off" aria-describedby="basic-addon1"></div>
</div>
<br> <div class="row">
<div class="col-sm-2">Hingga</div>
<div class="col-sm-4"><input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datetimepicker2" name="datetimepicker2" autocomplete="off" aria-describedby="basic-addon1"></div>
</div>
<br>
<div class="row">
<div class="col-sm-1"> </div> <div class="col-sm-6"><input type="submit" class="btn btn-warning ml-md-1" id="submit_button" name="submit_button" value="Kemaskini GL"><input type="submit" class="btn btn-primary ml-md-1" id="submit_button" name="submit_button" value="Ringkasan"><input type="submit" class="btn btn-danger ml-md-1" data-toggle="modal" data-target="#myModal" id="submit_button" name="submit_button" value="imbangduga"></div>
<div class="col-sm-3"></div>
<div class="col-sm-1"> <input type="submit" class="btn btn-success ml-md-1" id="submit_button" name="submit_button" value="Cetak Lejer AM" formaction="{{route('cetak.lejer_am')}}">
</div>
</div>
<br>
<div class="row">
<div class="col-sm-1"> </div>
<div class="col-sm-6"> </div>
<div class="col-sm-6"> </div>
</div>
</form>
</div><!--end section form-->
<br>
<br>
<div class="row">
<div class="col-md-12">
<table class="" id="myTable">
<thead>
<tr>
<th>Bil</th>
<th>Bil Gadaian</th>
<th>Jumlah Pinjaman (RM)</th>
<th>Peratusan %</th>
</tr>
</thead>
</table>
</div>
</div>
<div class="row">
<div class="col-md-12 text-right">
Bilangan Surat : <span id="bilangan_surat">3</span>
Jumlah Pinjaman : <span id="jumlah_pinjaman">RM 3,000.00</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var api_url = "<?php echo $api_url ?>";
var kodcaw = "<?php echo $cawangan_info['kodcaw'] ?>";
var tablecustomers = $('#myTable').DataTable({
"ordering": false
});
$(document).ready( function () {
console.log('dsasa');
$('#datetimepicker1').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;
$.ajax({
method:'get',
url: api_url + '/api/marhun/laporan/'+kodcaw+'/' + today_date,
success: function(customers){
customertable(customers);
},error: function(XMLHttpRequest, textStatus, errorThrown) {
console.log(textStatus);
}
});
});
$('#datetimepicker1').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];
$.ajax({
method:'get',
url: api_url + '/api/marhun/laporan/'+kodcaw+'/' + today_date,
success: function(customers){
customertable(customers);
}
});
});
function customertable(data){
var counter = 1;
tablecustomers.clear().draw();
$.each(data,function(index,customers){
tablecustomers.row.add([
counter,
customers['norujukan'],
customers['nokp'],
customers['nama'],
customers['marhun'],
customers['nota'],
customers['berat'],
customers['karat'],
customers['harga'],
customers['n_marhun'],
]).draw();
});
}
</script>
<script type="text/javascript">
$(document).ready( function () {
console.log('dsasa');
$('#datetimepicker2').datepicker({
format: 'dd-mm-yyyy'
});
});
</script>
<script type="text/javascript">
$(document).ready( function () {
console.log('dsasa');
$('#datetimepicker3').datepicker({
format: 'dd-mm-yyyy'
});
});
</script>
<div class="modal" id="myModal">
<div class="modal-dialog">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<h5 class="modal-title">Laporan Imbangan Duga Cawangan</h5>
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<!-- Modal body -->
<div class="modal-body">
<style>
#details {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 50%;
}
#details td, #details th {
padding: 8px;
font-size:11px;
}
#details tr:nth-child(even){background-color: #ffffff;}
#details tr:hover {background-color: #ffffff;}
#details th {
padding-top: 12px;
font-style:bold;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<form action="{{route('imbangduga.cetak')}}" method="post">
@csrf
<table id="details">
<tr>
<td> <input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datetimepicker3" name="datetimepicker3" autocomplete="off" aria-describedby="basic-addon1"> </td>
</tr>
<tr>
<td> <input type="submit" class="btn btn-success ml-md-5" id="submit_button" name="submit_button" value="Jana Laporan" > </td>
</tr>
</table>
</form>
</div>
<!-- Modal footer -->
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Kembali</button>
</div>
</div>
</div>
</div>
@endsection
@@ -0,0 +1,295 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">{{ __('Data Imbangduga') }}</div>
<div class="card-body text-center">
<div class="row form-group">
<div class="col-md-2">
<a href="{{ route('laporan') }}" class="ion-backspace" style="font-size:50px;color:blue;"></a>
</div>
<div class="col-md-15">
<h3>Data Imbangduga</h3>
</div>
</div>
<div class="container">
<form method="post">
@csrf
<div class="row">
<div class="col-sm-2">Mula</div>
<div class="col-sm-4"><input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datetimepicker1" name="datetimepicker1" autocomplete="off" aria-describedby="basic-addon1"></div>
</div>
<br> <div class="row">
<div class="col-sm-2">Hingga</div>
<div class="col-sm-4"><input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datetimepicker2" name="datetimepicker2" autocomplete="off" aria-describedby="basic-addon1"></div>
</div>
<br>
<div class="row">
<div class="col-sm-3"></div>
<div class="col-sm-1"> <input type="submit" class="btn btn-success ml-md-1" id="submit_button" name="submit_button" value="Cetak Laporan " formaction="{{route('imbangduga.cetak')}}">
</div>
</div>
<br>
<div class="row">
<div class="col-sm-1"> </div>
<div class="col-sm-6"> </div>
<div class="col-sm-6"> </div>
</div>
</form>
</div><!--end section form-->
<br>
<br>
<div class="row">
<div class="col-md-12">
<table class="" id="myTable">
<thead>
<tr>
<th>Bil</th>
<th>Bil Gadaian</th>
<th>Jumlah Pinjaman (RM)</th>
<th>Peratusan %</th>
</tr>
</thead>
</table>
</div>
</div>
<div class="row">
<div class="col-md-12 text-right">
Bilangan Surat : <span id="bilangan_surat">3</span>
Jumlah Pinjaman : <span id="jumlah_pinjaman">RM 3,000.00</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var api_url = "<?php echo $api_url ?>";
var kodcaw = "<?php echo $cawangan_info['kodcaw'] ?>";
var tablecustomers = $('#myTable').DataTable({
"ordering": false
});
$(document).ready( function () {
console.log('dsasa');
$('#datetimepicker1').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;
$.ajax({
method:'get',
url: api_url + '/api/marhun/laporan/'+kodcaw+'/' + today_date,
success: function(customers){
customertable(customers);
},error: function(XMLHttpRequest, textStatus, errorThrown) {
console.log(textStatus);
}
});
});
$('#datetimepicker1').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];
$.ajax({
method:'get',
url: api_url + '/api/marhun/laporan/'+kodcaw+'/' + today_date,
success: function(customers){
customertable(customers);
}
});
});
function customertable(data){
var counter = 1;
tablecustomers.clear().draw();
$.each(data,function(index,customers){
tablecustomers.row.add([
counter,
customers['norujukan'],
customers['nokp'],
customers['nama'],
customers['marhun'],
customers['nota'],
customers['berat'],
customers['karat'],
customers['harga'],
customers['n_marhun'],
]).draw();
});
}
</script>
<script type="text/javascript">
$(document).ready( function () {
console.log('dsasa');
$('#datetimepicker2').datepicker({
format: 'dd-mm-yyyy'
});
});
</script>
<script type="text/javascript">
$(document).ready( function () {
console.log('dsasa');
$('#datetimepicker3').datepicker({
format: 'dd-mm-yyyy'
});
});
</script>
<div class="modal" id="myModal">
<div class="modal-dialog">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<h5 class="modal-title">Laporan Imbangan Duga Cawangan</h5>
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<!-- Modal body -->
<div class="modal-body">
<style>
#details {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 50%;
}
#details td, #details th {
padding: 8px;
font-size:11px;
}
#details tr:nth-child(even){background-color: #ffffff;}
#details tr:hover {background-color: #ffffff;}
#details th {
padding-top: 12px;
font-style:bold;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<form action="{{route('imbangduga.cetak')}}" method="post">
@csrf
<table id="details">
<tr>
<td> <input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datetimepicker3" name="datetimepicker3" autocomplete="off" aria-describedby="basic-addon1"> </td>
</tr>
<tr>
<td> <input type="submit" class="btn btn-success ml-md-5" id="submit_button" name="submit_button" value="Jana Laporan" > </td>
</tr>
</table>
</form>
</div>
<!-- Modal footer -->
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Kembali</button>
</div>
</div>
</div>
</div>
@endsection
@@ -29,6 +29,12 @@
<div class="row">
<a href="" class="btn btn-danger btn-lg btn-block mb-3">Aging Pemodal</a>
</div>
{{-- <div class="row">
<a href="{{route('laporan.stokauditbersih')}}" class="btn btn-primary btn-lg btn-block mb-3">Stok Audit Bersih</a>
</div> --}}
{{-- <div class="row">
<a href="{{ route('laporan.stokauditdetails')}}" class="btn btn-primary btn-lg btn-block mb-3">Stok Audit Details</a>
</div> --}}
</div>
<div class="col-3 mx-1">
<div class="row">
@@ -49,6 +55,9 @@
<div class="row">
<a href="" class="btn btn-danger btn-lg btn-block mb-3">Aging Pelanggan</a>
</div>
<div class="row">
<a href="" class="btn btn-primary btn-lg btn-block mb-3" data-toggle="modal" data-target="#myModal">GL</a>
</div>
</div>
<div class="col-3 mx-1">
<div class="row">
@@ -66,6 +75,13 @@
<div class="row">
<a href="" class="btn btn-danger btn-lg btn-block mb-3">Aging Kawalan Stok</a>
</div>
<div class="row">
<a href="{{route('laporan.imbangduga')}}" class="btn btn-danger btn-lg btn-block mb-3">Laporan ImbangDuga </a>
</div>
<div class="row">
<a href="{{route('laporan.petibesi')}}" class="btn btn-primary btn-lg btn-block mb-3">Laporan Peti Besi</a>
</div>
</div>
</div>
</div>
@@ -73,4 +89,81 @@
</div>
</div>
</div>
<div class="modal" id="myModal">
<div class="modal-dialog">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<h4 class="modal-title">Laporan GL</h4>
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<!-- Modal body -->
<div class="modal-body">
<style>
#details {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 50%;
}
#details td, #details th {
padding: 8px;
font-size:11px;
}
#details tr:nth-child(even){background-color: #ffffff;}
#details tr:hover {background-color: #ffffff;}
#details th {
padding-top: 12px;
font-style:bold;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<center>
<table id="details">
<tr>
<td> <a href="" class="btn btn-primary btn-lg btn-block mb-1">Kod GL</a> </td>
</tr>
<tr>
<td> <a href="{{route('laporan.datalejer_am')}}" class="btn btn-primary btn-lg btn-block mb-1 ">Data Lejer Am</a> </td>
</tr>
</table>
</center>
</div>
<!-- Modal footer -->
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Kembali</button>
</div>
</div>
</div>
</div>
@endsection
@@ -0,0 +1,49 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">{{ __('Laporan Semakan Penebusan') }}</div>
<div class="card-body text-center">
<div class="row form-group">
<div class="col-md-2">
<a href="{{ route('laporan') }}" class="ion-backspace" style="font-size:50px;color:blue;"></a>
</div>
<div class="col-md-10">
<h3>Laporan Peti Besi</h3>
</div>
</div>
<div class="row">
<div class="col-md-5">
<form action="{{ route('petibesi.laporancetak') }}" target="_blank" method="post">
@csrf
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Tarikh</span>
</div>
<input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datetimepicker1" name="datetimepicker1" aria-describedby="basic-addon1">
<input type="submit" class="btn btn-primary ml-md-5" id="submit_button" name="submit_button" value="Cetak">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var api_url = "<?php echo $api_url ?>";
var kodcaw = "<?php echo $cawangan_info['kodcaw'] ?>";
var tablecustomers = $('#myTable').DataTable({
"ordering": false
});
</script>
@endsection
@@ -0,0 +1,526 @@
<style>
#header {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#header td, #customers th {
padding:4px;
font-size:10px;
}
#header tr:nth-child(even){background-color: #ffffff;}
#header tr:hover {background-color: #ddd;}
#header th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#scan {
font-family: Arial, Helvetica, sans-serif;
width: 100%;
border: 1px solid #ddd;
}
#scan td, #scan th {
padding: 8px;
font-size:12px;
}
#scan tr:nth-child(even){background-color: #ffffff;}
#scan tr:hover {background-color: #ddd;}
#scan th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#scan {
font-family: Arial, Helvetica, sans-serif;
width: 100%;
}
#scan td, #scan th {
padding: 8px;
font-size:12px;
}
#scan tr:nth-child(even){background-color: #ffffff;}
#scan tr:hover {background-color: #ddd;}
#scan th {
border-collapse: collapse;
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#details {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 50%;
}
#details td, #details th {
padding: 8px;
font-size:11px;
}
#details tr:nth-child(even){background-color: #ffffff;}
#details tr:hover {background-color: #ffffff;}
#details th {
padding-top: 12px;
font-style:bold;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#sign {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#sign td, #sign th {
padding: 8px;
font-size:11px;
text-align: center;
}
#sign tr:nth-child(even){background-color: #ffffff;}
#sign tr:hover {background-color: #ddd;}
#sign th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#title {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 50%;
}
#title td, #title th {
padding:4px;
font-size:12px;
border: 0px solid #fff;
}
#title tr:nth-child(even){background-color: #ffffff;}
#title tr:hover {background-color: #ddd;}
#title th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#details {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width:80%;
}
#details td, #details th {
padding:4px;
font-size:12px;
border: 1px solid #ddd;
}
#details tr:nth-child(even){background-color: #ffffff;}
#details tr:hover {background-color: #ddd;}
#details th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#tarikh_cetak {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 50%;
}
#tarikh_cetak td, #tarikh_cetak th {
padding:4px;
font-size:10px;
}
#tarikh_cetak tr:nth-child(even){background-color: #ffffff;}
#tarikh_cetak tr:hover {background-color: #ddd;}
#tarikh_cetak th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#data {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 80%;
}
#data td, #data th {
padding:4px;
font-size:12px;
font-size:12px;
}
#data tr:nth-child(even){background-color: #ffffff;}
#data tr:hover {background-color: #ddd;}
#data th {
padding-top: 11px;
padding-bottom: 11px;
text-align: left;
padding:4px;
color:black;
font-size:14px;
}
</style>
<style>
#tarikh_ib {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width:45%;
}
#tarikh_ib td, #tarikh_ib th {
padding:4px;
font-size:12px;
}
#tarikh_ib tr:nth-child(even){background-color: #ffffff;}
#tarikh_ib tr:hover {background-color: #ddd;}
#tarikh_ib th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#GL {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width:100%;
}
#GL td, #GL th {
padding:4px;
font-size:12px;
border: 1px solid #ddd;
}
#GL tr:nth-child(even){background-color: #ffffff;}
#GL tr:hover {background-color: #ddd;}
#GL th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#GL_dtl {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width:100%;
}
#GL_dtl td, #GL_dtl th {
padding:4px;
font-size:12px;
border: 1px solid #ddd;
}
#GL_dtl tr:nth-child(even){background-color: #ffffff;}
#GL_dtl tr:hover {background-color: #ddd;}
#GL_dtl th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#dtl_ib {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width:100%;
}
#dtl_ib td, #dtl_ib th {
padding:4px;
font-size:12px;
border: 1px solid #ddd;
}
#dtl_ib tr:nth-child(even){background-color: #ffffff;}
#dtl_ib tr:hover {background-color: #ddd;}
#dtl_ib th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#total_harta {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width:100%;
}
#total_harta td, #total_harta th {
padding:4px;
font-size:12px;
border: 1px solid #ddd;
}
#total_harta tr:nth-child(even){background-color: #ffffff;}
#total_harta tr:hover {background-color: #ddd;}
#total_harta th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<table id="header">
<tr>
<th rowspan="4" style="width:50px"><br><img src="{{ asset('img/ARRAHN1.png') }}" style="width:70px"></img></th>
<th colspan="1">KOPERASI PERMODALAN KELANTAN BERHAD</th>
</tr>
<tr>
<td>{{ $cawangan_detail['namacaw'] }}</td>
<td></td>
</tr>
<tr>
<td>{{ $cawangan_detail['alamat1'] }}</td>
<td></td>
</tr>
<tr>
<td>{{ $cawangan_detail['alamat2'].' No Tel : '. $cawangan_detail['notel'].' No Faks : '. $cawangan_detail['nofaks'] }}</td>
<td></td>
</tr>
</table>
<br>
<br>
<table id="tarikh_ib">
<tr>
<td cospan="2" > <B><U>LAPORAN IMBANGAN DUGA CAWANGAN</U></B></td>
</tr>
</table>
<BR>
<table id="tarikh_ib">
<tr><td style="width:10px" ><b>Tarikh Laporan</b></td ><td style="width:20px"> {{ ($tarikh_imbangan) ? $tarikh_imbangan : ''}} </td><td style="width:18px" ><b>Tarikh Cetak</b></td><td style="width:25px" > {{$tarikh_cetak}} </td> </tr>
</table>
<br>
<br>
<table id="GL_dtl">
<tr>
<th width="20%"> Kod GL </th>
<th colspan="1">Keterangan </th>
<th>Amaun</th>
</tr>
<tr>
<th><b> HARTA SEMASA</b> </th>
<th></th>
<th></th>
</tr>
@foreach($hartasemasa as $index => $assets)
<tr>
<td>{{ $assets['glcode'] }}</td>
<td>{{ $assets['descpt'] }}</td>
<td>{{ number_format($assets['amaun'],2) }}</td>
</tr>
@endforeach
<tr>
<td><b>JUMLAH </b></td>
<td colspan="1"></td>
<td>{{ number_format($totalhartasemasa,2) }}</td>
</tr>
</table>
<br>
<br>
<br>
<table id="GL_dtl">
<tr>
<th width="20%"><b> TANGGUNGAN SEMASA</b> </th>
<th></th>
<th></th>
</tr>
@foreach($tanggungansemasa as $index => $liabilities)
<tr>
<td>{{ $liabilities['glcode'] }}</td>
<td>{{ $liabilities['descpt'] }}</td>
<td>{{ number_format($liabilities['amaun'],2) }}</td>
</tr>
@endforeach
<tr>
<td><b>JUMLAH </b></td>
<td colspan="1"></td>
<td>{{ number_format($totaltanggungansemasa,2) }}</td>
</tr>
</table>
<br>
<br>
@@ -0,0 +1,434 @@
<style>
#header {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#header td, #customers th {
padding:4px;
font-size:10px;
}
#header tr:nth-child(even){background-color: #ffffff;}
#header tr:hover {background-color: #ddd;}
#header th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#scan {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#scan td, #scan th {
padding: 8px;
font-size:11px;
}
#scan tr:nth-child(even){background-color: #ffffff;}
#scan tr:hover {background-color: #ddd;}
#scan th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#scan {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#scan td, #scan th {
border-collapse: collapse;
padding: 8px;
font-size:11px;
}
#scan tr:nth-child(even){background-color: #ffffff;}
#scan tr:hover {background-color: #ddd;}
#scan th {
border-collapse: collapse;
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#details {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 50%;
}
#details td, #details th {
padding: 8px;
font-size:11px;
}
#details tr:nth-child(even){background-color: #ffffff;}
#details tr:hover {background-color: #ffffff;}
#details th {
padding-top: 12px;
font-style:bold;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#sign {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#sign td, #sign th {
padding: 8px;
font-size:11px;
text-align: center;
}
#sign tr:nth-child(even){background-color: #ffffff;}
#sign tr:hover {background-color: #ddd;}
#sign th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#title {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 50%;
}
#title td, #title th {
padding:4px;
font-size:12px;
border: 0px solid #fff;
}
#title tr:nth-child(even){background-color: #ffffff;}
#title tr:hover {background-color: #ddd;}
#title th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#details {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width:80%;
}
#details td, #details th {
padding:4px;
font-size:12px;
border: 0px solid #ddd;
}
#details tr:nth-child(even){background-color: #ffffff;}
#details tr:hover {background-color: #ddd;}
#details th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#title {
font-family: Arial, Helvetica, sans-serif;
width:95%;
}
#title td, #title th {
padding:4px;
font-size:12px;
}
#title tr:nth-child(even){background-color: #ffffff;}
#title tr:hover {background-color: #ddd;}
#title th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#tarikh_cetak {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width:50%;
}
#tarikh_cetak td, #tarikh_cetak th {
padding:4px;
font-size:12px;
}
#tarikh_cetak tr:nth-child(even){background-color: #ffffff;}
#tarikh_cetak tr:hover {background-color: #ddd;}
#tarikh_cetak th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#glejer {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width:100%;
}
#glejer td, #glejer th {
padding:4px;
font-size:12px;
border: 1px solid #ddd;
padding: 6px;
}
#glejer tr:nth-child(even){background-color: #ffffff;}
#glejer tr:hover {background-color: #ddd;}
#glejer th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<table id="header">
<tr>
<th rowspan="4" style="width:50px"><br><img src="{{ asset('img/ARRAHN1.png') }}" style="width:70px"></img></th>
<th colspan="1">KOPERASI PERMODALAN KELANTAN BERHAD</th>
</tr>
<tr>
<td>{{ $cawangan_detail['namacaw'] }}</td>
<td></td>
</tr>
<tr>
<td>{{ $cawangan_detail['alamat1'] }}</td>
<td></td>
</tr>
<tr>
<td>{{ $cawangan_detail['alamat2'].' No Tel : '. $cawangan_detail['notel'].' No Faks : '. $cawangan_detail['nofaks'] }}</td>
<td></td>
</tr>
</table>
<br>
<br>
<table id="title">
<td> <b><u>LEJER AM</u></b></td>
</table>
<br>
<table id="tarikh_cetak">
<tr>
<td style="width:5px" ><b>TARIKH DARI</b></td ><td style="width:1px"> {{$tarikh_mula}} </td>
<td style="width:5px" ><b>HINGGA</b></td><td style="width:1px"> {{$tarikh_akhir}} </td>
</tr>
</table>
<br>
<table id="glejer">
<tr>
<th style="width:10px">KOD GL</th><th colspan="2" style="width:50px"> KETERANGAN</th> <th style="width:5px">DEBIT</th> <th style="width:5px" >KREDIT</th><th style="width:10px">JUMLAH</th>
</tr>
@foreach($data as $index=>$var)
<tr>
<td style="width:10px">{{ $var['glcode']}}</td><td colspan="2" style="width:50px" >{{$var['descpt']}}</td><td style="width:5px" > {{$var['debit']}}</td><td style="width:5px"> {{$var['kredit']}} </td><td style="width:10px"> {{$var['jumlah']}} </td>
</tr>
@endforeach
<tr>
<td colspan="3" style="width:60px"><B>JUMLAH: </B></td><td><b>@foreach($debit as $db=>$vr) {{ number_format($vr['totalDebit'],2)}} @endforeach
</b></td><td> <b> @foreach($kredit as $db=>$vr) {{ number_format($vr['totalKredit'],2)}} @endforeach </b> </td>
<td> <b>
@foreach($kredit as $db=>$vr)
@foreach($debit as $db2=>$vr2)
{{ number_format($vr['totalKredit'] -$vr2['totalDebit'] ,2) }}
@endforeach
@endforeach
</b> </td>
</tr>
</table>
<br>
<br>
<table id="details">
<tr>
<th> </th><th> DISEMAK </th><th></th> <th> DISAHKAN </th><th></th>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td></td>
<td>........................................................</td><td></td>
<td>......................................................... </td>
<td> </td>
</tr>
</table>
@@ -0,0 +1,287 @@
<style>
#header {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#header td, #customers th {
padding:4px;
font-size:10px;
}
#header tr:nth-child(even){background-color: #ffffff;}
#header tr:hover {background-color: #ddd;}
#header th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#scan {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#scan td, #scan th {
padding: 8px;
font-size:11px;
}
#scan tr:nth-child(even){background-color: #ffffff;}
#scan tr:hover {background-color: #ddd;}
#scan th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#scan {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#scan td, #scan th {
border-collapse: collapse;
padding: 8px;
font-size:11px;
}
#scan tr:nth-child(even){background-color: #ffffff;}
#scan tr:hover {background-color: #ddd;}
#scan th {
border-collapse: collapse;
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#details {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 50%;
}
#details td, #details th {
padding: 8px;
font-size:11px;
}
#details tr:nth-child(even){background-color: #ffffff;}
#details tr:hover {background-color: #ddd;}
#details th {
padding-top: 12px;
font-style:bold;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#sign {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#sign td, #sign th {
padding: 8px;
font-size:11px;
text-align: center;
}
#sign tr:nth-child(even){background-color: #ffffff;}
#sign tr:hover {background-color: #ddd;}
#sign th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<table id="header">
<tr>
<th rowspan="4" style="width:50px"><br><img src="{{ asset('img/ARRAHN1.png') }}" style="width:70px"></img></th>
<th colspan="1">KOPERASI PERMODALAN KELANTAN BERHAD</th>
</tr>
<tr>
<td>{{ $cawangan_detail['namacaw'] }}</td>
<td></td>
</tr>
<tr>
<td>{{ $cawangan_detail['alamat1'] }}</td>
<td></td>
</tr>
<tr>
<td>{{ $cawangan_detail['alamat2'].' No Tel : '. $cawangan_detail['notel'].' No Faks : '. $cawangan_detail['nofaks'] }}</td>
<td></td>
</tr>
</table>
<br>
<table id="scan">
<tr>
<th colspan ="5"><b>LAPORAN BAKI PETI BESI</b></th>
<th> </th>
<th> </th>
<th><b> Tarikh Cetak:</b>
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate)
@endphp
</th>
<th></th>
</tr>
<tr>
<td style="width:10px"> <b>TARIKH</b></td>
<td>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $tebus_date);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate)
@endphp</td>
<td style="width:50px">
</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<br>
<table id="details">
<tr>
<th>BAKI AWAL</th>
</tr>
<tr>
<td>Baki Awal</td>
<td>:</td>
<td>RM {{ number_format($petibesi['bakiawal'],2) }}</td>
</tr>
<tr>
<th>TOLAK</th>
</tr>
<tr>
<td>Serahan Kepada Teller</td>
<td>:</td>
<td>RM {{ number_format($petibesi['keluar'],2) }}</td>
</tr>
<tr>
<td>Serahan Kepada HQ</td>
<td>:</td>
<td>RM {{ number_format($petibesi['serahan'],2) }}</td>
</tr>
<tr>
<th>TAMBAH</th>
</tr>
<tr>
<td>Pendahuluan Daripada Teller</td>
<td>:</td>
<td>RM {{ number_format($petibesi['masuk'],2) }}</td>
</tr>
<tr>
<td>Pendahuluan Daripada HQ</td>
<td>:</td>
<td>RM {{ number_format($petibesi['pendahuluan'],2) }}</td>
</tr>
<tr>
<th>BAKI AKHIR</th>
</tr>
<tr>
<td>Baki Akhir</td>
<td>:</td>
<td>RM {{ number_format($petibesi['bakiakhir'],2) }}</td>
</tr>
<tr>
<td>Baki Akhir Teller</td>
<td>:</td>
<td>RM 0.00</td>
</tr>
<tr>
<th>Baki Dibawa Kedepan </th>
<th>:</th>
<th>RM {{ number_format($petibesi['bakieod'],2) }}</th>
</tr>
</table>
<br>
<br>
<br>
<br>
<table id="sign">
<tr>
<td></td>
<td colspan="2"> .................................................................. </td>
<td> </td>
<td colspan="2">.................................................................. </td>
<td> </td>
</tr>
<tr>
<td></td>
<td colspan="2"><B> DI SEMAK</B> </td>
<td> </td>
<td colspan="2"><B>DI SAHKAN </B></td>
<td> </td>
</tr>
</table>
+9 -1
View File
@@ -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']);
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');