perubahan dari segi alirantunai upah semua la okay?
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -3182,6 +3182,15 @@ class KhazanahController extends Controller
|
||||
return view('print.laporan_marhunterkumpul', compact('marhun','cawangan_detail','tarikh_cetak','tebus_date','api_url'));
|
||||
}
|
||||
|
||||
public function laporanRingkasanTerkumpul(){
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
|
||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
|
||||
return view('khazanah.laporan.ringkasanterkumpul',compact('cawangan_info','api_url'));
|
||||
}
|
||||
|
||||
public function laporanRingkasanHarian(){
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
@@ -3278,21 +3287,33 @@ class KhazanahController extends Controller
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$tarikh_cetak = $current->toDateString();
|
||||
if($request->datetimepicker1 == null){
|
||||
$tebus_date = $current->toDateString();
|
||||
}else{
|
||||
$split_date = explode('-',$request->datetimepicker1);
|
||||
$tebus_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
}
|
||||
$marhun = Http::get(config('api.url'). '/api/gadai/laporan/ringkasan/'. $auth_user['cawangan'],['tarikh' => $tebus_date])->json();
|
||||
$marhun = $marhun[0];
|
||||
|
||||
$keseluruhanupahsimpan = $marhun['lelongupahsimpan'] + $marhun['tebus'][0]['upahsimpan'] + $marhun['advansur'][0]['upahsimpan'];
|
||||
if($request->datemula == null){
|
||||
$mula_date = '2017-01-01';
|
||||
}else{
|
||||
$split_date = explode('-', $request->datemula);
|
||||
$mula_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
}
|
||||
|
||||
if($request->datehingga == null){
|
||||
$hingga_date = $current->toDateString();
|
||||
}else{
|
||||
$split_date = explode('-', $request->datehingga);
|
||||
$hingga_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
}
|
||||
|
||||
$laporan_ringkasan = Http::get(config('api.url') . '/api/laporan/terkumpul',[
|
||||
'kodcaw' => $auth_user['cawangan'],
|
||||
'mula' => $mula_date,
|
||||
'akhir' => $hingga_date
|
||||
])->json();
|
||||
|
||||
$laporan_ringkasan = $laporan_ringkasan[0];
|
||||
|
||||
$cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
$cawangan_detail=$cawangan[0];
|
||||
// dd($gadai);
|
||||
return view('print.laporan_ringkasanterkumpul', compact('keseluruhanupahsimpan','marhun','cawangan_detail','tarikh_cetak','tebus_date','api_url'));
|
||||
|
||||
return view('print.laporan_ringkasanterkumpulv2', compact('laporan_ringkasan','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url'));
|
||||
}
|
||||
|
||||
public function laporanKawalanStok(){
|
||||
@@ -3486,335 +3507,6 @@ class KhazanahController extends Controller
|
||||
|
||||
$amaun=$request->amaun;
|
||||
|
||||
if($request->jenisgldetail == 'serahan')
|
||||
{
|
||||
|
||||
|
||||
|
||||
$KOD_SERAH='1000/020';
|
||||
$TUNAI='1000/010';
|
||||
$get_glCode_Details=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json();
|
||||
|
||||
$gl_cdetails=$get_glCode_Details[0];
|
||||
$keterangan=$get_glCode_Details[0]['descpt']; //keterangan glcode
|
||||
$actype=$get_glCode_Details[0]['acttype']; //keterangan acctype
|
||||
|
||||
$get_current_GLejer_Details=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json();
|
||||
if(sizeof($get_current_GLejer_Details)==0)
|
||||
{
|
||||
|
||||
$jumlah=0.0;
|
||||
|
||||
|
||||
$getGLedjer=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json();
|
||||
if(sizeof($getGLedjer)==0)
|
||||
{
|
||||
$jumlah=0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//$glejer=$getGLedjer[0];
|
||||
$jumlahSemalam=$getGLedjer[0]['jumlah'];
|
||||
|
||||
$hariIniSemalam=$getGLedjer[0]['hariini'];
|
||||
$jumlah=$jumlahSemalam+$hariIniSemalam;
|
||||
|
||||
|
||||
}
|
||||
$jumlahBulan_ini=0.0;
|
||||
$get_GlejerBulan_Tahun=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json();
|
||||
|
||||
if( sizeof($get_GlejerBulan_Tahun)==0)
|
||||
{
|
||||
$jumlahBulan_ini=0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$jumlahBulan_ini=$get_GlejerBulan_Tahun[0]['jumlah'];
|
||||
$jumlahBulan_ini=$jumlah-$jumlahBulan_ini;
|
||||
|
||||
|
||||
}//end bulan tahun
|
||||
$Jumlah_TahunIni=0.0;
|
||||
$get_Glejer_Tahun=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json();
|
||||
if(sizeof($get_Glejer_Tahun)==0)
|
||||
{
|
||||
$Jumlah_TahunIni=0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
$JumTahunIni=$get_Glejer_Tahun[0]['jumlah'];
|
||||
|
||||
$Jumlah_TahunIni=$jumlah-$JumTahunIni;
|
||||
|
||||
|
||||
}
|
||||
|
||||
$HariIni=0.0;
|
||||
$kelmarin=$jumlah-$HariIni;
|
||||
//insert glejer untuk current date /hari ini
|
||||
$daftarGlejer=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[
|
||||
|
||||
'kodcaw'=>$auth_user['cawangan'],
|
||||
'glcode'=>$KOD_SERAH,
|
||||
'descpt'=>$keterangan,
|
||||
'debit'=>$amaun,
|
||||
'kredit'=>0.0,
|
||||
'hariini'=>$HariIni,
|
||||
'kelmarin'=>$kelmarin,
|
||||
'jumlah'=>$jumlah,
|
||||
'bulanini'=>$jumlahBulan_ini,
|
||||
'tahunini'=>$Jumlah_TahunIni,
|
||||
'acttype'=> $actype
|
||||
|
||||
]);
|
||||
|
||||
$get_lejer=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$TUNAI])->json();
|
||||
|
||||
$hariIni=$get_lejer[0]['hariini'];
|
||||
$jumlah=$get_lejer[0]['kelmarin'];
|
||||
$kredit=$get_lejer[0]['kredit'];
|
||||
$debit=$get_lejer[0]['debit'];
|
||||
$recno=$get_lejer[0]['recno'];
|
||||
|
||||
$kredit=$kredit+$amaun;
|
||||
$Hari_Ini=$debit-$kredit;
|
||||
$Kelmarin=$jumlah-$Hari_Ini;
|
||||
$update_lejerTunai=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[
|
||||
'recno'=>$recno,
|
||||
'debit'=>$debit,
|
||||
'kredit'=>$kredit,
|
||||
'hariini'=>$Hari_Ini,
|
||||
'kelmarin' =>$kelmarin,
|
||||
|
||||
]);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$hariIni_serah=$get_current_GLejer_Details=[0]['hariini'];
|
||||
$jumlah_serah=$get_current_GLejer_Details=[0]['kelmarin'];
|
||||
$kredit_serah=$get_current_GLejer_Details=[0]['kredit'];
|
||||
$debit_serah=$get_current_GLejer_Details=[0]['debit'];
|
||||
$recno_serah=$get_current_GLejer_Details=[0]['recno'];
|
||||
|
||||
|
||||
|
||||
$debit_serah=$debit_serah+$amaun;
|
||||
$hariIni_serah=$debit_serah-$kredit_serah;
|
||||
$kelmarin_serah=$jumlah_serah-$hariIni_serah;
|
||||
$update_lejerSerah=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[
|
||||
'recno'=>$recno_serah,
|
||||
'debit'=>$debit_serah,
|
||||
'kredit'=>$kredit_serah,
|
||||
'hariini'=>$hariIni_serah,
|
||||
'kelmarin' =>$kelmarin_serah,
|
||||
|
||||
]);
|
||||
|
||||
|
||||
$get_lejer=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$TUNAI])->json();
|
||||
|
||||
$hariIni=$get_lejer[0]['hariini'];
|
||||
$jumlah=$get_lejer[0]['kelmarin'];
|
||||
$kredit=$get_lejer[0]['kredit'];
|
||||
$debit=$get_lejer[0]['debit'];
|
||||
$recno=$get_lejer[0]['recno'];
|
||||
|
||||
$kredit=$kredit+$amaun;
|
||||
$Hari_Ini=$debit-$kredit;
|
||||
$Kelmarin=$jumlah-$Hari_Ini;
|
||||
$update_lejerTunai=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[
|
||||
'recno'=>$recno,
|
||||
'debit'=>$debit,
|
||||
'kredit'=>$kredit,
|
||||
'hariini'=>$Hari_Ini,
|
||||
'kelmarin' =>$Kelmarin,
|
||||
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if($request->jenisgldetail == 'pendahuluan')
|
||||
{
|
||||
|
||||
|
||||
|
||||
$KOD_SERAH='7000/102';
|
||||
$TUNAI='1000/010';
|
||||
$get_glCode_Details=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json();
|
||||
|
||||
$gl_cdetails=$get_glCode_Details[0];
|
||||
$keterangan=$get_glCode_Details[0]['descpt']; //keterangan glcode
|
||||
$actype=$get_glCode_Details[0]['acttype']; //keterangan acctype
|
||||
|
||||
$get_current_GLejer_Details=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json();
|
||||
if(sizeof($get_current_GLejer_Details)==0)
|
||||
{
|
||||
|
||||
$jumlah=0.0;
|
||||
|
||||
|
||||
$getGLedjer=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json();
|
||||
if(sizeof($getGLedjer)==0)
|
||||
{
|
||||
$jumlah=0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//$glejer=$getGLedjer[0];
|
||||
$jumlahSemalam=$getGLedjer[0]['jumlah'];
|
||||
|
||||
$hariIniSemalam=$getGLedjer[0]['hariini'];
|
||||
$jumlah=$jumlahSemalam+$hariIniSemalam;
|
||||
|
||||
|
||||
}
|
||||
$jumlahBulan_ini=0.0;
|
||||
$get_GlejerBulan_Tahun=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json();
|
||||
|
||||
if( sizeof($get_GlejerBulan_Tahun)==0)
|
||||
{
|
||||
$jumlahBulan_ini=0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$jumlahBulan_ini=$get_GlejerBulan_Tahun[0]['jumlah'];
|
||||
$jumlahBulan_ini=$jumlah-$jumlahBulan_ini;
|
||||
|
||||
|
||||
}//end bulan tahun
|
||||
$Jumlah_TahunIni=0.0;
|
||||
$get_Glejer_Tahun=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$KOD_SERAH])->json();
|
||||
if(sizeof($get_Glejer_Tahun)==0)
|
||||
{
|
||||
$Jumlah_TahunIni=0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
$JumTahunIni=$get_Glejer_Tahun[0]['jumlah'];
|
||||
|
||||
$Jumlah_TahunIni=$jumlah-$JumTahunIni;
|
||||
|
||||
|
||||
}
|
||||
|
||||
$HariIni=0.0;
|
||||
$kelmarin=$jumlah-$HariIni;
|
||||
//insert glejer untuk current date /hari ini
|
||||
$daftarGlejer=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[
|
||||
|
||||
'kodcaw'=>$auth_user['cawangan'],
|
||||
'glcode'=>$KOD_SERAH,
|
||||
'descpt'=>$keterangan,
|
||||
'debit'=>0.0,
|
||||
'kredit'=>$amaun,
|
||||
'hariini'=>$HariIni,
|
||||
'kelmarin'=>$kelmarin,
|
||||
'jumlah'=>$jumlah,
|
||||
'bulanini'=>$jumlahBulan_ini,
|
||||
'tahunini'=>$Jumlah_TahunIni,
|
||||
'acttype'=> $actype
|
||||
|
||||
]);
|
||||
|
||||
$get_lejer=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$TUNAI])->json();
|
||||
|
||||
$hariIni=$get_lejer[0]['hariini'];
|
||||
$jumlah=$get_lejer[0]['kelmarin'];
|
||||
$kredit=$get_lejer[0]['kredit'];
|
||||
$debit=$get_lejer[0]['debit'];
|
||||
$recno=$get_lejer[0]['recno'];
|
||||
|
||||
$debit=$debit+$amaun;
|
||||
$Hari_Ini=$debit-$kredit;
|
||||
$Kelmarin=$jumlah-$Hari_Ini;
|
||||
$update_lejerTunai=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[
|
||||
'recno'=>$recno,
|
||||
'debit'=>$debit,
|
||||
'kredit'=>$kredit,
|
||||
'hariini'=>$Hari_Ini,
|
||||
'kelmarin' =>$kelmarin,
|
||||
|
||||
]);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$hariIni_serah=$get_current_GLejer_Details=[0]['hariini'];
|
||||
$jumlah_serah=$get_current_GLejer_Details=[0]['kelmarin'];
|
||||
$kredit_serah=$get_current_GLejer_Details=[0]['kredit'];
|
||||
$debit_serah=$get_current_GLejer_Details=[0]['debit'];
|
||||
$recno_serah=$get_current_GLejer_Details=[0]['recno'];
|
||||
|
||||
|
||||
|
||||
$kredit_serah=$kredit_serah+$amaun;
|
||||
$hariIni_serah=$debit_serah-$kredit_serah;
|
||||
$kelmarin_serah=$jumlah_serah-$hariIni_serah;
|
||||
$update_lejerSerah=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[
|
||||
'recno'=>$recno_serah,
|
||||
'debit'=>$debit_serah,
|
||||
'kredit'=>$kredit_serah,
|
||||
'hariini'=>$hariIni_serah,
|
||||
'kelmarin' =>$kelmarin_serah,
|
||||
|
||||
]);
|
||||
|
||||
|
||||
$get_lejer=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$TUNAI])->json();
|
||||
|
||||
$hariIni=$get_lejer[0]['hariini'];
|
||||
$jumlah=$get_lejer[0]['kelmarin'];
|
||||
$kredit=$get_lejer[0]['kredit'];
|
||||
$debit=$get_lejer[0]['debit'];
|
||||
$recno=$get_lejer[0]['recno'];
|
||||
|
||||
$debit=$debit+$amaun;
|
||||
$Hari_Ini=$debit-$kredit;
|
||||
$Kelmarin=$jumlah-$Hari_Ini;
|
||||
$update_lejerTunai=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[
|
||||
'recno'=>$recno,
|
||||
'debit'=>$debit,
|
||||
'kredit'=>$kredit,
|
||||
'hariini'=>$Hari_Ini,
|
||||
'kelmarin' =>$Kelmarin,
|
||||
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$peti_besi_terkini=Http::get(config('api.url').'/api/VaultController/'.$auth_user['cawangan'])->json();
|
||||
|
||||
if(sizeof($peti_besi_terkini) == 0){
|
||||
@@ -3826,7 +3518,6 @@ class KhazanahController extends Controller
|
||||
])->json();
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
$pendahuluanserahan = Http::put(config('api.url').'/api/UpdateVaultPendahuluanSerahan/'. $auth_user['cawangan'],[
|
||||
'jenispendahuluanserahan' => $request->jenisgldetail,
|
||||
@@ -4518,4 +4209,56 @@ class KhazanahController extends Controller
|
||||
return view('print.suratgadaianhilang', compact('polis','gadai','customers','cawangan_detail','api_url'));
|
||||
}
|
||||
|
||||
public function PemilihanAnsUpah()
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
|
||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
|
||||
|
||||
return view('khazanah.laporan.ansuranupah', compact('cawangan_info','api_url'));
|
||||
}
|
||||
|
||||
public function LaporanUpah()
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
|
||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
|
||||
|
||||
return view('khazanah.laporan.upah', compact('cawangan_info','api_url'));
|
||||
}
|
||||
|
||||
public function cetaklaporan_Upah(Request $request)
|
||||
{
|
||||
$api_url = config('api.url');
|
||||
$auth_user = Auth::user();
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$tarikh_cetak = $current->toDateString();
|
||||
|
||||
if($request->datemula == null){
|
||||
$mula_date = '2017-01-01';
|
||||
}else{
|
||||
$split_date = explode('-', $request->datemula);
|
||||
$mula_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
}
|
||||
|
||||
if($request->datehingga == null){
|
||||
$hingga_date = $current->toDateString();
|
||||
}else{
|
||||
$split_date = explode('-', $request->datehingga);
|
||||
$hingga_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
}
|
||||
|
||||
$advansur = Http::get(config('api.url'). '/api/AnsuranByRangeTarikh/' . $auth_user['cawangan'],['mula' => $mula_date,'akhir' => $hingga_date])->json();
|
||||
|
||||
$cawangan = Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
$cawangan_detail=$cawangan[0];
|
||||
|
||||
return view('print.laporan_upah', compact('advansur','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user