fix skit2

This commit is contained in:
fifi97
2022-03-06 11:06:41 +08:00
parent 91e9a72781
commit cf767aec9d
8 changed files with 594 additions and 6 deletions
+35
View File
@@ -712,4 +712,39 @@ class AkaunController extends Controller
}
}
}
public function cetakLaporanRingkasanTerkumpul(Request $request){
$api_url = $request->hostname;
$auth_user = Auth::user();
$current = Carbon::now();
$current = new Carbon();
$tarikh_cetak = $current->toDateString();
if($request->datemula == null){
$mula_date = '2017-01-01';
}else{
$mula_date = $request->datemula;
}
if($request->datehingga == null){
$hingga_date = $current->toDateString();
}else{
$hingga_date = $request->datehingga;
}
$laporan_ringkasan = Http::get($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/'.$request->kodcaw)->json();
$cawangan_detail=$cawangan[0];
return view('akaun.laporan_ringkasanterkumpul', compact('laporan_ringkasan','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url'));
}
}