fix skit2
This commit is contained in:
@@ -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'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user