This commit is contained in:
root
2022-12-22 00:42:41 +08:00
10 changed files with 895 additions and 15 deletions
+76 -1
View File
@@ -746,7 +746,7 @@ class AkaunController extends Controller
}
$laporan_ringkasan = Http::get($api_url . '/api/laporan/terkumpul',[
'kodcaw' => $auth_user['cawangan'],
'kodcaw' => $request->kodcaw,
'mula' => $mula_date,
'akhir' => $hingga_date
])->json();
@@ -1176,4 +1176,79 @@ class AkaunController extends Controller
}
}
public function cetak_serahgadai(Request $request){
$auth_user = Auth::user();
$api_url = config('api.url');
$current = Carbon::now();
$current = new Carbon();
$tarikh_cetak = $current->toDateString();
if($request->datemula == null){
$datemula = '2017-01-01';
}else{
$split_date = explode('-', $request->datemula);
$datemula = $request->datemula;
}
if($request->datehingga == null){
$datehingga = $current->toDateString();
}else{
$split_date = explode('-', $request->datehingga);
$datehingga = $request->datehingga;
}
$serahbarcode = Http::get($request->hostname.'/admin/laporan/serahgadai/',[
'kodcaw' => $request->kodcaw,
'mula' => $datemula,
'hingga' => $datehingga,
])->json();
$cawangan_info = Http::get($request->hostname . '/api/cawangan/'. $request->kodcaw)->json();
$cawangan = Http::get($request->hostname.'/api/cawangan/detail/'. $request->kodcaw)->json();
$cawangan_detail=$cawangan[0];
return view('akaun.laporan_serahpetibesigadai', compact('cawangan_detail','api_url','serahbarcode','cawangan_info','datemula','datehingga','tarikh_cetak'));
}
public function cetak_serahtebus(Request $request){
$auth_user = Auth::user();
$api_url = config('api.url');
$current = Carbon::now();
$current = new Carbon();
$tarikh_cetak = $current->toDateString();
if($request->datemula == null){
$datemula = '2017-01-01';
}else{
$split_date = explode('-', $request->datemula);
$datemula = $request->datemula;
}
if($request->datehingga == null){
$datehingga = $current->toDateString();
}else{
$split_date = explode('-', $request->datehingga);
$datehingga = $request->datehingga;
}
$serahmarhun = Http::get($request->hostname.'/admin/laporan/serahmarhuntebus/',[
'kodcaw' => $request->kodcaw,
'mula' => $datemula,
'hingga' => $datehingga,
])->json();
$cawangan_info = Http::get($request->hostname . '/api/cawangan/'. $request->kodcaw)->json();
$cawangan = Http::get($request->hostname.'/api/cawangan/detail/'. $request->kodcaw)->json();
$cawangan_detail=$cawangan[0];
return view('akaun.laporan_serahpetibesigadai', compact('cawangan_detail','api_url','serahmarhun','cawangan_info','datemula','datehingga','tarikh_cetak'));
}
}