laporan bilangan pengadai berdasarkan pekerjaan

This commit is contained in:
Amirah22
2023-04-13 23:22:11 +08:00
parent 4d991896b2
commit 340a67cbb8
6 changed files with 432 additions and 0 deletions
+48
View File
@@ -1451,4 +1451,52 @@ class AkaunController extends Controller
}
}
public function cetaklaporan_bilangan_pengadai(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{
$split_date = explode('-', $request->datemula);
$mula_date = $request->datemula;
}
if($request->datehingga == null){
$hingga_date = $current->toDateString();
}else{
$split_date = explode('-', $request->datehingga);
$hingga_date = $request->datehingga;
}
$bilpengadai = Http::get($request->hostname. '/admin/bilangan/pengadai/' . $request->kodcaw,['mula' => $mula_date,'hingga' => $hingga_date,'jenis' => $request->radpendser])->json();
// dd($bilpengadai);
$cawangan = Http::get($request->hostname.'/api/cawangan/detail/'.$request->kodcaw)->json();
$cawangan_detail=$cawangan[0];
return view('akaun.laporan_bilangan_pengadai', compact('bilpengadai','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url'));
// if(isset($request->jenis))
// {
// if($request->jenis == 'pdf')
// {
// $pdf = PDF::loadView('akaun.laporan_pendahuluanserahan', compact('pendser','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url'))->setPaper('a4', 'potrait');
// return $pdf->download('laporan_HQ_' . $request->kodcaw .'_'. $mula_date . '_' . $request->radpendser . '.pdf');
// }else{
// return view('akaun.laporan_pendahuluanserahan', compact('pendser','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url'));
// }
// }
}
}